download_model {novelforestSG} | R Documentation |
Download Model Fitted to novelforest_data
Description
Download the brms
model fitted to novelforest_data
(Lai et al. 2021).
The model object is too large (16.5 MB) to be included with the package,
so this function downloads the model from the developmental GitHub website.
The generalised linear mixed-effect model was fitted via brms::brm
so
this package is recommended to make full use of the model object.
Usage
download_model(save_to = NULL)
Arguments
save_to |
Path and name of the file where the R object is saved to. Defaults to NULL, which does not save the model object locally. |
Value
A brms
model output of class brmsfit
,
which is a list containing the input data
and other slots
that store the model components.
Notably, the data
slot contains a data.frame
with the following
response variables:
- SD_N_0
first-order native taxonomic diversity, i.e., species richness
- SD_N_2
second-order native taxonomic diversity, i.e., inverse Simpson index
- SD_E_0
first-order exotic taxonomic diversity
- SD_E_2
second-order exotic taxonomic diversity
- FD_N_0
first-order native functional diversity
- FD_N_2
second-order native functional diversity
- FD_E_0
first-order exotic functional diversity
- FD_E_2
second-order exotic functional diversity,
and the following explanatory variables (and measurement units if you backtransform
them using backtransform
):
- dist
Distance to old-growth forests (m)
- size
Patch area (km^2)
- nitrogen
Total soil nitrogen (mg/kg)
- phosphorous
Total extractable soil phosphorous (mg/kg)
- potassium
Total extractable soil potassium (mg/kg)
- patch
Forest patch ID
#' Note that all explanatory variables were log-transformed and standardised to zero mean and
unit standard deviations. Use backtransform
to obtain the variables in
their original scales. See Lai et al. (2021) for more details on model building and
data collection.
References
Lai, H.R., Tan, G.S.Y., Neo, L., Kee, C.Y., Yee, A.T.K., Tan, H.T.W. and Chong, K.Y. (2021) Decoupled responses of native and exotic tree diversities to distance from old-growth forest and soil phosphorous in novel secondary forests. Applied Vegetation Science, 24, e12548. doi:10.1111/avsc.12548
See Also
backtransform, brms::brmsfit, brms::brm
Examples
## Not run:
novelforest_model <- download_model()
# library(brms) # recommended
summary(novelforest_model)
# to obtain input data
novelforest_model$data
## End(Not run)