survival_table: Generate a table of introduced survival over time

View source: R/survival_table.R

survival_tableR Documentation

Generate a table of introduced survival over time

Description

This function generates a table of survival estimates for introduced individuals after introduction. These estimates average over individuals, and over primary periods within years, so that the values are comparable among sites with one or multiple introduced cohorts, and a variable number of primary periods per year.

Usage

survival_table(model, by_cohort = TRUE, by_individual = FALSE, thin = 1)

Arguments

model

A model objectgenerated by mrmr:fit_model().

by_cohort

(bool) Whether to summarize survival separately by cohort.

by_individual

(bool) Whether to summarize survival separately by frog.

thin

(int) optional: thinning period (e.g., 2 takes every other draw) to reduce memory usage for very large datasets

Value

A data.frame with columns year_since_introduction, lo_survival, med_survival, and hi_survival, where lo, med, and hi represent the 2.5 for survival in the years following introduction.

Examples

## Not run: 
captures <- system.file("extdata", "capture-example.csv", package = "mrmr")
translocations <- system.file("extdata", "translocation-example.csv",
                              package = "mrmr")
surveys <- system.file("extdata", "survey-example.csv", package = "mrmr")
out <- clean_data(captures, translocations, surveys)
model <- fit_model(out, chains = 1, iter = 10)
survival_table(model)

## End(Not run)

SNARL1/mrmr documentation built on Nov. 23, 2023, 7:04 a.m.