theta_optim_XM {COMMA} | R Documentation |
Likelihood Function for Normal Outcome Mechanism with a Binary Mediator and an Interaction Term
Description
Likelihood Function for Normal Outcome Mechanism with a Binary Mediator and an Interaction Term
Usage
theta_optim_XM(param_start, m, x, c_matrix, outcome, sample_size, n_cat)
Arguments
param_start |
A numeric vector or column matrix of starting values for the |
m |
vector or column matrix containing the true binary mediator or the
E-step weight (with values between 0 and 1). There
should be no |
x |
A vector or column matrix of the predictor or exposure of interest. There
should be no |
c_matrix |
A numeric matrix of covariates in the true mediator and outcome mechanisms.
|
outcome |
A vector containing the outcome variables of interest. There
should be no |
sample_size |
An integer value specifying the number of observations in the sample.
This value should be equal to the number of rows of the design matrix, |
n_cat |
The number of categorical values that the true outcome, |
Value
theta_optim_XM
returns a numeric value of the (negative) log-likelihood function.