RATS 10.1
RATS 10.1

PROBIT.RPF is an example of estimation of probit and logit models. It is adapted from exercise 11.7 in Pindyck and Rubinfeld (1998).

 

The dependent variable is YESVM, which is how the person voted on a public school bond issue. The explanatory variables are dummies for whether the individual has children in public schools (PUBLIC1_2 is 1 or 2; PUBLIC3_4 is 3 or 4, PUBLIC_5 is 5 or more), has children in private school (PRIVATE). Other variables are YEARS (years in the community), TEACHER (person is a teacher), LOGINC and LOGPROPTAX (log of household income and log of property tax).

 

This estimates a linear probability model, logit and probit:

 

linreg(title="Linear Probability Model") yesvm

# constant public1_2 public3_4 public5 private years teacher loginc logproptax

*

ddv(dist=logit) yesvm

# constant public1_2 public3_4 public5 private years teacher loginc logproptax

ddv(dist=probit) yesvm

# constant public1_2 public3_4 public5 private years teacher loginc logproptax

 

This tests the significance of the “Children in School” dummies using both a Wald test (by EXCLUDE) and likelihood ratio.

 

exclude(title="Wald Test of Children in School Dummies")

# public1_2 public3_4 public5 private

 

To do the likelihood ratio test, we need the unrestricted and restricted models. We already have the unrestricted model.

 

compute logunres = %logl

 

ddv(dist=probit) yesvm

# constant years teacher loginc logproptax

compute logres=%logl

 

compute lratio=2*(logunres-logres)

cdf(title="LR Test for Children in School Dummies") chisqr lratio 4

 

 

Full Program

 

open data probit.dat
data(org=obs) 1 95 public1_2 public3_4 public5 private $
   years teacher loginc logproptax yesvm
*
*  Linear probability model
*
linreg yesvm
# constant public1_2 public3_4 public5 private years teacher loginc logproptax
*
ddv(dist=logit) yesvm
# constant public1_2 public3_4 public5 private years teacher loginc logproptax
ddv(dist=probit) yesvm
# constant public1_2 public3_4 public5 private years teacher loginc logproptax
*
*  Test whether "Children in School" dummies are significant.
*  Use "Wald" test first.
*
exclude(title="Wald Test of Children in School Dummies")
# public1_2 public3_4 public5 private
*
*  Likelihood ratio test. We already have the unrestricted model.
*
compute logunres = %logl
*
ddv(dist=probit) yesvm
# constant years teacher loginc logproptax
compute logres=%logl
*
*
compute lratio=2*(logunres-logres)
cdf(title="LR Test for Children in School Dummies") chisqr lratio 4

 

Output

 

Linear Regression - Estimation by Linear Probability Model

Dependent Variable YESVM

Usable Observations                        95

Degrees of Freedom                         86

Centered R^2                        0.2121226

R-Bar^2                             0.1388317

Uncentered R^2                      0.7097294

Mean of Dependent Variable       0.6315789474

Std Error of Dependent Variable  0.4849354328

Standard Error of Estimate       0.4500159746

Sum of Squared Residuals         17.416236459

Regression F(8,86)                     2.8943

Significance Level of F             0.0066400

Log Likelihood                       -54.2166

Durbin-Watson Statistic                1.9076

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Constant                     -0.601793045  1.443449504     -0.41691  0.67778079

2.  PUBLIC1_2                     0.069730975  0.143338772      0.48648  0.62786665

3.  PUBLIC3_4                     0.221482770  0.157009294      1.41063  0.16195934

4.  PUBLIC5                       0.116358585  0.256623843      0.45342  0.65138781

5.  PRIVATE                      -0.200486440  0.163067040     -1.22947  0.22224784

6.  YEARS                         0.000532853  0.005316808      0.10022  0.92040257

7.  TEACHER                       0.282277689  0.154075166      1.83208  0.07040135

8.  LOGINC                        0.456984047  0.136871435      3.33878  0.00124538

9.  LOGPROPTAX                   -0.496719240  0.178449012     -2.78354  0.00661003

 

 

Binary Logit - Estimation by Newton-Raphson

Convergence in     7 Iterations. Final criterion was  0.0000000 <=  0.0000100

 

Dependent Variable YESVM

Usable Observations                        95

Degrees of Freedom                         86

Log Likelihood                       -50.0475

Average Likelihood                  0.5904819

Pseudo-R^2                          0.2538925

Log Likelihood(Base)                 -62.5204

LR Test of Coefficients(8)            24.9458

Significance Level of LR            0.0015878

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Constant                     -5.931602054  7.949600050     -0.74615  0.45557620

2.  PUBLIC1_2                     0.429550873  0.708682675      0.60613  0.54443120

3.  PUBLIC3_4                     1.259690718  0.810540634      1.55414  0.12015188

4.  PUBLIC5                       0.526515046  1.311985351      0.40131  0.68819066

5.  PRIVATE                      -1.023695450  0.809889024     -1.26399  0.20623192

6.  YEARS                         0.004268555  0.028257944      0.15106  0.87993090

7.  TEACHER                       2.861628455  1.725378089      1.65855  0.09720620

8.  LOGINC                        2.885670388  0.890998040      3.23869  0.00120078

9.  LOGPROPTAX                   -3.298074357  1.246260255     -2.64638  0.00813591

 

 

Binary Probit - Estimation by Newton-Raphson

Convergence in     6 Iterations. Final criterion was  0.0000081 <=  0.0000100

 

Dependent Variable YESVM

Usable Observations                        95

Degrees of Freedom                         86

Log Likelihood                       -49.8523

Average Likelihood                  0.5916966

Pseudo-R^2                          0.2577210

Log Likelihood(Base)                 -62.5204

LR Test of Coefficients(8)            25.3363

Significance Level of LR            0.0013631

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Constant                     -3.541348266  4.682990221     -0.75622  0.44952020

2.  PUBLIC1_2                     0.274909168  0.437072132      0.62898  0.52936284

3.  PUBLIC3_4                     0.774834354  0.489462462      1.58303  0.11341435

4.  PUBLIC5                       0.322397549  0.795262289      0.40540  0.68518516

5.  PRIVATE                      -0.599412191  0.478639801     -1.25232  0.21045177

6.  YEARS                         0.002428853  0.017017002      0.14273  0.88650269

7.  TEACHER                       1.680510627  0.972635994      1.72779  0.08402590

8.  LOGINC                        1.738724221  0.519018741      3.35002  0.00080805

9.  LOGPROPTAX                   -1.993735567  0.720354248     -2.76772  0.00564507

 

 

Wald Test of Children in School Dummies

 

Null Hypothesis : The Following Coefficients Are Zero

PUBLIC1_2

PUBLIC3_4

PUBLIC5

PRIVATE

Chi-Squared(4)=      5.643749 or F(4,*)=      1.41094 with Significance Level 0.22737982

 

 

Binary Probit - Estimation by Newton-Raphson

Convergence in     6 Iterations. Final criterion was  0.0000037 <=  0.0000100

 

Dependent Variable YESVM

Usable Observations                        95

Degrees of Freedom                         90

Log Likelihood                       -52.8782

Average Likelihood                  0.5731475

Pseudo-R^2                          0.1978593

Log Likelihood(Base)                 -62.5204

LR Test of Coefficients(4)            19.2846

Significance Level of LR            0.0006909

 

    Variable                        Coeff      Std Error      T-Stat      Signif

************************************************************************************

1.  Constant                     -3.975886139  4.388883110     -0.90590  0.36498915

2.  YEARS                         0.004813029  0.016140428      0.29820  0.76555275

3.  TEACHER                       1.905893043  0.950182799      2.00582  0.04487575

4.  LOGINC                        1.572458289  0.480841769      3.27022  0.00107464

5.  LOGPROPTAX                   -1.655119742  0.652190417     -2.53779  0.01115562

 

 

LR Test for Children in School Dummies

Chi-Squared(4)=      6.051680 with Significance Level 0.19532186

 


Copyright © 2025 Thomas A. Doan