I am running R 2.3.1 on a Windows XP machine. I have a large dataset of
over 13 000 cases of a disease for which I am attempting to build a
prognostic model using Cox proportional hazards regression. Some of the
continuous covariates are skewed and therefore require transformation
for use in the Cox model. I have empirically selected some simple
normalizing transformations (based on previous knowledge and the ladder
of powers) and wanted to compare these selections to those produced by
the fractional polynomial technique of Royston and Altman.
When I attempt to fit a Cox model with the mfp library for overall
survival using a single left-skewed covariate called "age", I get the
following output:
> library(mfp)
> fit<- mfp(Surv(time.dead,dead.any)~ fp(age), family=cox, verbose=T,
+ na.action=na.exclude)
Variable Deviance Power(s)
------------------------------------------------
Cycle 1
age
27071.72
26704.42 1
26701.83 2
26695.2 -2 -2
Tansformation
shift scale
age 0 100
Fractional polynomials
df.initial select alpha df.final power1 power2
age 4 1 0.05 4 -2 -2
Null model: 27071.72
Linear model: 26704.42
Final model: 26695.2
Error in "[.data.frame"(list("Surv(time.dead, dead.any)" =
c(NA, NA, NA,
:
invalid subscript type
------------------
Can anyone tell me what this error message means and why I am getting
it? I did not get this error when I tried similar code using the GBSG
dataset provided with the mfp library.
Brant Inman
Mayo Clinic