[R] Random covariate in survreg (Survival)

C. E. Timothy Paine cetpaine at gmail.com
Fri Mar 24 19:23:02 CET 2006


Dear R Listers-

I am attempting to analyse the survival of seeds in cages  
(exclosures) that differ in their permeability to rainforest mammals.  
Because I did not observe the moment of seed disappearance, my data  
is interval censored. This limits my options for analysis (as I  
understand it) to survreg, in the survival package. Because I  
repeated the experiment in 8 sites, I have a random covariate.  
Additionally, my analysis should properly be treated as a split-plot  
design, since seeds of all 15 species were sown into each exclosure.   
Survreg, it appears, cannot handle random predictor variables. Nor  
can survreg handle multiple error terms.

Please, can you advise me on a way forward?  How can I extract  
survival functions for each species/treatment combination?   I  
understand that I can avoid the split-plot issue by running separate  
analyses on each species. But I'd appreciate any direction on how to  
incorporate 'site', the random blocking variable.

Some code follows...
Surv.all<-Surv(data.raw$interval.start,  data.raw$interval.end,  
data.raw$censor, type = "interval")
#this runs fine...
survreg.1<-survreg(Surv.all ~ species*trt,  weights = freq, data  =  
data.raw)
#this does not work...
survreg.2<-survreg(Surv.all ~ species*trt, random = ~ site,  weights  
= freq, data  = data.raw)

thanks in advance for your help!
tim


Running R version 2.2.1, 2005-12-20, on Mac OS 10.4.5


______________________
C. E. Timothy Paine
Dept. of Biological Sciences
107 Life Sciences Building
Louisiana State University
Baton Rouge, LA  70803

225-578-7567
cpaine3 at lsu.edu
    650 species of rainforest trees...
    www.biology.lsu.edu/labpages/harmslab/tim




More information about the R-help mailing list