SecondaryComparison: SecondaryComparison class

SecondaryComparisonR Documentation

SecondaryComparison class

Description

The SecondaryComparison class contains several functions for model comparison and model selection of growth models. It should not be instanced directly. Instead, it should be constructed using compare_secondary_fits().

It includes two type of tools for model selection and comparison: statistical indexes and visual analyses. Please check the sections below for details.

Note that all these tools use the names defined in compare_secondary_fits(), so we recommend passing a named list to that function.

Usage

## S3 method for class 'SecondaryComparison'
coef(object, ...)

## S3 method for class 'SecondaryComparison'
summary(object, ...)

## S3 method for class 'SecondaryComparison'
print(x, ...)

## S3 method for class 'SecondaryComparison'
plot(x, y, ..., type = 1, add_trend = TRUE)

Arguments

object

an instance of SecondaryComparison

...

ignored

x

an instance of SecondaryComparison

y

ignored

type

if type==1, the plot compares the model predictions. If type ==2, the plot compares the parameter estimates.

add_trend

should a trend line of the residuals be added for type==3? TRUE by default

Methods (by generic)

  • coef(SecondaryComparison): table of parameter estimates

  • summary(SecondaryComparison): summary table for the comparison

  • print(SecondaryComparison): print of the model comparison

  • plot(SecondaryComparison): illustrations comparing the fitted models

Statistical indexes

SecondaryComparison implements two S3 methods to obtain numerical values to facilitate model comparison and selection.

  • the coef method returns a tibble with the values of the parameter estimates and their corresponding standard errors for each model.

  • the summary returns a tibble with the AIC, number of degrees of freedom, mean error and root mean squared error for each model.

Visual analyses

The S3 plot method can generate three types of plots:

  • when type = 1, the plot compares the observations against the model predictions for each model. The plot includes a linear model fitted to the residuals. In the case of a perfect fit, the line would have slope=1 and intercept=0 (shown as a black, dashed line).

  • when type = 2, the plot compares the parameter estimates using error bars, where the limits of the error bars are the expected value +/- one standard error. In case one model does not has some model parameter (i.e. either because it is not defined or because it was fixed), the parameter is not included in the plot.


biogrowth documentation built on May 29, 2024, 4:17 a.m.