Learn R Programming

SimpleTable (version 0.1-2)

ElicitPsi: Prior Elicitation for Analysis of 2 x 2 in Presence of Unmeasured Confounding

Description

ElicitPsi provides a Tcl/Tk graphical user interface that allows users to vary the parameters of the beta prior distributions over the $psi$ parameters (the potential outcome distributions within cells of the $(X,Y)$ table) used by analyze2x2. See Quinn (2008).

Usage

ElicitPsi(C00, C01, C10, C11, maxvalue = 100, a00 = 0.25, a01 = 0.25, a10 = 0.25, a11 = 0.25, nsamp = 50000, output.object = "output.SimpleTable")

Arguments

C00
The number of observations in $(X=0, Y=0)$ cell of the table. In other words, the number of observations that received control and failed.
C01
The number of observations in $(X=0, Y=1)$ cell of the table. In other words, the number of observations that received control and succeeded.
C10
The number of observations in $(X=1, Y=0)$ cell of the table. In other words, the number of observations that received treatment and failed.
C11
The number of observations in $(X=1, Y=1)$ cell of the table. In other words, the number of observations that received treatment and succeeded.
maxvalue
The largest possible value for the parameters of the beta priors that are being elicited. This value is used to set the slider bars appropriately.
a00
One of four parameters (with a01, a10, and a11 governing the Dirichlet prior for $theta$ (the joint probabilities of $X$ and $Y$). This prior has the effect of adding a00 - 1 observations to the $(X=0, Y=0)$ cell of the table.
a01
One of four parameters (with a00, a10, and a11 governing the Dirichlet prior for $theta$ (the joint probabilities of $X$ and $Y$). This prior has the effect of adding a01 - 1 observations to the $(X=0, Y=1)$ cell of the table.
a10
One of four parameters (with a00, a01, and a11 governing the Dirichlet prior for $theta$ (the joint probabilities of $X$ and $Y$). This prior has the effect of adding a10 - 1 observations to the $(X=1, Y=0)$ cell of the table.
a11
One of four parameters (with a00, a01, and a10 governing the Dirichlet prior for $theta$ (the joint probabilities of $X$ and $Y$). This prior has the effect of adding a11 - 1 observations to the $(X=1, Y=1)$ cell of the table.
nsamp
Size of the Monte Carlo sample used to summarize the posterior.
output.object
String giving the name of the output object the result are sent to. Default is output.SimpleTable.

Value

While ElicitPsi does not formally have a return value, it does put a number of objects in the global environment. These objects are:
b00
One of two parameters (with c00) governing the beta prior for the distribution of potential outcome types within the $(X=0, Y=0)$ cell of the table. This prior adds the same information as would be gained from observing b00 - 1 Helped units in the $(X=0, Y=0)$ cell of the table.
b01
One of two parameters (with c01) governing the beta prior for the distribution of potential outcome types within the $(X=0, Y=1)$ cell of the table. This prior adds the same information as would be gained from observing b01 - 1 Always Succeed units in the $(X=0, Y=1)$ cell of the table.
b10
One of two parameters (with c10) governing the beta prior for the distribution of potential outcome types within the $(X=1, Y=0)$ cell of the table. This prior adds the same information as would be gained from observing b10 - 1 Hurt units in the $(X=1, Y=0)$ cell of the table.
b11
One of two parameters (with c11) governing the beta prior for the distribution of potential outcome types within the $(X=1, Y=1)$ cell of the table. This prior adds the same information as would be gained from observing b11 - 1 Always Succeed units in the $(X=1, Y=1)$ cell of the table.
c00
One of two parameters (with b00) governing the beta prior for the distribution of potential outcome types within the $(X=0, Y=0)$ cell of the table. This prior adds the same information as would be gained from observing b00 - 1 Never Succeed units in the $(X=0, Y=0)$ cell of the table.
c01
One of two parameters (with b01) governing the beta prior for the distribution of potential outcome types within the $(X=0, Y=1)$ cell of the table. This prior adds the same information as would be gained from observing c01 - 1 Hurt units in the $(X=0, Y=1)$ cell of the table.
c10
One of two parameters (with b10) governing the beta prior for the distribution of potential outcome types within the $(X=1, Y=0)$ cell of the table. This prior adds the same information as would be gained from observing c10 - 1 Never Succeed units in the $(X=1, Y=0)$ cell of the table.
c11
One of two parameters (with b11) governing the beta prior for the distribution of potential outcome types within the $(X=1, Y=1)$ cell of the table. This prior adds the same information as would be gained from observing b11 - 1 Helped units in the $(X=1, Y=1)$ cell of the table.
In addition, if the user presses the Calculate Effects button, analyze2x2 is called with the current values of prior parameters. The output from analyze2x2 is written to an object in the global environment with the name given by the output.object argument (see argument list above).

Details

See analyze2x2 and Quinn (2008) for details regarding the model and prior specification used.

References

Quinn, Kevin M. 2008. ``What Can Be Learned from a Simple Table: Bayesian Inference and Sensitivity Analysis for Causal Effects from 2 x 2 and 2 x 2 x K Tables in the Presence of Unmeasured Confounding.'' Working Paper.

See Also

ConfoundingPlot, analyze2x2xK, analyze2x2xK, summary.SimpleTable, plot.SimpleTable

Examples

Run this code
## Not run: 
# ## Example from Quinn (2008)
# ## (original data from Oliver and Wolfinger. 1999. 
# ##   ``Jury Aversion and Voter Registration.'' 
# ##     American Political Science Review. 93: 147-152.)
# ##
# ##        Y=0       Y=1
# ## X=0    19        143
# ## X=1    114       473
# ##
# 
# ElicitPsi(C00=19, C01=143, C10=114, C11=473, output.object="output.2x2")
# 
# ## End(Not run)

Run the code above in your browser using DataLab