getBetaVcovDf,glmerMod-method | R Documentation |
This function returns a list containing the parameter estimates beta
, the variance-covariance matrix vcov
,
the residual degrees of freedom df
and the residual standard deviation sigma
based on a mixed effects model fitted by the lmer
function from the lme4 package.
This function will only rarely be called by the end-user. When calculating these values for protLM
objects, we recommend using the function getBetaVcovDfList
.
The variance covariance matrix is bias-adjusted, the degrees of freedom are calculated as the trace of the Hat matrix (Ruppert et al., 2003).
## S4 method for signature 'glmerMod' getBetaVcovDf(model, exp_unit = NULL, pars_between = NULL, Ginvoffset = 1e-18)
model |
A linear mixed effects model object of class |
exp_unit |
The effect in the model that corresponds to the experimental unit. Only needed when one would like to calculate a more conservative way of estimating the degrees of freedom.
The default way of estimating the degrees of freedom ( |
pars_between |
Only used if exp_unit is not |
Ginvoffset |
A numeric value indicating the offset added the the diagonal of the G matrix to prevent near-singularity. Defaults to |
A list containing (1) a named column matrix beta containing the parameter estimates, (2) a named square variance-covariance matrix, (3) a numeric value equal to the residual degrees of freedom and (4) a numeric value equal to the residual standard deviation of the model.
David Ruppert, M.P. Want and R.J. Carroll. Semiparametric Regression. Cambridge University Press, 2003.
data(proteinsCPTAC, package="MSqRob") mixedmodel <- lmer(formula="value ~ 1 + (1|conc) + (1|instrlab) + (1|Sequence)",data=getData(proteinsCPTAC[2])) getBetaVcovDf(mixedmodel)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.