zelig-probit

Probit Regression for Dichotomous Dependent Variables

Use probit regression to model binary dependent variables specified as a function of a set of explanatory variables.

Syntax

With reference classes:

z5 <- zprobit$new()
z5$zelig(Y ~ X1 + X ~ X, weights = w, data = mydata)
z5$setx()
z5$sim()

With the Zelig 4 compatibility wrappers:

z.out <- zelig(Y ~ X1 + X2, model = "probit", weights = w, data = mydata)
x.out <- setx(z.out)
s.out <- sim(z.out, x = x.out, x1 = NULL)

Example

Attach the sample turnout dataset:

data(turnout)

Estimate parameter values for the probit regression:

z.out <- zelig(vote ~ race + educate, model = "probit", data = turnout)
## Warning in readLines(zeligmixedmodels): incomplete final line found on
## '/usr/lib64/R/library/ZeligMultilevel/JSON/zelig5mixedmodels.json'
## How to cite this model in Zelig:
##   R Core Team. 2007.
##   probit: Probit Regression for Dichotomous Dependent Variables
##   in Christine Choirat, Christopher Gandrud, James Honaker, Kosuke Imai, Gary King, and Olivia Lau,
##   "Zelig: Everyone's Statistical Software," http://zeligproject.org/
summary(z.out)
## Model:
##
## Call:
## z5$zelig(formula = vote ~ race + educate, data = turnout)
##
## Deviance Residuals:
##    Min      1Q  Median      3Q     Max
## -2.259  -0.898   0.671   0.723   1.704
##
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.72595    0.12864   -5.64  1.7e-08
## racewhite    0.29908    0.08465    3.53  0.00041
## educate      0.09712    0.00957   10.15  < 2e-16
##
## (Dispersion parameter for binomial family taken to be 1)
##
##     Null deviance: 2266.7  on 1999  degrees of freedom
## Residual deviance: 2136.0  on 1997  degrees of freedom
## AIC: 2142
##
## Number of Fisher Scoring iterations: 4
##
## Next step: Use 'setx' method

Set values for the explanatory variables to their default values.

x.out <- setx(z.out)

Simulate quantities of interest from the posterior distribution.

s.out <- sim(z.out, x = x.out)
summary(s.out)
plot(s.out)

Graphs of Quantities of Interest for Zelig-probit

Model

Let be the observed binary dependent variable for observation i which takes the value of either 0 or 1.

  • The stochastic component is given by

    where .

  • The systematic component is

    where is the cumulative distribution function of the Normal distribution with mean 0 and unit variance.

Quantities of Interest

  • The expected value (qi$ev) is a simulation of predicted probability of success

    given a draw of \beta from its sampling distribution.

  • The predicted value (qi$pr) is a draw from a Bernoulli distribution with mean .

  • The first difference (qi$fd) in expected values is defined as

  • The risk ratio (qi$rr) is defined as

  • In conditional prediction models, the average expected treatment effect (att.ev) for the treatment group is

    where is a binary explanatory variable defining the treatment () and control () groups. Variation in the simulations are due to uncertainty in simulating , the counterfactual expected value of for observations in the treatment group, under the assumption that everything stays the same except that the treatment indicator is switched to .

  • In conditional prediction models, the average predicted treatment effect (att.pr) for the treatment group is

    where is a binary explanatory variable defining the treatment () and control () groups. Variation in the simulations are due to uncertainty in simulating , the counterfactual predicted value of for observations in the treatment group, under the assumption that everything stays the same except that the treatment indicator is switched to .

Output Values

The Zelig object stores fields containing everything needed to rerun the Zelig output, and all the results and simulations as they are generated. In addition to the summary commands demonstrated above, some simply utility functions (known as getters) provide easy access to the raw fields most commonly of use for further investigation.

In the example above z.out$getcoef() returns the estimated coefficients, z.out$getvcov() returns the estimated covariance matrix, and z.out$getpredict() provides predicted values for all observations in the dataset from the analysis.

See also

The probit model is part of the stats package by the R Core Team. Advanced users may wish to refer to help(glm) and help(family).

R Core Team (2017). R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria. <URL: https://www.R-project.org/>.