Hi,
 
I have been trying to get the cph() function of the Design package to work but get an error message I don't understand:
 
Error in if (!length(fname) || !any(fname == zname)) { : 
        missing value where TRUE/FALSE needed

I have tried the same for a dummy dataset I made, and than it seems to work fine. However, it doesn't do it for my own data. Does anyone have a clue as to what this message means, whether I have made a mistake somewhere(although it seems ok to me?) and especially how to solve this problem. I know I could have used coxph() instead, but I'd like to predict the outcome on another dataset and coxph() does not allow for interaction terms...
 
I hope anyone can help me here. Underneath is the code I used for my data, if it's of any use...
 
Thanks, cheers Roel
 
Roel May
NINA, Norway
modeldata <- as.data.frame(modeldata)

survchoice<-Surv(2-modeldata$USED,is.element(modeldata$USED,1))

d <- datadist(modeldata$ID,modeldata$ASP_NW,modeldata$ALT,modeldata$SLOPE,modeldata$PLACEMENT,modeldata$DTL,modeldata$TRACK,modeldata$PRIVATE,modeldata$BUSH,modeldata$ROCK,modeldata$GRASS,modeldata$WATER,modeldata$RUGGED,modeldata$CABIN,data=modeldata)

options(datadist="d")

options(contrasts=c("contr.treatment","contr.treatment"))

interactmodel <- cph(survchoice~(ASP_NW+RUGGED+SLOPE+GRASS:PLACEMENT+PRIVATE+BUSH:ROCK+RUGGED:ROCK+DTL)+strat(ID),data=modeldata,method="breslow",y=TRUE,x=TRUE,surv=TRUE)


	[[alternative HTML version deleted]]


