fixcoef {glmglrt}R Documentation

Generic function to get fixed effects of a model

Description

This is a generic S3 function that gets point estimates of fixed effects of a statistical model, implemented on a wide range of models and that can be extended to new models.

Usage

fixcoef(model, ...)

## S3 method for class 'lmerMod'
fixcoef(model, ...)

## S3 method for class 'glmerMod'
fixcoef(model, ...)

## S3 method for class 'lmerModLmerTest'
fixcoef(model, ...)

## S3 method for class 'lme'
fixcoef(model, ...)

## S3 method for class 'multinom'
fixcoef(model, ...)

## S3 method for class 'mlm'
fixcoef(model, ...)

## Default S3 method:
fixcoef(model, ...)

Arguments

model

a fitted statistical model

...

argument unused by p_value_contrast.default but that may be useful to some specializations.

Details

It must return only estimates of fixed-effects of a model. Random effects are ignored. The names of the element of this vector must be consistent with the rownames and colnames of the variance-covariance matrix that vcov_fixcoef returns. The vcov_fixcoef function, on the same model, must return a matrix with the same number and names of rows and columns as the length of the vector returned by fixcoef.

The functions vcov_fixcoef and fixcoef would be pointless if the behavior of vcov and coef were not inconsistent from package to package.

fixcoef and vcov_fixcoef, together with df_for_wald are used by p_value_contrast.default

Value

Simple numeric vector with one item for each fixed effect of the model.

Methods (by class)

See Also

Other Wald-related functions: df_for_wald(), p_value_contrast(), vcov_fixcoef()

Examples

data(mtcars)
fixcoef(lm(data=mtcars, hp ~ 1)) # get mean horse power of cars listed in mtcars

[Package glmglrt version 0.2.2 Index]