View source: R/maxBestimation.R
fitNLMModels | R Documentation |
The function will create sensible parameter ranges for A, k and p parameters
of the Chapman-Richards and Logistic growth curves and attempt to run a
forward step-AIC procedure to add covariates to the linear component of the
model (on the A parameter – the asymptote). The maximum number of covariates
to add is determined by maxNoCoefs
.
fitNLMModels(
sp = NULL,
predictorVarsData,
sppVarsB,
predictorVars,
predictorVarsCombos = NULL,
maxNoCoefs = 4,
doFwdSelection = FALSE,
sampleSize = 3000,
Ntries = 2000,
maxCover = 1L,
models = c("CR", "Logistic"),
modelOutputsPrev = NULL,
randomStarts = FALSE,
lowerBounds = TRUE,
upperBounds = TRUE,
nbWorkers = 1L
)
sp |
species name – only used for messaging. |
predictorVarsData |
a |
sppVarsB |
s |
predictorVars |
character vector of predictor variables to be included
in the linear component of the model affecting the asymptote (need to correspond to
|
predictorVarsCombos |
a list of sets of covariates in |
maxNoCoefs |
how many covariates from |
doFwdSelection |
should covariates be added one at a time to the
linear component of the model? If |
sampleSize |
how many data points should be randomly sampled to fit the model?
If |
Ntries |
how many times should the models be fit with new randomly
generated starting values? Only used if |
maxCover |
numeric. Value indicating maximum cover/dominance. |
models |
character vector of models to fit. Only Chapman-Richards ('CR') and 'Logistic' can be chosen at the moment. |
modelOutputsPrev |
previous outputs of |
randomStarts |
logical. Should random starting values of A, k and p non-linear parameters be picked from a range sensible values, or should all combinations of values within this range be used? If FALSE, the default, the starting values are spaced at regular intervals within an acceptable range for each parameter – 20 values for A, 10 for k and p – and all combinations are used (2000 starting values in total). Parameter ranges are estimated from data following Fekedulegn et al. (1999) as follows:
|
lowerBounds |
a named vector of lower parameter boundaries. If |
upperBounds |
a named vector of upper parameter boundaries. If |
nbWorkers |
integer. If > 1, the number of workers to use in |
bbmle::mle2()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.