[R] error message in cox regression cph()

From: May, Roel <Roel.May_at_nina.no>
Date: Fri 03 Feb 2006 - 00:04:32 EST


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)


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)



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]]

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Feb 03 00:12:24 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:16 EST