summary.gammi: Summary Method for gammi Fits

View source: R/summary.gammi.R

summary.gammiR Documentation

Summary Method for gammi Fits

Description

Obtain summary statistics from a fit generalized additive mixed model (gammi) object.

Usage

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

Arguments

object

Object of class "gammi"

...

Additional arguments (currently ignored)

Details

Produces significance testing and model diagnostic information. The significance tests use the Bayesian interpretation of a smoothing spline. The variable importance indices sum to 100 but can be negative for some terms. The variance inflation factors should ideally be 1 for all terms; values greater than 5 or 10 can indicate noteworthy multicollinearity.

Value

An object of class "summary.gammi", which is a list with components:

call

the model call, i.e., object$call

term.labels

the model term labels (character vector)

family

the exponential family object

logLik

log-likelihood for the solution

aic

AIC for the solution

deviance

the model deviance (numeric)

deviance.resid

the deviance residuals

r.squared

the model R-squared (numeric); see Note

df

the total degrees of freedom = object$edf + object$df.random

significance

the signififance testing information (matrix)

importance

the variable importance information (numeric)

vif

the variance inflation factors (numeric)

Note

The model R-squared is the proportion of the null deviance that is explained by the model, i.e.,

r.squared = 1 - deviance / null.deviance

where deviance is the deviance of the model, and null.deviance is the deviance of the null model.

When the random argument is used, null.deviance and r.squared will be NA. This is because there is not an obvious null model when random effects are included, e.g., should the null model include or exclude the random effects? Assuming that is it possible to define a reasonable null.deviance in such cases, the above formula can be applied to calculate the model R-squared for models that contain random effects.

Author(s)

Nathaniel E. Helwig <helwig@umn.edu>

References

Helwig, N. E. (2024). Precise tensor product smoothing via spectral splines. Stats, 7(1), 34-53, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3390/stats7010003")}

See Also

gammi for fitting generalized additive mixed models

plot.gammi for plotting effects from gammi objects

predict.gammi for predicting from gammi objects

Examples

# load 'gammi' package
library(gammi)

# load data
data(exam)

# header of data
head(exam)

# fit model
mod <- gammi(Exam.score ~ VRQ.score, data = exam,
             random = ~ (1 | Primary.school) + (1 | Secondary.school))
       
# summarize results
summary(mod)

# refit model with Secondary.school as penalized nominal effect
mod <- gammi(Exam.score ~ Secondary.school + VRQ.score, data = exam,
             random = ~ (1 | Primary.school))
             
# summarize results
summary(mod)

gammi documentation built on April 4, 2025, 4:48 a.m.

Related to summary.gammi in gammi...