# calcKMCurvesSevGen: Return lists to be used in plotting Kaplan-Meier survival... In robschick/tangled: Creates data objects and plots for Knowlton, Schick et al. manuscript on entanglement

## Description

This function is very similar to `calcKMCurves()` in that it takes the output from the functions used to make the survival data for the known dead, presumed alive, and presumed dead animals, and prepare the survivorship information needed to plot the KM curves. Like that function, we can vary the interval over which the survivorship is calculated. And we can store uncertainty around the death times through the use of a boot strap. Where it differs is that it is designed to examine survivorship split out by gender and by entanglement severity.

## Usage

 ```1 2``` ```calcKMCurvesSevGen(survdf, kdpasurvldf, nboot = 1, dcut, increment, medProb = TRUE) ```

## Arguments

 `survdf` is the data frame containing survival data for all animals in the three possible categories. `kdpasurvldf` is the data frame containing survival data for just the known dead and presumed alive animals `nboot` an integer indicating the number of times we want to run a bootstrap to collect uncertainty around the survivorship. Default is to not run a boot strap `dcut` integer indicating the month-year combo when the sightings data are considered complete through `increment` the unit of time overwhich we calculate survivorship Default value is to calculate it over a yearly interval `medProb` A logical indicating whether or not the median estimate of death is returned from the `getDeaths()` function. If TRUE, yes. If FALSE, then a value sampled from the posterior with normalised probability for all candidate death months

## Value

A list with two elements: 1) `kmlines` and 2) `censTicks`. The first element is a data frame of the survivorship for the different time frames. The second element is a data frame of censor times - simply used to make tick marks of when the animal was removed from the study via censoring.

## Examples

 ```1 2 3 4 5``` ```## Not run: calcKMCurvesSevGen(survdf, kdpasurvldf, nboot = 1, dcut, increment = 12, medProb = TRUE) ## End(Not run) ```

robschick/tangled documentation built on Dec. 17, 2018, 10:12 a.m.