# rand.eff.unpenalized: Estimate soft constraint model parameters using the EM... In messi: Mediation Analysis with External Summary-Level Information on Total Effect

 rand.eff.unpenalized R Documentation

## Estimate soft constraint model parameters using the EM algorithm.

### Description

Estimate soft constraint model parameters using the EM algorithm.

### Usage

``````rand.eff.unpenalized(
Y,
M,
A,
C = NULL,
rand.eff.mean,
rand.eff.var,
T.hat.external = T.hat.external,
var.T.hat.external = var.T.hat.external,
err.tol.out = 1e-08,
err.tol.med = 1e-08,
max.itr = 10000
)
``````

### Arguments

 `Y` A (n x 1) continuous outcome vector. `M` A (n x p_m) matrix of mediators. `A` A (n x 1) vector of exposures. `C` A (n x p_c) matrix of confounders and adjustment covariates. If there are no confounders or adjustment covariates set C = NULL. `rand.eff.mean` Mean of the random effects distribution for the internal total effect parameter. `rand.eff.var` Variance of the random effects distribution for the internal total effect parameter. `T.hat.external` External estimate of the total effect. `var.T.hat.external` Estimated variance of the external total effect estimator. `err.tol.out` Termination condition for cyclical coordinate descent algorithm with respect to the outcome model parameters. `err.tol.med` Termination condition for cyclical coordinate descent algorithm with respect to the mediator model parameters. `max.itr` Maximum number of iterations for cyclical coordinate descent algorithm.

### Value

A list containing point estimates of the soft constraint model parameters and an indicator of whether the algorithm converges.

messi documentation built on July 26, 2023, 6:11 p.m.