mast inference and forecasting (mastif)

Clark, J.S., C. Nunes, and B. Tomasek. 2019. Foodwebs based on unreliable foundations: spatio-temporal masting merged with consumer movement, storage, and diet. Ecological Monographs, in press. Appendix


mastif is used to estimate fecundity and seed dispersal based on mapped tree and seed trap data.  mastif operates on inventory plot data or simulated data.  Inventory data for seeds of the genus Pinus are shown below for random plots and years.  In these maps, large green symbols indicate seed traps that accumulated large numbers of seeds.  Large brown symbols indicate large trees.

The simulator in mastif produces data sets with known parameter values and latent variables.  Analysis provides insight on identifiability of seed production and the variables that control it.

At left is an example of seed prediction and fecundity estimates with known values from simulation.  Simulated data are generated with the function mastSim.

Prediction validates the model and shows how well parameters and latent states are identified for specific data sets.

Maps of predicted seed rain and uncertainty from the fitted model.  Predicted mean seed rain at left and predictive coefficient of variation at right.  In-sample prediction includes mapped stands fitted with the model.  Out-of-sample prediction is available for mapped stands that are not fitted to the data.

Predicted mean seed rain, showing seed traps with symbols in proportion to seed counts.
Predictive coefficient of variation for seed rain, showing highest uncertainty in regions with few seed traps.
Interannual variability in fecundity at the individual tree scale differs by species and regions, showing pines at Duke Forest (DF), Coweeta (CW), and Harvard Forest (HF). In the plot at left are year effects for several species and regions, shown as 95% credible intervals with seed count data (lower dots with mean values).

Year effects show ‘masting’, the tendency for individuals to synchronize reproduction.  Year effects can be fitted by species and by species and region.

mastifuses Gibbs sampling with direct sampling, Metropolis, and Hamiltonian updating.  It is implemented in R and C++ with Rcpp and the RcppArmadillo library for fast, efficient linear algebra operations. For this development version you will need to install them. Occasionally this is challenging on some platforms–if you have trouble send me an email. Someone in the lab has probably figured it out for a machine like yours. This will not be an issue once it is on CRAN.

Vignette with R code and applications

Package available spring 2019

Installation in RStudio:

> install.packages('mastif_1.0.tar.gz',repos=NULL, type='source')
> library('mastif')


> help('mastif')
> browseVignettes('mastif')