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.
norm.draw(y, ry, x, rank.adjust = TRUE, ...).norm.draw(y, ry, x, rank.adjust = TRUE, ...)
Incomplete data vector of length n
Vector of missing data pattern (FALSE
=missing,
TRUE
=observed)
Matrix (n
x p
) of complete covariates.
Argument that specifies whether NA
's in the
coefficients need to be set to zero. Only relevant when ls.meth = "qr"
AND the predictor matrix is rank-deficient.
Other named arguments.
A list
containing components coef
(least squares estimate),
beta
(drawn regression weights) and sigma
(drawn value of the
residual standard deviation).
Rubin, D.B. (1987). Multiple imputation for nonresponse in surveys. New York: Wiley.