AICc {flexOR}R Documentation

AICc: Calculation for GAM Models

Description

Calculates AICc (Akaike Information Criterion corrected for small sample sizes) for Generalized Additive Models (GAM).

Usage

AICc(object)

Arguments

object

An object of class "Gam" or "gam" representing a fitted GAM model.

Details

This function calculates the AICc value (Akaike Information Criterion corrected for small sample sizes) for a given GAM model. AICc is a measure of model fit that penalizes the number of parameters in the model to avoid overfitting.

Value

A numeric value representing the AICc for the GAM model.

See Also

gam, logLik, AIC

Examples

# Load dataset
data(PimaIndiansDiabetes2, package="mlbench");

# Fit GAM model
fit <- mgcv::gam(
  diabetes ~ s(age) + s(mass) + s(pedigree) + pressure + glucose,
  data=PimaIndiansDiabetes2,
  family=binomial
);

# Calculate AICc
AICc(fit);


[Package flexOR version 1.0.0 Index]