fimle.lnl {iMediate} | R Documentation |
Full Information Maximum Likelihood Estimates in Linear M-model and Linear Y-model
Description
Parameter estimates in system of correlated linear M-model and linear Y-model with treatment-mediator interaction using the full information maximum likelihood method.
Usage
fimle.lnl(fit.M, fit.Y, treatment, rho = 0, t0 = 0, t1 = 1, m = 1)
Arguments
fit.M |
a fitted model object for mediator. It must be an object
generated by function “ |
fit.Y |
a fitted model object for outcome. It must be an object
generated by function “ |
treatment |
a character string of the name of the treatment variable. This variable takes numerical values |
rho |
a numerical variable specifying the correlation coefficient
between the residual of the M-model and the residual of the Y-model. Its
range is between |
t0 |
a reference value for the treatment |
t1 |
another value for the treatment |
m |
a value specifying the level of the mediator. Used for CDE computation
between the residual of the M-model and the residual of the Y-model. Its
range is between |
Details
P-values are computed from normal distribution.
Value
A list containing the following components:
M.model |
a data frame containing the results for the M-model |
Y.model |
a data frame containing the results for the Y-model |
Effects |
a data frame containing
estimated ACME, ADE, Total Effect, and CDE for treatment values |
Variance |
a matrix of variances and covariances of the parameters estimates |
Author(s)
Kai Wang <kai-wang@uiowa.edu>
References
Wang, K. (2019) Maximum likelihood analysis of mediation models with treatment-mediator interaction. Revision submitted.
Examples
data("jobs", package = "mediation")
fit.M <- lm(job_seek ~ treat + econ_hard + sex + age, data=jobs)
fit.Y <- lm(depress2 ~ treat + job_seek + econ_hard + sex + age, data=jobs)
fimle.lnl(fit.M, fit.Y, "treat", rho=0.2)
fit.M <- lm(job_seek ~ treat + econ_hard + sex + age , data=jobs)
fit.Y <- lm(depress2 ~ treat*job_seek+ econ_hard + sex + age , data=jobs)
fimle.lnl(fit.M, fit.Y, "treat", rho=0.5)