[R] coxph and completely missing strata/subsetting
Erik Iverson
eriki at ccbr.umn.edu
Thu Jun 10 18:35:39 CEST 2010
> I'm doing some coxph() analyses with a large and complex dataset. The
> data was collected in different centers, so I am using
> strata(centers) to stratify the analysis.
>
> My main issue is, not all centers collected all the variables, so for
> a model such as:
>
> coxph(Surv(days, cancer) ~ varA + sex + strata(centers), data)
>
> I might have 1 or more centers that have NA for varA (in practice,
> all the individuals monitored at those centers come without varA).
>
> coxph() obviously warns me that a number of individuals have been
> excluded -- would that be equivalent to doing the analysis on a
> subset of the data or not?
It seems so by definition to me. I am confused as to what else would be
happening. You can always create a smaller, easier to understand
dataset and try things out for yourself. Perhaps I do not understand
your question though.
More information about the R-help
mailing list