Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

modelparm

Generic Accessor Function for Model Parameters


Description

Extract model parameters and their covariance matrix as well as degrees of freedom (if available) from a fitted model.

Usage

modelparm(model, coef., vcov., df, ...)

Arguments

model

a fitted model, for example an object returned by lm, glm, aov, survreg, or lmer etc.

coef.

an accessor function for the model parameters. Alternatively, the vector of coefficients.

vcov.

an accessor function for the covariance matrix of the model parameters. Alternatively, the covariance matrix directly.

df

an optional specification of the degrees of freedom to be used in subsequent computations.

...

additional arguments, currently ignored.

Details

One can't expect coef and vcov methods for arbitrary models to return a vector of p fixed effects model parameters (coef) and corresponding p \times p covariance matrix (vcov).

The coef. and vcov. arguments can be used to define modified coef or vcov methods for a specific model. Methods for lmer and survreg objects are available (internally).

For objects inheriting from class lm the degrees of freedom are determined from model and the corresponding multivariate t distribution is used by all methods to glht objects. By default, the asymptotic multivariate normal distribution is used in all other cases unless df is specified by the user.

Value

An object of class modelparm with elements

coef

model parameters

vcov

covariance matrix of model parameters

df

degrees of freedom


multcomp

Simultaneous Inference in General Parametric Models

v1.4-17
GPL-2
Authors
Torsten Hothorn [aut, cre] (<https://orcid.org/0000-0001-8301-0471>), Frank Bretz [aut], Peter Westfall [aut], Richard M. Heiberger [ctb], Andre Schuetzenmeister [ctb], Susan Scheibe [ctb]
Initial release
2021-04-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.