View source: R/calcKMUncertainty.R
calcKMUncertainty | R Documentation |
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
calcKMUncertainty(kmlines)
kmlines |
A list (size |
Each component of the list contains a data frame, which has these 10 columns:
The time slice for which we are recording survivorship. In this case it is a one year interval.
The number of animals at risk at the start of the interval.
The number of animals censored on the interval.
The number of animals that died on the interval.
The number of animals at risk at the end of the interval.
The proportion of animals that survived the interval.
Calculated as atRiskEnd / atRiskStart
The sex of the animal: 'M' == Male; 'F' == Female.
Survivorship - the cumulative product of proportion of animals that survive.
The label of the entanglement severity. Values include in increasing order of badness: minor, moderate, severe.
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:
Sex of the animal.
The label of the entanglement severity. Values include in increasing order of badness: minor, moderate, severe.
The time slice for which we are recording survivorship. In this case it is a one year interval.
2.5% Quantile of survivorship.
50% Quantile of survivorship.
97.5% Quantile of survivorship.
## Not run: calcKMUncertainty(kmlines) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.