[R] Survival analysis

David Winsemius dwinsemius at comcast.net
Wed Feb 17 20:51:45 CET 2010


On Feb 17, 2010, at 1:54 PM, FishR wrote:

>
> Dear all
> 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
> truncated …
> 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
> unsuitable model?

The second. "Decline" in that coxph model would need to be a two level  
variable, factor or integer, "event" or "censored".

You might get further if you described what data you had before you  
"logistically" regressed it. (And is this a species of Galapagos  
tortoises? I'm trying to figure out the 200 year time scale.)


>
> Any help would be greatly appreciated
> Tom
>
> -- 


David Winsemius, MD
Heritage Laboratories
West Hartford, CT



More information about the R-help mailing list