Displaying 20 results from an estimated 1000 matches similar to: "Reading and treating multiple files...."
2004 Sep 16
1
cor() fails with big dataframe
Hello,
I have a big dataframe with *NO* na's (9 columns, 293380 rows).
# doing
memory.limit(size = 1000000000)
cor(x)
#gives
Error in cor(x) : missing observations in cov/cor
In addition: Warning message:
NAs introduced by coercion
#I found the obvious workaround:
COR <- matrix(rep(0, 81),9,9)
for (i in 1:9) for (j in 1:9) {if (i>j) COR[i,j] <- cor (x[,i],x[,j])}
#which works fine,
2004 Oct 16
3
Cox PH Warning Message
Hi,
Can anybody tell me what the message below means and how to overcome it.
Thanks,
Neil
Warning message:
X matrix deemed to be singular; variable 2 in: coxph(Surv(age_at_death,
death) ~ project$pluralgp + project$yrborn + .........
>
2003 Sep 12
3
factor creation
Another newbie question....
I want to create a factor (say cT)from a numerical variable (sy temp) by
regrouping the values in classes (say cT <390, [390,400[,[400,409[...>=550)
Is there a simple way of doing that using the factor function?
AND I do not find how to manipulate strings (I want to concatenete characters
strings ("abkdas","chjw") into something like
2004 Jul 13
5
table lookup n R
Hello R helpers!
I looked but did not find a table-lookup R-utility. I could use a loop to do the job (old FORTRAN/C habits die hard) but if I have a big table in which I have to search for the values corresponding to a vector, I end up logically with a double loop.
Is there already such a utility? Otherwise, is there a way without loops?
Thanks as always
Anne
2004 Dec 22
2
RE ordering levels
Sorry, sorry....
of course
levels(testf)[c(2,1,3)]
will do the job
My excuses to all
Anne
PS I will meditate the following saying
"la parole est d'argent et le silence est d'or"
BONNES FETES A TOUS
SEASONAL GREETINGS
----------------------------------------------------
Anne Piotet
Tel: +41 79 359 83 32 (mobile)
Email: anne.piotet@m-td.com
2005 Jan 04
1
scree plot
Hi!
Is there an easy way to add to the scree-plot labels to each value pertaining to the cumulative proportion of explained variance?
Thanks and a happy new year
Anne
----------------------------------------------------
Anne Piotet
Tel: +41 79 359 83 32 (mobile)
Email: anne.piotet@m-td.com
---------------------------------------------------
M-TD Modelling and Technology Development
PSE-C
2005 Jan 06
2
library vcd for R rw2001
Is there an upgrate of the vcd library (visualisation of categorical data) for the latest R version?
Trying to download it from CRAN I get
URL /data/WWW/ftp/pub/R/bin/windows/contrib/r-release/vcd_0.1-3.4.zip was not found on this server.
googling it, I found it for instance on
http://www.sourcekeg.co.uk/cran/bin/windows/contrib/1.9/
but trying to install it gave me the message
>
2005 Jan 07
2
help with polytomous logistic regression
Hi!
I'm trying to do some ploytomous logistic regression using multinom() in the nnet package, but am a bit confused about interpretation of the results
Is it possible to get the following quantities:
I: maximum likelihood estimates to test for fit of model and significance of each predictor
(I would like to produce a table of the following type)
Analysis of Variance: MLE (values are
2004 Jul 26
5
covariate selection in cox model (counting process)
Hello everyone,
I am searching for a covariate selection procedure in a cox model formulated
as a counting process.
I use intervals, my formula looks like coxph(Surv(start,stop,status)~
x1+x2+...+cluster(id),robust=T) where id is a country code (I study
occurence of civil wars from 1962 to 1997).
I'd like something not based on p-values, since they have several flaws for
this purpose.
I turned
2004 Dec 06
3
removing NA as a level
Dear R-helpers,
I have a problem which I suppose is trivila, but...
I have included NA values as factors ( (to be able to make nice printed summaries with NAs % ba category ) with the following code
dat$x.f<-factor(dat$x, exclude=NULL); levels(dat$x.f)<-c("A1","A2","A3","A4","NA"); length(dat$x.f)
Now, I want to impute the missing values.
2004 Aug 19
1
Unbalanced parentheses printed by warnings() crash text editor
Hello everyone,
Hope it is the good place for this (I discuss the question of the right
place below).
Most of the time, warnings are more than 1000 characters long and thus are
truncated.
Most of the time, this generates printouts with unbalanced parentheses.
Intelligent text editors which do parentheses highlighting get very
confused with this.
After too many warnings, they give errors, and
2004 Jul 04
2
smooth non cumulative baseline hazard in Cox model
Hi everyone.
There's been several threads on baseline hazard in Cox model but I think
they were all on cumulative baseline hazard,
for instance
http://tolstoy.newcastle.edu.au/R/help/01a/0464.html
http://tolstoy.newcastle.edu.au/R/help/01a/0436.html
"basehaz" in package survival seems to do a cumulative hazard.
extract from the basehaz function:
sfit <- survfit(fit)
H
2004 Dec 22
0
relevel expansion suggestion
To the R developers,
The discussion below reminded me that I think it might be a good idea
to take the Relevel function from the Lexis package and replace relevel
in stats with it. This is really nothing special for epidemiology.
It is fully compatible with the existing relevel (it actually contains
the
relevel code almost verbatim as a subset), but it has the extra
functionality
of combining
2004 Jun 27
1
back transformation from avas
Hello R helpers!
I'm using the avas function form package acepack (called from areg.boot package Hmisc) to estimate automatically transformations of predictors (in this case monotonous) and response.
Well, it seems to work quite well, but I have 3 basic questions:
- which set of basis functions is used in this procedure?
- how do I back transform my estimate (y hat ) to the originasl scale?
2009 Mar 02
4
portable R editor
Hi,
I have been dreaming about a complete R environment on my USB stick for a long time. Now I finally want to realize it but what I am missing is a good, portable editor for R which has tabs and syntax highlighting, can execute code, has bookmarks and a little project file management facility pretty much like Tinn-R has those. I like Tinn-R but it seems like there is only a very old version of
2004 Jul 15
1
areg.boot use of inverseTrans and ytype
Hi R helpers!
I'm still a bit ( alot) confused by the use of "inverseTrans" and "ytype" in areg.boot (Hmisc): What I want to do seems very simple, but I do not get the result I want:
plot the predicted values in the original scale. (I did not understand the documentation, sorry!)
for instance the following code
2004 Dec 22
4
ordering levels
Hello!
I would like to know if there is a simple way to reorder levels of a given factor.Let's say that the vector
testf<-factor(c("red","red","red","blue","blue","white"))
levels(testf) : blue red white
should have reordered levels such as
levels(testf) : red blue white
(this is for presentation purposes)
I guess
2005 Aug 09
2
connexion problem getHdata (HMisc)
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
Hi
Just installing R and some
2004 Jul 16
3
small problem with predict
hello to all!
I have a small problem wit predict() for lm
Let's say I have predictors x1 and x2, response y
I want to predict for a new ds say
dn<-data.frame(x1= seq(min(x1),max(x1),length=10),x2=rep(median(x2),10))
predict(lm(y~x1+x2),dn,se.fit=T)
Error message
> Error: variables 'x1', 'x2' were specified differently from the fit
(I looked in the help and found
2004 Dec 22
0
ordering levels: I was wrong
I was wrong about needing the Relevel from the Lexis package.
The default verson of relevel does the job of reshuffling levels
in any desired order, albeit with a warning (which comes from the
fact that apparently only a single number had been anticipated by
the designer):
> testf <- factor( sample( letters[1:4], 100, replace=T ) )
> table( testf, newf=relevel( testf, ref=c(3,2,1,4) )