View source: R/06_calc_myreg_helpers_coef.R
| theta_hat | R Documentation |
This function extracts coef from yreg_fit and 3s with zeros appropriately to create a named vector consistently having the following elements:
(Intercept) (a zero element is added for yreg = "survCox" for which no intercept is estimated (the baseline hazard is left unspecified)),
avar,
mvar,
avar:mvar (a zero element is added when interaction = FALSE).
cvar (this part is eliminated when cvar = NULL),
emm_ac_yreg (this part is eliminated when emm_ac_yreg = NULL),
emm_mc_yreg (this part is eliminated when emm_mc_yreg = NULL).
theta_hat(
yreg,
yreg_fit,
avar,
mvar,
cvar,
emm_ac_yreg = NULL,
emm_mc_yreg = NULL,
interaction
)
yreg |
A character vector of length 1. Outcome regression type: |
yreg_fit |
Model fit object for yreg (outcome model). |
avar |
A character vector of length 1. Treatment variable name. |
mvar |
A character vector of length 1. Mediator variable name. |
cvar |
A character vector of length > 0. Covariate names. Use |
emm_ac_yreg |
A character vector of length > 0. Effect modifiers names. The covariate vector in treatment-covariate product term in the outcome model. |
emm_mc_yreg |
A character vector of length > 0. Effect modifiers names. The covariate vector in mediator-covariate product term in outcome model. |
interaction |
A logical vector of length 1. The presence of treatment-mediator interaction in the outcome model. Default to TRUE. |
A named numeric vector of coefficients.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.