[R] 3d cloud plot with point size reflecting variable value

2009-03-31 Thread R User R User
Hello all,
I'm using the cloud function to plot the iris data as per the document:
http://www.stat.ucl.ac.be/ISpersonnel/lecoutre/stats/fichiers/_gallery.pdf

I'd like to change the point size to reflect a fourth variable, as done here
http://www.cis.hut.fi/projects/somtoolbox/download/pics2/shotvs2_origdata.png

Does anybody know how to do this? There doesn't seem to be an option in
cloud()

Thanks,
Richie

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Error in storage when attempting to run GLM

2009-02-11 Thread R User R User
Hello,
I'd be very grateful for help with the following.

I attempt to run a basic GLM as follows:
basic_model=glm(factor(A$b) ~ factor(A$c) )

variables b and c are text values and their class is factor. they have no
missing values.

I get the error:
Error: NA/NaN/Inf in foreign function call (arg4)
In addition: warning messages:
1: Ops.factor(y,mu) : - not meaningful for factors
2: Ops.factor(eta, offset) : - not meaningful for factors
etc


What does this mean?

R

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] barplot() x axes are not updated after removal of categories from the dataframe

2009-02-12 Thread R User R User
Hi all,
I'd be grateful for your help. I am a new user struggling with a barplot
issue.

I am plotting categories (X axis) and their mean count (Y axies) with
barplot().

The first call to barplot works fine.

I remove records from the dataframe using final=[!final$varname == "some
value",]

I echo the dataframe and the records are no longer in the dataframe.

When I call plot again however, the X axis still contains the removed
category values albeit with a count of 0.

How can I stop the removed categories appearing in the barplot? Are they
stored globally after the first barplot call?

thanks in advance for your help.

R

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] how to obtain p values from an ANOVA result

2009-02-13 Thread R User R User
Hi all,
I'm tryint to turn my ANOVA result from anova(model) in to p values. The
default output is:
term ; Df ; Deviance ; resid Df; Resid. Dev

Is there a way to add p values to this output so the significance of the
terms can be easily determined?

Thanks in advance.

Richie

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] multiple levels of nesting with trellis plots

2009-02-17 Thread R User R User
Hi guys,
I have a tricky problem that I'd appreciate your help with.

I have two categorical variables, say varA and varB and an associated
frequency Freq for combinations of the levels of varA and varB. This was
created with a table() call.

I'd now like to make panel plots of the frequency. I can do a panel plot by
varA:
barchart(data$Freq ~ data$varB | data$varA)

How do I achieve two levels of nesting for say a third categorical variable
varC?
That is, how do I specify 2 'given's in the the panel plot, and preferably
arranged the panels vertically within the 'inner' panel/

thanks very much,
Richie

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] vertically aligned X axis labels disappear off R Graphics window

2009-02-25 Thread R User R User
Hi guys,
I'm evaluating R for basic data exploration. I produce a bar plot of the
data, with the x axis labels aligned vertically. However, the start of
labels longer than about 10 characters are cut off by the bottom of the
graphics window.

I'd appreciate your help in properly spacing the space around a plot
reserved for labels so that this problem can be avoided.

Thanks,
Richie

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] barplot with specific order of x axis labels

2009-03-02 Thread R User R User
Hi all,
I'd appreciate your help with this problem.

I need to plot a barplot with the categories in a specific order. My data
might be:

hours Freq
AN 10
MO 14
LU  30

I need the categories to be in the order:
MO LU AN

Is there some way to pass sort the dataset into this order so that it plots
correctly when passed to barplot()?

Thanks very much,
Richie

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] including tabular information with a plot in R Graphics

2009-03-05 Thread R User R User
Hi all,
I have a presentation problem that I cannot find a solution to in the
documetnation.
I have a nice barplot. Below this I would also like a table with some
information relating to the plot.
My idea was to have the plot and table on the same graphics window so I can
output them as an image file for a report.

Does anybody know how to include tabular information from a dataset or table
into the graphics device?
Is there a better/more correct way to output tables and graphics to a single
file?

Thanks very much,
Richie

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] including tabular information with a plot in R Graphics

2009-03-06 Thread R User R User
Hi all,
Thanks very much for the suggestions. My experience for the benefit of
others is:

- use addtable2plot if you want a fancier legend or small table *within* a
plot area
- use textplot if you want combinations of tables and text listings in the
graphics device. The help for textplot gives a very good example

Thanks again,
Richie

2009/3/5 Eik Vettorazzi 

> Hi Richie,
> have a look at textplot() from the gplots-package.
> hope, it helps!
>
> R User R User schrieb:
>
>> Hi all,
>> I have a presentation problem that I cannot find a solution to in the
>> documetnation.
>> I have a nice barplot. Below this I would also like a table with some
>> information relating to the plot.
>> My idea was to have the plot and table on the same graphics window so I
>> can
>> output them as an image file for a report.
>>
>> Does anybody know how to include tabular information from a dataset or
>> table
>> into the graphics device?
>> Is there a better/more correct way to output tables and graphics to a
>> single
>> file?
>>
>> Thanks very much,
>> Richie
>>
>>[[alternative HTML version deleted]]
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
> --
> Eik Vettorazzi
> Institut für Medizinische Biometrie und Epidemiologie
> Universitätsklinikum Hamburg-Eppendorf
>
> Martinistr. 52
> 20246 Hamburg
>
> T ++49/40/42803-8243
> F ++49/40/42803-7790
>
>

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] svydesign syntax

2010-07-22 Thread R user

This message is for those familiar with the survey package. I need to fit a
weighted Cox model to accommodate the sampling weights as I have a
case-control study with controls sampled at random from a database in a
ratio 2:1 to cases (whom were all sampled). I want to make sure I am using
the right svydesign syntax to specify this sampling design. Can anyone
please check if the statement below is appropriate for my design?

#group represents the case (total of 132) vs control (253 out of the total
of 853 controls) groups; prob is 1 for cases and 253/853 for controls and
ssize=132 for cases and 853 otherwise;

dstr=svydesign(id=~1, strata=~group, prob=~prob, fpc=~ssize, data=noNA)

-- 
View this message in context: 
http://r.789695.n4.nabble.com/svydesign-syntax-tp2298793p2298793.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Calibration and validation for svycoxph

2010-06-09 Thread R user

Hello,

This post is for Dr. Thomas Lumley or anybody familiar with the survey
package. I am estimating a proportional hazards model with weights using
svycoxph. Are there functions already built in the survey package that allow
me to do validation and calibration of the model?

Thanks
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Calibration-and-validation-for-svycoxph-tp2249004p2249004.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] calibration and validation for svycoxph

2010-06-09 Thread R user

Hello,

This post is for Dr. Thomas Lumley or anybody familiar with the survey
package. I am estimating a proportional hazards model with weights using
svycoxph. Are there functions already built in the survey package that allow
me to do validation and calibration of the model?

Thanks 
-- 
View this message in context: 
http://r.789695.n4.nabble.com/calibration-and-validation-for-svycoxph-tp2249118p2249118.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] calibration and validation for svycoxph

2010-06-10 Thread R user

Hi Dr. Lumley,

Sorry about the succession of the 2 messages. It wasn't intended. This is my
first post to the forum and I first signed up to Nabble and submitted the
post and later got the message from Nabble that the post has not been
accepted by the R forum and that I need separate subscription for the R
forum. So I signed up for the R forum and resubmitted the post and both
messages ended up being posted.

Yes, I was looking for similar functions to those in the Design package to
build a calibration plot (Design, calibrate function) and to do bootstrap
validation of the model (Design, validate function). I will check the
options of the functions you mentioned to see if I can easily get those.
Could you please advise on what measure should I use to quantify the
optimism of fit (the way c-index was used for Cox models)? If you have
existent code that you used for these purposes that would be great.

Many thanks.

-- 
View this message in context: 
http://r.789695.n4.nabble.com/calibration-and-validation-for-svycoxph-tp2249118p2250730.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Help on computing Geary's C statistic to test for Spatial Autocorrelation

2009-02-08 Thread R User
Dear Users:

I have been trying to use the geary.test() function in *R*, but am having
slight difficulty understanding how I am to apply it in my context.
I have 2 matrices:

1) *n x p* matrix of *n* observations with *p* measurements each. It may be
noted that this matrix has a spatial dimension to it, as the
*n*observations are at different geographical locations on a map.
2) *n x n* spatial weights matrix (symmetric) with each matrix element being
an inter-locality weight.

Using the above 2 matrices, I am trying to compute the Geary's *C* statistic
for each of the *p* dimensions and also obtain corresponding *p*-values to
determine its statistical significance for spatial autocorrelation.

I will appreciate any help you could provide me in helping me compute the
same.

Thanks.

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] R2wd

2011-02-18 Thread rookie r user

Hi all, 

I'm currently trying to get accustomed to R and some of its packages, thus
need some help for a package called R2wd. As I am trying to use the wdGET()
function I'm getting the following message:

Error in if (!(tmp[["ActiveDocument"]][["Name"]] == filename))
tmp$Open(paste("path",  : 
  argument is of length zero

Does anybody know what that means?

Best,
-- 
View this message in context: 
http://r.789695.n4.nabble.com/R2wd-tp3313527p3313527.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.