mvregmed.grid {regmed} | R Documentation |
Fit a grid of mvregmed models over a vector of lambda penalty parameters
Description
For each lambda in an input vector of values, fit a penalized mvregmed model
Usage
mvregmed.grid(x, mediator, y, lambda.vec, max.outer = 5000,
max.inner = 2, x.std = TRUE, med.std = TRUE, y.std = TRUE,
step.multiplier = 0.5, print.iter = FALSE, max.cor=0.99)
Arguments
x |
matrix with columns representing "exposure" variable (sometimes called instrumental variable) |
mediator |
matrix with columns representing mediator variables |
y |
matrix with columns representing outcome variables |
lambda.vec |
Vector of values of penalty parameter lambda's |
max.outer |
maximum number of outer loop iterations. The outer loop cycles over several inner loops. |
max.inner |
maximum number of iterations for each inner loop. There is an inner loop for each paramemeter in the matrices alpha, beta, delta, and vary. |
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. |
step.multiplier |
In inner loop, the step size is shrunk by the step.multiplier to assure that step size is not too large. Generally, the default of 0.5 works well. |
print.iter |
print iteration number during fitting routine |
max.cor |
maximum correlation within y, x, or mediators, so fitting is more robust |
Value
An object of class mvregmed.grid
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
Examples
data(medsim)
mvfit.grid <- mvregmed.grid(x, med[,1:10], y, lambda.vec=seq(.3, .04, by=-.01))
summary(mvfit.grid)
## plot(mvfit.grid)