[R] Survival analysis
tomworthington at talk21.com
Wed Feb 17 19:54:52 CET 2010
I have a dataset examining the probability of a population surviving
(calculated from a logistic regression) of a species over a 200yr period.
The predictor variables are either continuous but non-normal (e.g.
temperature, oxygen) or categorical (e.g. channelisation), unfortunately I
also have a large amount of missing values.
Year Decline Temperature Oxygen Channelisation
1800 0.947758115 36.6 NA NA
1801 0.946135961 25.2 NA NA
1802 0.944466388 28.5 NA NA
1803 0.942748196 35.5 NA NA
1804 0.940980166 33 NA NA
1805 0.93916106 30.2 NA NA
1999 0.028531339 10.5 NA 5
2000 0.027649801 8.4 NA 5
I have been trying to run a Cox Proportional Hazards Model with the code
model<-coxph(Surv(Year, Decline) ~ Temperature + Oxygen + Channelisation)
but keep getting an error message ‘Invalid status value’.
Have I inputted the data in the wrong format or am I trying to run a totally
Any help would be greatly appreciated
View this message in context: http://n4.nabble.com/Survival-analysis-tp1559155p1559155.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help