getFix: Get information on fixed effects from a model object

View source: R/wald.R

getFixR Documentation

Get information on fixed effects from a model object

Description

getFix extracts coefficients, covariance matrix and degrees of freedom from model objects. Its main purpose is to extract information need by the wald function. To extend the wald function to a new class of objects, it is merely necessary to write a method for getFix.

Usage

getFix(fit, ...)

## S3 method for class 'multinom'
getFix(fit, ...)

## S3 method for class 'lm'
getFix(fit, robust = FALSE, type = "HC3", ...)

## S3 method for class 'glm'
getFix(fit, robust = FALSE, ...)

## S3 method for class 'lme'
getFix(fit, robust = FALSE, ...)

## S3 method for class 'gls'
getFix(fit, robust = FALSE, ...)

## S3 method for class 'lmer'
getFix(fit, robust = FALSE, ...)

## S3 method for class 'glmerMod'
getFix(fit, robust = FALSE, ...)

## S3 method for class 'glmer'
getFix(fit, robust = FALSE, ...)

## S3 method for class 'mer'
getFix(fit, robust = FALSE, ...)

## S3 method for class 'zeroinfl'
getFix(fit, robust = FALSE...)

## S3 method for class 'mipo'
getFix(fit, robust = FALSE, ...)

## S3 method for class 'MCMCglmm'
getFix(fit, robust = FALSE, ...)

## S3 method for class 'stanfit'
getFix(fit, pars, include = TRUE, robust = FALSE, ...)

## S3 method for class 'lmerMod'
getFix(fit, robust = FALSE, ...)

## S3 method for class 'glmerMod'
getFix(fit, robust = FALSE, ...)

## Default S3 method:
getFix(fit, ...)

Arguments

fit

A fitted model object

...

Other arguments unused

Details

Extending the wald function to a new class of objects only requires a getFix method for the new class.

Value

Returns a list with the following components:

  • fixedFixed effect parameter estimates

  • vcovCovariance matrix of the parameters

  • dfdenominator degrees of freedom for each effect

Methods (by class)

  • getFix(multinom): method for multinom objects in package nnet

  • getFix(lm): method for lm objects

  • getFix(glm): method for glm objects

  • getFix(lme): method for lme objects in the nlme package

  • getFix(gls): method for gls objects in the nlme package

  • getFix(lmer): method for lmer objects in the lme4 package

  • getFix(glmerMod): method for glmerMod objects in the lme4 package

  • getFix(glmer): method for glmer objects in the lme4 package

  • getFix(mer): method for mer objects in the lme4 package

  • getFix(zeroinfl): method for zeroinfl objects in the pscl?? package

  • getFix(mipo): method for mipo objects in the mice package

  • getFix(MCMCglmm): method for MCMCglmm objects in the MCMCglmm package

  • getFix(stanfit): method for stanfit objects in the rstan package

  • getFix(lmerMod): method for lmerMod objects in the lme4 package

  • getFix(glmerMod): method for glmerMod objects in the lme4 package

  • getFix(default): print message if getFix id used for a class for which a method has not been written

Author(s)

Georges Monette

See Also

wald

Examples

library(nlme)
fit <- lme( mathach ~ (ses + I(ses^2)) * Sex, hs, random = ~ 1 + ses| school)
getFix(fit)

data(Prestige, package="car")
mod.prestige <- lm(prestige ~ education + income, data=Prestige)
getFix(mod.prestige)


gmonette/spida2 documentation built on Aug. 20, 2023, 7:21 p.m.