Learn R Programming

mice (version 2.30)

norm.draw: Draws values of beta and sigma by Bayesian linear regression

Description

This function draws random values of beta and sigma under the Bayesian linear regression model as described in Rubin (1987, p. 167). This function can be called by user-specified imputation functions.

Usage

norm.draw(y, ry, x, ridge = 1e-05, ...)

.norm.draw(y, ry, x, ridge = 1e-05, ...)

Arguments

y

Incomplete data vector of length n

ry

Vector of missing data pattern (FALSE=missing, TRUE=observed)

x

Matrix (n x p) of complete covariates.

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.

Value

A list containing components coef (least squares estimate), beta (drawn regression weights) and sigma (drawn value of the residual standard deviation).

References

Rubin, D.B. (1987). Multiple imputation for nonresponse in surveys. New York: Wiley.