[R] Fractional Polynomials in Competing Risks setting

Laura Bonnett l.j.bonnett at googlemail.com
Tue Jun 23 17:19:15 CEST 2009


Dear All,

I have analysed time to event data for continuous variables by
considering the multivariable fractional polynomial (MFP) model and
comparing this to the untransformed and log transformed model to
determine which transformation, if any, is best.  This was possible as
the Cox model was the underlying model.  However, I am now at the
situation where the assumption that the competing risks are
independent is no longer true and therefore I cannot use the Cox
model.

The code I used to get the MFP model was:
coxfitf <- mfp(Surv(with.Withtime,with.Wcens)~fp(all.age),family=cox,data=nearma,select=0.05,verbose=TRUE)
where with.Withtime is the time to treatment withdrawal, with.Wcens is
the censoring indictor for the event and all.firstint is the age at
baseline.

To look at the competing risks regression modelling when age in
untransformed, I can use the following code:
fitn<-crr(nearma$with.Withtime,censaeb,as.matrix(nearma$all.age),failcode=2,cencode=0)
where censaeb is the censoring indicator which is coded 1 for the
event of interest (time to treatment failure), 2 for the competing
risk and 0 for the censored value.

Can anyone suggest how I can effectively combine these situations i.e.
is there a way to apply the fractional polynomail transformation to
the variable to assertain whether the transformation improves the
model fit?  I've tried the following code but it doesn't actually
transform the variable:
fitf=crr(nearmb$with.Withtime,censaeb,as.matrix(fp(nearmb$all.firstint)),failcode=2,cencode=0)

Thank you for your help,

Laura




More information about the R-help mailing list