View source: R/getBetaVcovDfList.R
getBetaVcovDfList | R Documentation |
This function returns a list with length equal to a protLM
object supplied as input.
Each element of this list corresponds to a model in the protLM
object and contains in itself a list holding the parameter estimates beta
, the variance-covariance matrix vcov
,
the residual degrees of freedom df
and the residual standard deviation sigma
for this model.
For mixed models, the variance covariance matrix is bias-adjusted, the degrees of freedom are calculated as the trace of the Hat matrix (Ruppert et al., 2003).
getBetaVcovDfList(protLM, exp_unit = NULL, pars_between = NULL, printProgress = FALSE, shiny = FALSE, message = NULL)
protLM |
An object of class |
exp_unit |
The effect that in all models 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 |
printProgress |
A logical indicating whether the R should print a message before calculating the contrasts for each accession. Defaults to |
shiny |
A logical indicating whether this function is being used by a Shiny app. Setting this to |
message |
Only used when |
A list with length equal to the models
object containing list with four elements: (1) a named column matrix beta
containing the parameter estimates, (2) a named square variance-covariance matrix vcov
, (3) a numeric value df
equal to the residual degrees of freedom, (4) a numeric value sigma
equal to the residual standard deviation of the model and (5) NULL
if exp_unit
is left to its default value NULL
, else: a conservative estimate of the degrees of freedom based on the number of experimental units and the degrees of freedom lost due to between-treatment effects..
David Ruppert, M.P. Want and R.J. Carroll. Semiparametric Regression. Cambridge University Press, 2003.
#Load the protLM object protmodel: data(modelRRCPTAC, package="MSqRob") betaVcovDfList <- getBetaVcovDfList(getModels(modelRRCPTAC[1:10], simplify=FALSE)) betaVcovDfList
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.