mvregmed.init: Helper function to setup data and parameters for input to...

View source: R/mvregmed.init.R

mvregmed.initR Documentation

Helper function to setup data and parameters for input to mvregmed.fit and mvregmed.grid

Description

Helper function to setup data and parameters for input to mvregmed.fit and mvregmed.grid

Usage

mvregmed.init(dat.obj, x.std = TRUE, med.std = TRUE, y.std = TRUE)

Arguments

dat.obj

A list that is output from mvregmed.dat.check that contains x, mediator, and y.

x.std

logical (TRUE/FALSE) whether to standardize x by dividing by standard devation of x. Note that each column of x will be centered on its mean.

med.std

logical (TRUE/FALSE) whether to standardize mediator by dividing by standard devation of mediator. Note that each column of mediator will be centered on its mean.

y.std

logical (TRUE/FALSE) whether to standardize y by dividing by standard devation of y. Note that each column of y will be centered on its mean.

Details

Center and scale (if declared) x, mediator and y. Then regress each mediator on all x to create residuals that are used to create the residual variance matrix for mediators. This variance matrix is penalized by glasso to obtain a matrix of full rank. Variance matrices for x and y variables are also created. Initial values of paramemeter matrices alpha, beta, and delta are created (all intital values = 0).

Value

A list of items used as input to model fitting.

Author(s)

Daniel Schaid and Jason Sinnwell

References

Schaid DS, Dikilitas O, Sinnwell JP, Kullo I (2022). Penalized mediation models for multivariate data. Genet Epidemiol 46:32-50.

See Also

mvregmed.fit mvregmed.grid


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