View source: R/BootVar_function.R

Using re-sampling of clusters to acquire an estimate of the potential outcome estimator variance.

1 2 3 4 |

`dta` |
The data frame including the observed data set. |

`B` |
Number of bootstrap samples. |

`alpha` |
The values of alpha where the potential outcomes are estimated. |

`ps` |
Character. Whether the propensity score is known or is estimated. Options include 'true', 'est'. Defaults to 'true'. |

`cov_cols` |
Vector of column indices of the covariates used in the propensity score model. |

`phi_hat_true` |
List. Specify if the propensity score is known (ps set to 'true'). Elements of the list are trt_coef and re_var including the coefficients of the propensity score and random effect variance. |

`ps_info_est` |
List of elements for acquiring estimates based on the estimated propensity score. The list includes 1) glm_form: Element of formula class. The formula can be either for a fixed effects model or for a model including random intercepts. 2) ps_with_re: An indicator of whether the propensity score is a mixed model (set to TRUE) or not (set to FALSE). 3) gamma_numer: The coefficients of the covariates in the counterfactual treatment allocation model, and 4) use_control: Set to TRUE or FALSE if you want or do not want additional elements in fitting the mixed model. use_control does not have to be specified. |

`verbose` |
Logical. Whether progress is printed. Defaults to TRUE. |

`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. |

`return_everything` |
Logical. Defaults to FALSE. If set to FALSE, bootstrap estimates of the population average potential outcomes for all values of alpha will be returned. If set to TRUE, additional information will be returned including the chosen clusters at every bootstrap sample, the group-specific estimated average potential outcome, and the random effect variance of the cluster specific intercept. |

gpapadog/Interference documentation built on Oct. 17, 2018, 3:27 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.