findn {weights}R Documentation

Summarize key model information including sample size and fit statistics

Description

findn is a generic function that extracts useful summary information from a model object. It supports linear models (lm), generalized linear models (glm), ordinal regression models from polr, mixed-effects models from lmer, generalized additive models from gam, and multinomial models from multinom.

Usage

findn(x, ...)

Arguments

x

A fitted model object of class lm, glm, polr, lmerMod, glmerMod, gam, or multinom.

...

Additional arguments passed to methods (currently unused).

Value

A named list with the following components, where available:

The object is assigned class "findn" with a custom print method for display.

Author(s)

Josh Pasek

See Also

summary, AIC, pR2, polr, multinom, lmer, gam

Examples

data(mtcars)
mod1 <- lm(mpg ~ wt + hp, data = mtcars)
findn(mod1)

mod2 <- glm(am ~ wt + hp, data = mtcars, family = binomial)
findn(mod2)

library(MASS)
mod3 <- polr(Sat ~ Infl + Type + Cont, data = housing)
findn(mod3)

library(lme4)
mod4 <- lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy)
findn(mod4)

library(mgcv)
mod5 <- gam(mpg ~ s(wt) + hp, data = mtcars)
findn(mod5)

library(nnet)
mod6 <- multinom(vs ~ wt + hp, data = mtcars, trace = FALSE)
findn(mod6)

[Package weights version 1.1.2 Index]