mvregmed.dat.check: Helper function to check x, y, mediator for input to mvregmed...

View source: R/mvregmed.dat.check.R

mvregmed.dat.checkR Documentation

Helper function to check x, y, mediator for input to mvregmed functions

Description

Assure that x, y, mediator are matrices, check column names and fill in if NULL, and reduce x, y, mediator so no missing values among all three matrices.

Usage

mvregmed.dat.check(x, y, mediator, max.cor=0.99)

Arguments

x

matrix with columns representing "exposure" variable (sometimes called instrumental variable)

y

matrix with columns representing outcome variables

mediator

matrix with columns representing mediator variables

max.cor

maximum correlation within y, x, or mediators, so fitting is more robust

Value

list with updated x, y, mediator

Author(s)

Daniel Schaid and Jason Sinnwell

See Also

mvregmed.fit mvregmed.grid


regmed documentation built on Jan. 22, 2023, 1:30 a.m.