Description Usage Arguments Value
Updating the coefficients that use the within experiment likelihood: intercept and coefficients of the exposure model, and the coefficients of the covariates in the outcome model.
1 2 3 | UpdateCovCoef(dta, cov_cols, current_cutoffs, current_coefs,
current_alphas, current_vars, mu_priorX, Sigma_priorX, mu_priorY,
Sigma_priorY)
|
dta |
A data set including a column of the exposure of interest as X, the outcome of interest as Y, and all potential confounders as C1, C2, ... |
cov_cols |
The indices of the columns in dta corresponding to the potential confounders. |
current_cutoffs |
Numeric of length K. The current values for the points in the experiment configuraiton. |
current_coefs |
The current coefficients of the MCMC. Three dimensional array with dimensions corresponding to exposure/outcome model, experiment, and coefficients (intercept, slope, covariates). |
current_alphas |
Array of dimensions that correspond to the exposure or outcome model, the experiment, and potential confounding. Entries are 0/1 corresponding to exclusion/inclusion of the covaraite in the corresponding model of the experiment. |
current_vars |
Matrix. Rows correspond to exposure/outcome model, and columns to experiments. Entries are the current variances. |
mu_priorX |
The mean of the normal prior on the coefficients of the exposure model. Numeric vector of length equal to the number of potential confounders + 1 with the first entry corresponding to the intercept. |
Sigma_priorX |
Covariance matrix of the normal prior on the regression coefficients of the exposure model. |
mu_priorY |
The mean of the normal prior on the coefficients of the outcome model. Numeric vector with entries corresponding to intercept, slope of exposure, and potential covariates. |
Sigma_priorY |
The covariance matrix of the normal prior on the regression coefficients of the outcome model. |
Array of dimensions that correspond to the exposure/outcome model, experiment, and coefficients (intercept, covariates). The intercepts of the outcome model are NA, since they are not updated with this function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.