View source: R/GroupIPW_function.R
GroupIPW | R Documentation |
IPW estimator of the group average potential outcome.
GroupIPW( dta, cov_cols, phi_hat, gamma_numer = NULL, alpha, neigh_ind = NULL, trt_col = NULL, out_col = NULL, alpha_re_bound = 10, integral_bound = 10, keep_re_alpha = FALSE, estimand = c("1", "2"), verbose = TRUE )
dta |
Data frame including treatment, outcome and covariates. |
cov_cols |
The indices including the covariates of the ps model. |
phi_hat |
A list with two elements. The first one is a vector of coefficients of the ps, and the second one is the random effect variance. If the second element is 0, the propensity score excludes random effects. |
gamma_numer |
The coefficients of the ps model in the numerator. If left NULL and estimand is 1, the coefficients in phi_hat will be used instead. |
alpha |
The values of alpha for which we want to estimate the group average potential outcome. |
neigh_ind |
List. i^th element is a vector with the row indices of dta that are in cluster i. Can be left NULL. |
trt_col |
If the treatment is not named 'A' in dta, specify the treatment column index. |
out_col |
If the outcome is not named 'Y', specify the outcome column index. |
alpha_re_bound |
The lower and upper end of the values for bi we will look at. Defaults to 10, meaning we will look between - 10 and 10. |
integral_bound |
The number of standard deviations of the random effect that will be used as the lower and upper limit. |
keep_re_alpha |
Logical. If set to TRUE the "random" effect that makes the average probability of treatment equal to alpha will be returned along with the estimated group average potential outcome. |
estimand |
Character, either '1' or '2.' If 1 is specified, then the estimand with numerator depending on covariates is estimated. If estimand is set equal to 2, the numerator considered is the product of Bernoulli. |
verbose |
Whether printing of progress is wanted. Defaults to TRUE. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.