presDeadsurvdat: Data frame of survival information for presumed dead animals

View source: R/presDeadsurvdat.R

presDeadsurvdatR Documentation

Data frame of survival information for presumed dead animals

Description

presDeadsurvdat returns a matrix of all of the estimated death times for each animal in the model

Usage

presDeadsurvdat(events, dcut, newDeadtimes)

Arguments

events

A data frame of the entanglement data: timing, severity, etc.

dcut

An numerical index between 1 and nt that is used to determine when animals are censored.

newDeadtimes

a named vector of estimated death times. This is used to update the events data, so that new survival information can be calculated.

Details

This is a function that will build an object to be used in the construction of the Kaplan-Meier survival curves for right whales. The idea behind this is to loop over each animal that is presumed dead and calculate the necessary informaiton for the survival curve plotting.

It will take in a new vector of death times (newDeadtimes), and replace the median death times in events with the newly sampled ones.

Value

The output will be a data frame of survival information based on the imputed death times.

Examples

## Not run: 
presDeadsurvdat(events, dcut, newDeadtimes)

## End(Not run)

robschick/tangled documentation built on May 9, 2022, 4:07 p.m.