
Calculate model diagnostics for a fitted predmicror model
Source:R/model_diagnostics.R
fit_metrics.Rdfit_metrics() summarizes goodness-of-fit and information criteria for a
predmicror_fit object. The metrics are calculated on the response scale used
in the fitted model.
Usage
fit_metrics(object, ...)
# Default S3 method
fit_metrics(object, ...)
# S3 method for class 'predmicror_fit'
fit_metrics(object, ...)Value
A one-row data frame with columns: fit, model, type,
response, response_scale, n (observations), p (parameters),
SSE, RMSE, MAE, bias, RSE, R2, adj_R2, logLik, AIC,
BIC, and converged.
Examples
data(growthfull)
fit <- fit_growth(
data = growthfull,
model = "HuangFM",
time = "Time",
response = "lnN",
start = list(Y0 = 0, Ymax = 22, MUmax = 1.7, lag = 5)
)
fit_metrics(fit)
#> model type response response_scale n p SSE RMSE MAE
#> 1 HuangFM growth lnN lnN 13 4 1.777041 0.3697235 0.3379108
#> bias RSE R2 adj_R2 logLik AIC BIC
#> 1 3.909757e-09 0.4443523 0.9982255 0.9973382 -5.511202 21.0224 23.84715
#> converged
#> 1 TRUE