Select a best-fit equation for one species, based on the lowest bias-corrected Aikaike’s information criterion (AICc).
ss_modelselect(data, response = "height", predictor = "diameter")
Dataframe that contains the variables of interest. Each row is a measurement for an individual tree.
Column name of the response variable. Defaults to height
.
Column name of the predictor variable. Defaults to
diameter
.
A list of 3 elements:
Table showing models ranked by AICc value.
Best-fit model object.
Table showing information on the best-fit model.
A dataframe with the following variables:
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).
All allometric equations considered (and ranked) can be found in ?eqns_info
and data(eqns_info)
. To make the AICc values of equations with a
transformed response variable comparable to untransformed equations,
\(log(y_{i})\) is multiplied by the geometric mean of the response variable
in data
.
McPherson E. G., van Doorn N. S. & Peper P. J. (2016) Urban Tree Database and Allometric Equations. General Technical Report PSW-GTR-253, USDA Forest Service, 86.
Xiao, X., White, E. P., Hooten, M. B., & Durham, S. L. (2011). On the use of log-transformation vs. nonlinear regression for analyzing biological power laws. Ecology, 92(10), 1887–1894.
Burnham, K. P., & Anderson, D. R. (2004). Multimodel inference: Understanding AIC and BIC in model selection. Sociological Methods and Research, 33(2), 261–304.
ss_modelselect_multi()
to select best-fit models across multiple
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_multi()
,
ss_predict()
,
ss_simulate()
data(urbantrees)
Alb_sam <- urbantrees[urbantrees$species == 'Albizia saman', ] # subset data for 1 species
results <- ss_modelselect(Alb_sam, response = 'height', predictor = 'diameter')
head(results$all_models_rank)
#> df AICc model
#> 1 3 591.9422 lin_w1
#> 2 4 593.0074 quad_w1
#> 3 5 593.4045 cub_w1
#> 4 6 594.0030 quart_w1
#> 5 3 594.0139 lin_w2
#> 6 5 595.5983 cub_w2
results$best_model
#>
#> Call:
#> lm(formula = y ~ x)
#>
#> Coefficients:
#> (Intercept) x
#> 6.717 9.464
#>
results$best_model_info
#> modelcode a b c d e response_geom_mean correctn_factor
#> 1 lin_w1 6.717431 9.464096 NA NA NA 13.56608 1
#> predictor_min predictor_max response_min response_max residual_SE mean_SE
#> 1 0.3119437 1.527887 8 20 2.205 4.7889
#> adj_R2 n
#> 1 0.4276 133