View source: R/summary.gammi.R
| summary.gammi | R Documentation |
Obtain summary statistics from a fit generalized additive mixed model (gammi) object.
## S3 method for class 'gammi'
summary(object, ...)
object |
Object of class "gammi" |
... |
Additional arguments (currently ignored) |
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.
An object of class "summary.gammi", which is a list with components:
call |
the model call, i.e., |
term.labels |
the model term labels (character vector) |
family |
the exponential |
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 = |
significance |
the signififance testing information (matrix) |
importance |
the variable importance information (numeric) |
vif |
the variance inflation factors (numeric) |
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.
Nathaniel E. Helwig <helwig@umn.edu>
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")}
gammi for fitting generalized additive mixed models
plot.gammi for plotting effects from gammi objects
predict.gammi for predicting from gammi objects
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.