update_protLM: Update protLM object with new parameter variances and...

View source: R/squeezePars.R

update_protLMR Documentation

Update protLM object with new parameter variances and residual variances

Description

This function changes the parameter variances theta of all lmerMod objects present in the model slot of a protLM object to a given vector and updates these models accordingly.

Usage

update_protLM(protLM, theta, sigmas = NULL, df_sigmas = NULL,
  printProgress = FALSE, shiny = FALSE, message = NULL, ...)

Arguments

theta

A numeric matrix wherein each column contains parameter variances (theta values) that will replace the theta values in all lmerMod objects present in the model slot of the protLM object. Column names should be corresponding to random effects and/or ridge groups (e.g. "ridgeGroup.1") present in the model.

sigmas

A vector of length equal to the protLM object containing residual variances that should replace the existing residual variances in each object present in the model slot of the protLM object.

df_sigmas

A vector of length equal to the protLM object containing residual degrees of freedom that should replace the existing residual degrees of freedom in each object present in the model slot of the protLM object.

printProgress

A logical indicating whether the R should print a message before performing each preprocessing step. Defaults to FALSE.

shiny

A logical indicating whether this function is being used by a Shiny app. Setting this to TRUE only works when using this function in a Shiny app and allows for dynamic progress bars. Defaults to FALSE.

message

Only used when printProgress=TRUE and shiny=TRUE. A single-element character vector: the message to be displayed to the user during the updating of the models, or NULL to hide the current message (if any).

...

Other arguments to be passed to the update.lmerMod function.

object

A protLM object of which the all of its lmerMod object in the model slot should have one or more parameter parameter variances theta replaced by given theta values. Optionally residual variances can also be updated.

Value

A lmerMod object of which the parameter variances are replaced by the ones given in the theta input argument.

References

Bolker (2016). Wald errors of variances, https://rpubs.com/bbolker/waldvar

Examples

....

ludgergoeminne/MSqRob documentation built on Jan. 11, 2023, 1:32 p.m.