View source: R/lifetable_bootstrap.R
| lifeTable_bootstrap | R Documentation |
Estimates the standard errors and percentile confidence intervals
of all scalar life table parameters with the bootstrap technique
used by TWOSEX-MSChart: complete individual records (stage
durations, adult days, sex and daily oviposition) are resampled
with replacement B times, and every parameter is recomputed
from each resampled cohort. Individuals that died before the adult
stage are resampled as well - they carry their mortality and zero
fecundity into the replicates.
lifeTable_bootstrap(lt, B = 1e+05, seed = NULL, conf.level = 0.95)
lt |
A |
B |
Integer; number of bootstrap replicates. The published
TWOSEX-MSChart standard is |
seed |
Integer; seed for the random number generator. Set it
to make the results exactly reproducible; |
conf.level |
Numeric; confidence level of the percentile
intervals (default |
The parameters covered are the mean developmental time of
every immature stage (averaged over the individuals that entered
the stage, including those that died during it), the female and
male adult longevity, and - when oviposition data are present -
the mean fecundity F, the net reproductive rate R0, the intrinsic
rate of increase r, the finite rate of increase lambda and the
mean generation time T. The intrinsic rate is solved per
replicate from the Euler-Lotka equation with the same age
convention as calc_r, but with a widened search
interval so that declining cohorts (R0 < 1, i.e. r < 0) are also
handled. Replicates in which no female is drawn have NA
fecundity, and replicates without any offspring have NA
r, lambda and T; such replicates are
excluded from the means, standard errors and intervals of the
affected parameters (column Valid_B shows how many
remained). Curve-type outputs (s_xj, l_x, m_x, e_x) are not
bootstrapped.
Attach the result to an analysis to have it exported by
lifeTable_export:
results$boot <- lifeTable_bootstrap(lt).
An object of class life_table_boot: a list with
summary |
data frame; one row per parameter with the original point estimate, the bootstrap mean, the bootstrap standard error and the percentile confidence interval |
boot |
numeric matrix; the raw B x p replicate values |
B, conf.level, N, parameters |
the settings used |
Meyer, J. S., Ingersoll, C. G., McDonald, L. L. and Boyce, M. S. (1986) Estimating uncertainty in population growth rates: jackknife vs. bootstrap. Ecological Modelling 29, 251-271.
Efron, B. and Tibshirani, R. J. (1993) An Introduction to the Bootstrap. New York: Chapman and Hall.
Chi, H., You, M. S., Atlihan, R., Smith, C. L., Kavousi, A., Ozgokce, M. S., Guncan, A. and Tuan, S. J. (2020) Age-stage, two-sex life table: an introduction to theory, data analysis, and application. Entomologia Generalis 40(2), 103-124.
lifeTable_boot_test for the paired
bootstrap test between two cohorts,
lifeTable_calculate_all for the point estimates.
f <- system.file("extdata", "lifetable_example.csv", package = "insectecol")
lt <- lifeTable_read(f)
## B = 100000 is the recommended setting for publications; a smaller
## B is used here so that the example runs fast
bt <- lifeTable_bootstrap(lt, B = 2000, seed = 1)
bt$summary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.