mastSim {mastif} | R Documentation |
Data simulation for mast model
Description
Simulates data for analysis by mastif
in package mastif
.
Usage
mastSim(sim)
Arguments
sim |
|
Details
The list
sim
contains the following:
specNames
: character vector
of species names.
seedNames
: character vector
of seed names.
nyr = 5
: average number of years for a plot
ntree = 10
: average number of trees in specNames
on a plot
plotWide = 100
: diameter of plot
nplot = 3
: number of plots
ntrap = 20
: average number of seed traps on a plot
meanDist = 25
: mean dispersal (meters)
Value
Returns an object of class "mastif"
, a list containing the following components:
distall |
|
distall |
seed trap by tree |
formulaFec |
|
formulaRep |
|
plots |
|
R |
species to seed type matrix. |
seedData |
|
seedNames |
|
sim |
inputs to |
specNames |
|
treeData |
|
trueValues |
|
xytrap |
|
xytree |
|
years |
|
Author(s)
James S Clark, jimclark@duke.edu
References
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.
See Also
mastSim
simulates data
A more detailed vignette is can be obtained with:
browseVignettes('mastif')
website 'http://sites.nicholas.duke.edu/clarklab/code/'.
Examples
# simulate data
seedNames <- specNames <- 'acerRubr'
sim <- list(nyr = 10, ntree = 30, nplot = 5, ntrap = 40,
specNames = specNames, seedNames = seedNames)
inputs <- mastSim(sim)
output <- mastif( inputs = inputs, ng = 500, burnin = 200 )
# increase iterations, then plot:
# output <- mastif( inputs = output, ng = 2000, burnin = 1000 )
# plot output
# mastPlot(output, plotPars = list(trueValues = inputs$trueValues) )