Learn R Programming

⚠️There's a newer version (0.1.2) of this package.Take me there.

exactLTRE

The goal of exactLTRE is to provide a set of friendly tools to increase use of exact LTRE methods. Life Table Response Experiments are a valuable tool for advancing our knowledge about how stage-specific vital rates influence population dynamics. The results of LTREs also inform conservation goals, by identifying the life stage and vital rate (for example, juvenile survival or adult reproductive success) that had the largest impact on population growth rate in past observations or following a management intervention.

The classical methods of LTRE, presented in the Caswell (2001) textbook, use Taylor expansion approximations to calculate the contributions of vital rates. These classical methods also do not include many interactions terms which may be important. Exact LTRE provides an exact calculation of each contribution term, including interactions terms, by directly calculating the impact on population growth rate of differences or variation in vital rates.

This package includes functions for the classical methods as well as the fANOVA-based exact methods that we introduce. This will allow researchers to use both the methods that are standard in the literature up until now (2021), and the new methods that we encourage as a new standard.

Installation

You can install the development version of exactLTRE from GitHub with:

# install.packages("devtools")
devtools::install_github("chrissy3815/exactLTRE")
# if that doesn't work, try:
devtools::install_github("chrissy3815/exactLTRE", ref="main")

Fixed Design LTRE

A fixed design LTRE decomposes the difference in population growth rate (“lambda,” i.e. the leading eigenvalue of the population projection matrix) into the contributions from differences in the vital rates, and their interactions.

A fixed design LTRE compares exactly two matrices. This can be done either as a symmetric or directional analysis, and it should match the experimental design for the data collection.

library(exactLTRE)
## basic example code
A1<- matrix(data=c(0,0.8,0, 0,0,0.7, 5,0,0.2), nrow=3, ncol=3)
A2<- matrix(data=c(0,0.9,0, 0,0,0.5, 4,0,0.3), nrow=3, ncol=3)
# contributions to the difference in lambda for a directional design
cont_directional<- exactLTRE(list(A1,A2), method='fixed', fixed.directional=TRUE) 
# contributions to the difference in lambda for a symmetric design
cont_symmetric<- exactLTRE(list(A1,A2), method='fixed', fixed.directional=FALSE)

Random Design LTRE

A random design LTRE decomposes the variance in population growth rate (“lambda,” i.e. the leading eigenvalue of the population projection matrix) into the contributions from (co)variances of the vital rates and their interactions.

A random design LTRE can be used on an unordered list of two or more matrices.

library(exactLTRE)
## basic example code
A1<- matrix(data=c(0,0.8,0, 0,0,0.7, 5,0,0.2), nrow=3, ncol=3)
A2<- matrix(data=c(0,0.9,0, 0,0,0.5, 4,0,0.3), nrow=3, ncol=3)
A3<- matrix(data=c(0,0.4,0, 0,0,0.6, 6,0,0.25), nrow=3, ncol=3)
# contributions to the variance of lambda
cont_var<- exactLTRE(list(A1,A2,A3), method='random')

Copy Link

Version

Install

install.packages('exactLTRE')

Monthly Downloads

428

Version

0.1.0

License

MIT + file LICENSE

Maintainer

Christina Hernandez

Last Published

November 17th, 2022

Functions in exactLTRE (0.1.0)

lamDiff

Difference in lambda
mean_matrix

Calculate the mean matrix
fundamental_matrix

Fundamental matrix
generation_time

Generation time
lamDiff_symmetric

Difference in lambda, with the mean as baseline
lamVar

Variance in lambda
reMat

Reconstruct a matrix that was collapsed into a row vector
r_nought

R0, the net reproductive output
make.Gmatrix

G-matrix
run_matrix_checks

Automated checks for a set of matrices
variance_complete

A function for variance assuming a complete sample
lifespan

Expected lifespan
classicalLTRE_fixed

Classical LTRE analysis: one-way fixed design
classicalLTRE

Classical LTRE analysis
collapse_mat_list

Collapse a list of matrices
classicalLTRE_random

Classical LTRE analysis: random design
cov_matrix

The variance-covariance matrix for a set of population projection matrices
exactLTRE

Exact LTRE analysis
exactLTRE_fixed

Exact LTRE analysis: fixed design
exactLTRE_random

Exact LTRE analysis: random design
calc_matrix_responses

Responses to changing entries of a matrix
calc_matrix_effects

Effects of matrix parameters