Hunsicker, Lawrence wrote:
Greetings, all:
I would like to estimate predicted survival for patients adjusted for
specific values for two independent variables, but using “ average ”
characteristics for all of the other independent predictors. I know
that I can use the survfit( ) function to do this on the fitted Cox
model , assuming that I enter the new data using the newdata=list()
parameter. The issue is how to enter data for the “ average ” patient
when the covariate is categorical. I suppose that I could do this
entering the fraction of patients at each level of the categorical
variable , after determining the parameterization by looking at
contrasts(variable). But is there an easier way that uses the mean
values that must have be en used by the survfit function to generate the
values for the function when newdata is not given ? These values must
be recorded somewhere.
Many thanks in advance for any help that you can give me.
Larry Hunsicker
Take a look at the gendata function in the Design package, in
conjunction with predict.cph or predict.psm.
Frank
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
|