[R] help with formula for clogit

2011-11-07 Thread 1Rnwb
I would like to know if clogit function can be used as below clogit(group~., data=dataframe) When I try to use in above format it takes a long time, I would appreciate some pointers to get multiple combinations tested. set.seed(100) d=data.frame(x=rnorm(20)+5, x1=rnorm(20)+5, x2=rnorm(20)+5,

Re: [R] help with formula for clogit

2011-11-07 Thread Thomas Lumley
On Tue, Nov 8, 2011 at 4:19 AM, 1Rnwb sbpuro...@gmail.com wrote: I would like to know if clogit function can be used as below clogit(group~., data=dataframe) Not usefully. That syntax does not specify a strata() term, which is why the computation is very slow and probably not what you

Re: [R] help with formula for clogit

2011-11-07 Thread Weidong Gu
clogit needs to spell out formula plus strata, you can try modify the code ... d2=d[,c(mols,'group','Age','strata')] fo-as.formula(paste(paste('group~','Age',sep=''),'strata(strata)',sep='+')) log.reg-clogit(fo,data=d2) ... Weidong On Mon, Nov 7, 2011 at 10:19 AM, 1Rnwb sbpuro...@gmail.com