View source: R/ss_modelselect.R
ss_modelselect_multi | R Documentation |
Wrapper function that runs ss_modelselect()
across multiple species in a
dataframe. A single best-fit equation is selected per species, based on the
lowest AICc value. All allometric equations considered (and ranked) can be
found in ?eqns_info
and data(eqns_info)
.
ss_modelselect_multi( data, species = "species", response = "height", predictor = "diameter" )
data |
Dataframe that contains the variables of interest. Each row is a measurement for an individual tree of a particular species. |
species |
Column name of the species variable. Defaults to |
response |
Column name of the response variable. Defaults to |
predictor |
Column name of the predictor variable. Defaults to
|
A list of 3 elements:
List of tables showing each species' candidate models ranked by AICc value.
List of each species' best-fit model object.
Table showing each species' best-fit model information.
A dataframe with the following variables:
Name of tree species.
Model code for the best-fit equation.
Parameter estimates.
Geometric mean of the response variable used in calculation of AICc (only for transformed models).
Bias correction factor to use on model predictions (only for transformed models).
Range of the predictor variable within the data used to generate the model.
Range of the response variable within the data used to generate the model.
Residual standard error of the model.
Mean standard error of the model.
Adjusted R^2 of the model.
Sample size (no. of trees used to fit model).
ss_modelselect()
to select a best-fit model for one species.
ss_modelfit()
to fit a pre-selected model for one species.
ss_modelfit_multi()
to fit pre-selected models across multiple species.
Other single-species model functions:
ss_modelfit_multi()
,
ss_modelfit()
,
ss_modelselect()
,
ss_predict()
,
ss_simulate()
data(urbantrees) results <- ss_modelselect_multi(urbantrees, species = 'species', response = 'height', predictor = 'diameter') head(results$ss_models_rank[[1]]) # Highly-ranked models for 1st species in list results$ss_models[[1]] # model object for 1st species in list results$ss_models_info # summary of best-fit models
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.