nesting in CoxPH with survival package
Katie: You need to get local statistical help. What you are doing makes no sense. See inline below. -- Bert
On Sat, Jan 12, 2013 at 1:03 PM, David Winsemius <dwinsemius at comcast.net> wrote:
On Jan 11, 2013, at 5:35 PM, Katie Anweiler wrote:
Hello all, I am trying to understand how to specify nested factors when using coxph(), and if it is appropriate to nest these factors in my situation. In the simplest form, I am testing two different temperatures, with each temperature being performed twice in different experimental periods (e.g. Temp5 performed in Period A and C, Temp4 performed in Period B and D)
Period is confounded with temperature. That is the source of the singularity. in the message received below. You can estimate the C-A and the D-B differences. As I said, get statistical help. These are not R questions. -- Bert
I am trying to see if survival time is affected by the treatment temperature. To do this I am using temperature and experimental period nested within temperature as factors.
LOEtempmod.5days=coxph(LOE.stable.5days~Temp+Temp/Period,data=goodstable)
Warning message: In coxph(LOE.stable.5days ~ Temp + Temp/Period, : X matrix deemed to be singular; variable 2 5 6 7 1. Is this an appropriate way of nesting?
Have you looked at the coxme package? http://cran.r-project.org/web/packages/coxme/index.html
2. Can this error message be ignored?
Sometimes R packages correctly drop variables that are exactly collinear: other times the correct solution is not clear. I would think the answer in this case would be "no", but do not have a lot to go on at this point. -- David Winsemius, MD Alameda, CA, USA
______________________________________________ R-help at 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.
Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm