Re: [R] Survival analysis: ERROR: Time and status are different lengths

2015-12-04 Thread Therneau, Terry M., Ph.D.
I expect that reading the result of print(fit.weib) will answer your question. If there were any missing values in the data set, then the fit.weib$linear.predictors will be shorter than the original data set, and the printout will have a note about "...deleted due to missing". The simplest

Re: [R] Survival analysis: ERROR: Time and status are different lengths

2015-12-04 Thread Marleen Hamoen
Hi Terry, I already suspected it had something to do with missing values in one of the covariates. I couldn't get the na.action="na.exclude" to work (perhaps this is because I am relatively unexperienced with R), but I managed to solve the problem by using the following command with

[R] Survival analysis: ERROR: Time and status are different lengths

2015-12-03 Thread Marleen Hamoen
Hi, I am fitting an AFT model assuming a Weibull distribution and I would like to check the residuals compared to the Kaplan Meier residuals, but when I try to create the Kaplan Meier residuals I get an error: Time and status are different lengths. I am using the following script: # Fitting the