View source: R/survival_table.R
survival_table | R Documentation |
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.
survival_table(model, by_cohort = TRUE, by_individual = FALSE, thin = 1)
model |
A model objectgenerated by |
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 |
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.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.