Description Usage Arguments Value Examples
Convert capture data of neonates into the proper format for conducting survival analysis. This function will return 2 columns of data: survival time of each in whatever units desired (days, weeks, months, etc.) and an indicator column of whether the event (i.e. mortality) occurred in binary format. Further, this function allows the option to use a cutoff age for modeling survival. For instance, in many cases survival of neonatal ungulates is modeled to 140 days.
1 | NeoSurvData(NeoDat, units, cuts, cutoffs, Cause)
|
NeoDat |
data.frame of capture data. Should contain a column of the day an animal began being monitored (must be named StartDate and in Date format), a column of animal mortality date or or current date if individual still alive (must be named EndDate and in Date format), and a column identifying cause of mortality. |
units |
Units desired for modeling survival (e.g. days, weeks, etc) |
cuts |
= Logical. TRUE/FALSE. Whether you desire to use a cutoff date for survival |
cutoffs |
Vector of cutoffs in units desired (e.g. 140 days, indicate 140) |
Cause |
Vector of causes in your data.frame in which events should be censored (i.e. Collar_Failure) |
Returns a data.frame with original data.frame with a column of survival time (DiffTime) and indicator of whether event occurred (Indicator)
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.