View source: R/theta_optim_XM.R
theta_optim_XM | R Documentation |
Likelihood Function for Normal Outcome Mechanism with a Binary Mediator and an Interaction Term
theta_optim_XM(param_start, m, x, c_matrix, outcome, sample_size, n_cat)
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, |
theta_optim_XM
returns a numeric value of the (negative) log-likelihood function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.