Skip to contents

Methods for preparing and working with data sets for fitting multiple linear regression (MLM) models. MLM data sets are implemented in a modular (“object-oriented”) interface, which allows for different types of MLM data (see ‘Details’ for a general specification of MLM data classes).

Usage

prepare_mlm_full_data(X, y, standardize = FALSE)

prepare_mlm_summary_data(z, R, bhat, shat, n, var_y)

Arguments

X

An n x J matrix containing observations about J candidate explanatory variables.

y

A vector of regression outcomes.

standardize

If standardize = TRUE, columns of X are standardized. If variables are in the same units already, you might not wish to standardize. Coefficients are always returned on the original scale.

z

Describe input argument "z" here.

R

Describe input argument "R" here.

bhat

Describe input argument "bhat" here.

shat

Describe input argument "shat" here.

n

Describe input argument "n" here.

var_y

Describe input argument "var_y" here.

Value

An ‘mlm_data’ object. It is a list with the following elements:

n

The number of samples.

nvar

The number of variables.

Item 2

Description of item 2.

Details

Design of MLM data classes. An “MLM data” class has at a minimum the following elements:

  1. A function that creates the MLM data object (e.g., prepare_mlm_full_data). It should return an object of class ‘mlm_data’.