estimice: Computes least squares parameters

Description Usage Arguments Details Value Note Author(s)

View source: R/mice.impute.norm.R

Description

This function computes least squares estimates, variance/covariance matrices, residuals and degrees of freedom according to ridge regression, QR decomposition or Singular Value Decomposition. This function is internally called by .norm.draw(), but can be called by any user-specified imputation function.

Usage

1
estimice(x, y, ls.meth = "qr", ridge = 1e-05, ...)

Arguments

x

Matrix (n x p) of complete covariates.

y

Incomplete data vector of length n

ls.meth

the method to use for obtaining the least squares estimates. By default parameters are drawn by means of QR decomposition.

ridge

A small numerical value specifying the size of the ridge used. The default value ridge = 1e-05 represents a compromise between stability and unbiasedness. Decrease ridge if the data contain many junk variables. Increase ridge for highly collinear data.

...

Other named arguments.

Details

When calculating the inverse of the crossproduct of the predictor matrix, problems may arise. For example, taking the inverse is not possible when the predictor matrix is rank deficient, or when the estimation problem is computationally singular. This function detects such error cases and automatically falls back to adding a ridge penalty to the diagonal of the crossproduct to allow for proper calculation of the inverse.

Value

A list containing components c (least squares estimate), r (residuals), v (variance/covariance matrix) and df (degrees of freedom).

Note

This functions adds a star to variable names in the mice iteration history to signal that a ridge penalty was added. In that case, it also adds an entry to loggedEvents.

Author(s)

Gerko Vink, 2018


mice documentation built on Nov. 14, 2020, 5:07 p.m.

Related to estimice in mice...