View source: R/EM_function_bernoulliY.R
EM_function_bernoulliY | R Documentation |
Function is for cases with Y \sim Bernoulli
and with no interaction term
in the outcome mechanism.
EM_function_bernoulliY(
param_current,
obs_mediator,
obs_outcome,
X,
Z,
c_matrix,
sample_size,
n_cat
)
param_current |
A numeric vector of regression parameters, in the order
|
obs_mediator |
A numeric vector of indicator variables (1, 2) for the observed
mediator |
obs_outcome |
A vector containing the outcome variables of interest. There
should be no |
X |
A numeric design matrix for the true mediator mechanism. |
Z |
A numeric design matrix for the observation mechanism. |
c_matrix |
A numeric matrix of covariates in the true mediator and outcome mechanisms.
|
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, |
EM_function_bernoulliY
returns a numeric vector of updated parameter
estimates from one iteration of the EM-algorithm.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.