Package noncompliance

Similar documents
Package RI2by2. October 21, 2016

Package RTransferEntropy

Package jmcm. November 25, 2017

Package clogitboost. R topics documented: December 21, 2015

Package elhmc. R topics documented: July 4, Type Package

Package gtheory. October 30, 2016

Package Perc. R topics documented: December 5, Type Package

Package MultisiteMediation

Package CausalFX. May 20, 2015

Package EMVS. April 24, 2018

Package SEMModComp. R topics documented: February 19, Type Package Title Model Comparisons for SEM Version 1.0 Date Author Roy Levy

Package HIMA. November 8, 2017

Package BayesNI. February 19, 2015

Causal Inference with Counterfactuals

Package Tcomp. June 6, 2018

Package horseshoe. November 8, 2016

Package polypoly. R topics documented: May 27, 2017

Package varband. November 7, 2016

Package scpdsi. November 18, 2018

Package xdcclarge. R topics documented: July 12, Type Package

Package BNN. February 2, 2018

Package invgamma. May 7, 2017

Package BNSL. R topics documented: September 18, 2017

Package bigtime. November 9, 2017

Package NlinTS. September 10, 2018

Package gk. R topics documented: February 4, Type Package Title g-and-k and g-and-h Distribution Functions Version 0.5.

Package effectfusion

Package RcppSMC. March 18, 2018

Package reinforcedpred

Package zic. August 22, 2017

Package aspi. R topics documented: September 20, 2016

Package ltsbase. R topics documented: February 20, 2015

Package sbgcop. May 29, 2018

Package beam. May 3, 2018

Package SimSCRPiecewise

Package dina. April 26, 2017

Package SCEPtERbinary

Package leiv. R topics documented: February 20, Version Type Package

Package SK. May 16, 2018

Package platetools. R topics documented: June 25, Title Tools and Plots for Multi-Well Plates Version 0.1.1

Package DesignLibrary

Package esaddle. R topics documented: January 9, 2017

Package IUPS. February 19, 2015

Package multivariance

Package basad. November 20, 2017

Package experiment. January 18, 2018

Package RSwissMaps. October 3, 2017

Package LIStest. February 19, 2015

Package locfdr. July 15, Index 5

Package r2glmm. August 5, 2017

Package dhsic. R topics documented: July 27, 2017

Package FDRreg. August 29, 2016

Package severity. February 20, 2015

Statistical Analysis of Randomized Experiments with Nonignorable Missing Binary Outcomes

Package covsep. May 6, 2018

Package factorqr. R topics documented: February 19, 2015

Package darts. February 19, 2015

Bounds on Causal Effects in Three-Arm Trials with Non-compliance. Jing Cheng Dylan Small

Sensitivity checks for the local average treatment effect

Identification Analysis for Randomized Experiments with Noncompliance and Truncation-by-Death

Package drgee. November 8, 2016

Package FDRSeg. September 20, 2017

Package rdefra. March 20, 2017

Package face. January 19, 2018

Package netdep. July 10, 2018

Package ShrinkCovMat

Package msu. September 30, 2017

Package MicroMacroMultilevel

Package RZigZag. April 30, 2018

Model Averaging (Bayesian Learning)

Package weightquant. R topics documented: December 30, Type Package

Package robustrao. August 14, 2017

Package SpatPCA. R topics documented: February 20, Type Package

Package thief. R topics documented: January 24, Version 0.3 Title Temporal Hierarchical Forecasting

Package icmm. October 12, 2017

Transparent Parametrizations of Models for Potential Outcomes

Package comparec. R topics documented: February 19, Type Package

Package spatial.gev.bma

Causal Hazard Ratio Estimation By Instrumental Variables or Principal Stratification. Todd MacKenzie, PhD

Package TwoStepCLogit

Package tspi. August 7, 2017

Package gwqs. R topics documented: May 7, Type Package. Title Generalized Weighted Quantile Sum Regression. Version 1.1.0

Package lsei. October 23, 2017

Package TSPred. April 5, 2017

Package FinCovRegularization

Package depth.plot. December 20, 2015

Package SpatialPack. March 20, 2018

Package BGGE. August 10, 2018

Package supernova. February 23, 2018

Package esreg. August 22, 2017

Package IsingSampler

Package hds. December 31, 2016

Package OGI. December 20, 2017

Package funrar. March 5, 2018

Package penmsm. R topics documented: February 20, Type Package

Package fwsim. October 5, 2018

Package flexcwm. R topics documented: July 11, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.0.

Package MTA. R topics documented: May 14, Title Multiscalar Territorial Analysis Version 0.1.2

Package spthin. February 20, 2015

Package spcov. R topics documented: February 20, 2015

Transcription:

Type Package Package noncompliance February 15, 2016 Title Causal Inference in the Presence of Treatment Noncompliance Under the Binary Instrumental Variable Model Version 0.2.2 Date 2016-02-11 A finite-population significance test of the 'sharp' causal null hypothesis that treatment exposure X has no effect on final outcome Y, within the principal stratum of Compliers. A generalized likelihood ratio test statistic is used, and the resulting p-value is exact. Currently, it is assumed that there are only Compliers and Never Takers in the population. Imports data.table (>= 1.9.4), Rcpp (>= 0.12.1) License GPL (>= 3) LazyData TRUE LinkingTo Rcpp RoxygenNote 5.0.1 Suggests testthat URL https://www.stat.washington.edu/~wloh/ NeedsCompilation yes Author Wen Wei Loh [aut, cre], Thomas S. Richardson [aut] Maintainer Wen Wei Loh <wloh@uw.edu> Repository CRAN Date/Publication 2016-02-15 13:47:11 R topics documented: ACE_bounds........................................ 2 ACE_bounds_posterior................................... 3 ACE_bounds_triangle.plot................................. 4 AllColTotalsH0_CONT................................... 5 AllPossiblyObsH0_CONT................................. 5 1

2 ACE_bounds Check_ACDE_bounds................................... 6 Check_IV_ineqs...................................... 7 expand.grid.dt....................................... 8 FindMLE_CONT_H0_hypergeoR............................. 9 FindMLE_CONT_H1_hypergeoR............................. 10 Get_pvalues_CONT..................................... 10 Index 12 ACE_bounds Bounds for the Average Causal Effect (ACE). The empirical bounds for the Average Causal Effect (ACE), under the assumptions of the Instrumental Variable (IV) model. ACE_bounds(, = NA, n_y0x1z0 = NA, n_y1x1z0 = NA, = NA, = NA, = NA, = NA) n_y0x1z0 n_y1x1z0 Number of individuals with Y=0, X=0, Z=0. Alternatively, a vector with elements (either counts, p(y, x, z) or p(y, x z)) in the order of the arguments. Number of individuals with Y=0, X=1, Z=0. Number of individuals with Y=1, X=1, Z=0. The empirical bounds for the ACE. References Richardson, T. S.; Robins, J. M. (2014). ACE Bounds; SEMs with Equilibrium Conditions. Statist. Sci. 29, no. 3, 363-366.. ACE_bounds(158, 14, 0, 0, 52, 12, 23, 78) ACE_bounds(c(158, 14, 0, 0, 52, 12, 23, 78)) ACE_bounds(99, 1027, 30, 233, 84, 935, 31, 422) ACE_bounds(c(99, 1027, 30, 233, 84, 935, 31, 422))

ACE_bounds_posterior 3 ACE_bounds_posterior Posterior bounds for the Average Causal Effect (ACE). The posterior bounds for the Average Causal Effect (ACE) is found based on a transparent reparametrization (see reference below), using a Dirichlet prior. A binary Instrumental Variable (IV) model is assumed here. ACE_bounds_posterior(, = NA, n_y0x1z0 = NA, n_y1x1z0 = NA, = NA, = NA, = NA, = NA, prior, num.sims = 1000) n_y0x1z0 n_y1x1z0 prior num.sims Number of individuals with Y=0, X=0, Z=0. Alternatively, a vector with elements in the order of the arguments. Number of individuals with Y=0, X=1, Z=0. Number of individuals with Y=1, X=1, Z=0. Hyperparameters for the Dirichlet prior for p(y, x z), in the order of the arguments. Number of Monte Carlo draws from the posterior. A data frame with the posterior bounds for the ACE, based only on sampled distributions (from the posterior) that satisfied the IV inequalites. References Richardson, T. S., Evans, R. J., & Robins, J. M. (2011). Transparent parameterizations of models for potential outcomes. Bayesian Statistics, 9, 569-610.

4 ACE_bounds_triangle.plot ACE_bounds_posterior(158, 14, 0, 0, 52, 12, 23, 78, prior = c( rep(1, 2), rep(0, 2), rep(1, 4))) ACE_bounds_posterior(158, 14, 0, 0, 52, 12, 23, 78, prior = c( rep(1/2, 2), rep(0, 2), rep(1/4, 4))) ## Not run: ace.bnds.lipid <- ACE_bounds_posterior(158, 14, 0, 0, 52, 12, 23, 78, prior = c( rep(1, 2), rep(0, 2), rep(1, 4)), num.sims = 2e4) summary(ace.bnds.lipid) ## End(Not run) ACE_bounds_triangle.plot "Triangle" plot of the posterior bounds for the Average Causal Effect (ACE). Plot of the posterior upper bound for the Average Causal Effect (ACE) against the corresponding lower bound. ACE_bounds_triangle.plot(bounds, title.txt) bounds title.txt Posterior bounds from the ACE_bounds_posterior function. Title for the plot. A "triangle" plot. ace.bnds.lipid <- ACE_bounds_posterior(158, 14, 0, 0, 52, 12, 23, 78, prior = c( rep(1, 2), rep(0, 2), rep(1, 4))) ACE_bounds_triangle.plot(ace.bnds.lipid, "Bounds on ACE for Lipid Data") ## Not run: ace.bnds.lipid <- ACE_bounds_posterior(158, 14, 0, 0, 52, 12, 23, 78, prior = c( rep(1, 2), rep(0, 2), rep(1, 4)), num.sims = 2e4) ACE_bounds_triangle.plot(ace.bnds.lipid, "Bounds on ACE for Lipid Data") ## End(Not run)

AllColTotalsH0_CONT 5 AllColTotalsH0_CONT Finds all column totals for Compliers and Never Takers under the sharp null for Compliers. Finds all compatible column totals for Compliers and Never Takers under the sharp null for Compliers, based on an observed dataset. AllColTotalsH0_CONT(.H0,.H0,.H0,.H0,.H0,.H0).H0.H0.H0.H0.H0.H0 Number of individuals with Y=0, X=0, Z=0. A data.table with all possible combinations of the column totals for Compliers and Never Takers under the sharp null for Compliers. AllColTotalsH0_CONT(158, 14, 52, 12, 23, 78) AllPossiblyObsH0_CONT Finite population sample space given an observed dataset. Sample space of all possibly observable datasets given an observed dataset, assuming only Compliers and Never Takers in the population. AllPossiblyObsH0_CONT(,,,,,, findglr = FALSE)

6 Check_ACDE_bounds findglr Number of individuals with Y=0, X=0, Z=0. Whether or not to find the generalized likelihood ratio (GLR) test statistic for each possible observable dataset. All possibly observable datasets in a data.table format. AllPossiblyObsH0_CONT(16, 1, 5, 1, 2, 8) AllPossiblyObsH0_CONT(16, 1, 5, 1, 2, 8, findglr=true) Check_ACDE_bounds Bounds for the Average Controlled Direct Effect (ACDE). The empirical bounds for the Average Controlled Direct Effect (ACDE) within the principal strata of Always Takers and Never Takers, under the assumption of monotonicity (no Defiers). These are equivalent to an empirical check of the Instrumental Variable (IV) inequalities (see references below). Check_ACDE_bounds(, = NA, n_y0x1z0 = NA, n_y1x1z0 = NA, = NA, = NA, = NA, = NA, iv.ineqs = FALSE) n_y0x1z0 n_y1x1z0 Number of individuals with Y=0, X=0, Z=0. Alternatively, a vector with elements (either counts, p(y, x, z) or p(y, x z)) in the order of the arguments. Number of individuals with Y=0, X=1, Z=0. Number of individuals with Y=1, X=1, Z=0.

Check_IV_ineqs 7 iv.ineqs Whether to return the empirical bounds or the IV inequalities (TRUE). The empirical bounds for the ACDE among Always Takers and Never Takers, or the empirical IV inequalities. References Richardson, T. S., Evans, R. J., & Robins, J. M. (2011). Transparent parameterizations of models for potential outcomes. Bayesian Statistics, 9, 569-610. A. Balke and J. Pearl. (1997). Bounds on treatment effects from studies with imperfect compliance. Journal of the American Statistical Association, 1171-1176. Check_ACDE_bounds(99, 1027, 30, 233, 84, 935, 31, 422) Check_ACDE_bounds(c(99, 1027, 30, 233, 84, 935, 31, 422)) Check_ACDE_bounds(99, 1027, 30, 233, 84, 935, 31, 422, iv.ineqs=true) Check_ACDE_bounds(c(99, 1027, 30, 233, 84, 935, 31, 422), iv.ineqs=true) Check_IV_ineqs Check of the Instrumental Variable (IV) inequalities. This checks whether the Instrumental Variable (IV) inequalities for a binary dataset have been satisfied empirically, assuming only Randomization and Exclusion Restriction for the principal strata of Always Takers and Never Takers. Monotonicity (no Defiers) is not assumed here. Check_IV_ineqs(, = NA, n_y0x1z0 = NA, n_y1x1z0 = NA, = NA, = NA, = NA, = NA, verbose = FALSE) n_y0x1z0 n_y1x1z0 Number of individuals with Y=0, X=0, Z=0. Alternatively, a vector with elements (either counts, p(y, x, z) or p(y, x z)) in the order of the arguments. Number of individuals with Y=0, X=1, Z=0. Number of individuals with Y=1, X=1, Z=0.

8 expand.grid.dt verbose Whether to return all the IV inequalities (TRUE) or just a check that the inequalities have been satisfied empirically. A list of all the IV inequalities or a check of whether all the inequalities have been satisfied empirically. References A. Balke and J. Pearl. (1997). Bounds on treatment effects from studies with imperfect compliance. Journal of the American Statistical Association, 1171-1176., B. Bonet. (2001). Instrumentality tests revisited. In Proceedings of the Seventeenth Conference on Uncertainty in Artificial Intelligence, 48-55. Check_IV_ineqs(158, 14, 0, 0, 52, 12, 23, 78) Check_IV_ineqs(c(158, 14, 0, 0, 52, 12, 23, 78)) Check_IV_ineqs(158, 14, 0, 0, 52, 12, 23, 78, TRUE) Check_IV_ineqs(99, 1027, 30, 233, 84, 935, 31, 422) Check_IV_ineqs(c(99, 1027, 30, 233, 84, 935, 31, 422)) Check_IV_ineqs(99, 1027, 30, 233, 84, 935, 31, 422, TRUE) expand.grid.dt Expand.grid using the data.table package. Expand.grid (expand.grid) using the data.table package, with up to 4 supplied vectors. expand.grid.dt(seq1, seq2, seq3 = NA, seq4 = NA, col.names = NA) seq1 seq2 seq3 seq4 col.names Vector of values. Vector of values. Vector of values. Vector of values. Names of columns.

FindMLE_CONT_H0_hypergeoR 9 A data.table with all possible combinations (Cartesian product) of the elements in the input vector sequences. expand.grid.dt(1:10, 100:110) expand.grid.dt(1:10, 100:110, col.names=c("a", "B")) expand.grid.dt(1:10, 100:110, 11:13, 1:2) FindMLE_CONT_H0_hypergeoR Maximum Likelihood Estimate under the sharp null for Compliers. Find the maximum likelihood estimate of the 2 by 4 contingency table assuming only Compliers and Never Takers in the population, under the sharp null for Compliers and with the multivariate hypergeometric sampling distribution. FindMLE_CONT_H0_hypergeoR(,,,,, ) Number of individuals with Y=0, X=0, Z=0. The maximum likelihood under the sharp null for Compliers, and the corresponding (possibly nonunique) 2 by 4 contingency table. FindMLE_CONT_H0_hypergeoR(158, 14, 52, 12, 23, 78)

10 Get_pvalues_CONT FindMLE_CONT_H1_hypergeoR Maximum Likelihood Estimate without assuming the sharp null for Compliers. Find the maximum likelihood estimate of the 2 by 4 contingency table assuming only Compliers and Never Takers in the population, with the multivariate hypergeometric sampling distribution. FindMLE_CONT_H1_hypergeoR(,,,,, ) Number of individuals with Y=0, X=0, Z=0. The maximum likelihood, and the corresponding (possibly non-unique) 2 by 4 contingency table. FindMLE_CONT_H1_hypergeoR(158, 14, 52, 12, 23, 78) Get_pvalues_CONT Exact finite population p-values under the sharp null for Compliers. Find the exact population-specific p-values under the sharp null for Compliers, for each compatible population with only Compliers and Never Takers. Get_pvalues_CONT(obs_y0x0z0, obs_y1x0z0, obs_y0x0z1, obs_y1x0z1, obs_y0x1z1, obs_y1x1z1, useglr = FALSE, justexactp = TRUE, maxonly = TRUE)

Get_pvalues_CONT 11 obs_y0x0z0 obs_y1x0z0 obs_y0x0z1 obs_y1x0z1 obs_y0x1z1 obs_y1x1z1 useglr justexactp maxonly Number of observed individuals with Y=0, X=0, Z=0. Number of observed individuals with Y=1, X=0, Z=0. Number of observed individuals with Y=0, X=0, Z=1. Number of observed individuals with Y=1, X=0, Z=1. Number of observed individuals with Y=0, X=1, Z=1. Number of observed individuals with Y=1, X=1, Z=1. Whether or not to use the generalized likelihood ratio (GLR) test statistic. Just find the total probability of the critical region for each population, or the total probabilty of the sampling distribution (which should be 1). Whether to return only the maximum population-specific p-value, or all the population-specific p-values. Exact population-specific p-value(s) for a given observed dataset. References Loh, W. W., & Richardson, T. S. (2015). A Finite Population Likelihood Ratio Test of the Sharp Null Hypothesis for Compliers. In Thirty-First Conference on Uncertainty in Artificial Intelligence. [paper] Get_pvalues_CONT(16, 1, 5, 1, 2, 8) Get_pvalues_CONT(16, 1, 5, 1, 2, 8, TRUE, FALSE) Get_pvalues_CONT(16, 1, 5, 1, 2, 8, TRUE, FALSE, FALSE) Get_pvalues_CONT(158, 14, 52, 12, 23, 78)

Index ACE_bounds, 2 ACE_bounds_posterior, 3 ACE_bounds_triangle.plot, 4 AllColTotalsH0_CONT, 5 AllPossiblyObsH0_CONT, 5 Check_ACDE_bounds, 6 Check_IV_ineqs, 7 data.table, 8 expand.grid, 8 expand.grid.dt, 8 FindMLE_CONT_H0_hypergeoR, 9 FindMLE_CONT_H1_hypergeoR, 10 Get_pvalues_CONT, 10 12