| 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 |
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)
-
lmerMod: implementation forlme4::lmer -
glmerMod: implementation forlme4::glmer -
lmerModLmerTest: implementation forlmerTest::lmer -
lme: implementation fornlme::lme -
multinom: implementation fornnet::multinom -
mlm: implementation for multiple responses linear models generated bystats::lmwhen the response is a matrix. It transforms the matrix to a vector, consistent withstats::vcov. -
default: default implementation, simply calls coef(model).
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