Description Usage Arguments Format Value Examples

View source: R/calcKMUncertainty.R

`calcKMUncertainty`

ingests the list of survivorship information
and returns the 2.5, 0.5 and 97.5 quantiles. The goal is to
create the data needed to plot the ribbon around the median estimate
of survivorship for entangled animals. The processing idea is that we ingest a
list, convert it to a big data frame. And then use dplyr to group by the
different sex and severity combinations, and for each time interval, calculate
the summary statistics

1 | ```
calcKMUncertainty(kmlines)
``` |

`kmlines` |
A list (size |

Each component of the list contains a data frame, which has these 10 columns:

- interval
The time slice for which we are recording survivorship. In this case it is a one year interval.

- atRiskStart
The number of animals at risk at the start of the interval.

- censored
The number of animals censored on the interval.

- diedOnInterval
The number of animals that died on the interval.

- atRiskEnd
The number of animals at risk at the end of the interval.

- propSurv
The proportion of animals that survived the interval. Calculated as

`atRiskEnd / atRiskStart`

- gender
The sex of the animal: 'M' == Male; 'F' == Female.

- psurv
Survivorship - the cumulative product of proportion of animals that survive.

- sev
The label of the entanglement severity. Values include in increasing order of badness: minor, moderate, severe.

- group
Simply a vector denoting what iteration each slice corresponds to.

The output will be a data frame of survival information based on the imputed death times. This will include 5 columns:

- gender
Sex of the animal.

- sev
The label of the entanglement severity. Values include in increasing order of badness: minor, moderate, severe.

- interval
The time slice for which we are recording survivorship. In this case it is a one year interval.

- low
2.5% Quantile of survivorship.

- med
50% Quantile of survivorship.

- high
97.5% Quantile of survivorship.

1 2 3 4 | ```
## Not run:
calcKMUncertainty(kmlines)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.