Skip to content

Instantly share code, notes, and snippets.

@aegorenkov
Created December 3, 2015 20:27
Show Gist options
  • Save aegorenkov/cc37d7dc67ca7e4dab6a to your computer and use it in GitHub Desktop.
Save aegorenkov/cc37d7dc67ca7e4dab6a to your computer and use it in GitHub Desktop.
. psmatch2 Treated Age Education Black Hispanic Married Nodegree, outcome(RE78) logit
note: Black != 1 predicts failure perfectly
Black dropped and 1 obs not used
note: Hispanic omitted because of collinearity
note: Married omitted because of collinearity
Logistic regression Number of obs = 9
LR chi2(3) = 4.22
Prob > chi2 = 0.2382
Log likelihood = -4.0705415 Pseudo R2 = 0.3416
------------------------------------------------------------------------------
Treated | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Age | .1656105 .1489175 1.11 0.266 -.1262625 .4574835
Education | -.1910432 1.342356 -0.14 0.887 -2.822013 2.439926
Black | 0 (omitted)
Hispanic | 0 (omitted)
Married | 0 (omitted)
Nodegree | -1.790412 4.447845 -0.40 0.687 -10.50803 6.927204
_cons | -1.385701 17.57202 -0.08 0.937 -35.82623 33.05483
------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
Variable Sample | Treated Controls Difference S.E. T-stat
----------------------------+-----------------------------------------------------------
RE78 Unmatched | 4583.09607 5361.27324 -778.177173 5892.41387 -0.13
ATT | 4583.09607 16267.2518 -11684.1557 11228.9762 -1.04
----------------------------+-----------------------------------------------------------
"""
Generalized Linear Model Regression Results
==============================================================================
Dep. Variable: Treated No. Observations: 10
Model: GLM Df Residuals: 5
Model Family: Binomial Df Model: 4
Link Function: logit Scale: 1.0
Method: IRLS Log-Likelihood: -4.0705
Date: Thu, 03 Dec 2015 Deviance: 8.1411
Time: 15:23:33 Pearson chi2: 8.44
No. Iterations: 21
==============================================================================
coef std err z P>|z| [95.0% Conf. Int.]
------------------------------------------------------------------------------
const -5.2165 9639.235 -0.001 1.000 -1.89e+04 1.89e+04
Age 0.1656 0.149 1.112 0.266 -0.126 0.457
Education -0.1910 1.342 -0.142 0.887 -2.822 2.440
Black 3.8308 9639.230 0.000 1.000 -1.89e+04 1.89e+04
Hispanic -9.0474 1.93e+04 -0.000 1.000 -3.78e+04 3.78e+04
Married -9.0474 1.93e+04 -0.000 1.000 -3.78e+04 3.78e+04
Nodegree -1.7904 4.448 -0.403 0.687 -10.508 6.927
==============================================================================
"""
0 1.284746e-01
1 1.481856e-01
2 9.769961e-01
3 1.583729e-10
4 4.016521e-01
5 2.475180e-01
6 9.485158e-01
7 4.095054e-01
8 6.134985e-01
9 1.256538e-01
.1284746544017369
.1481856382160808
.97699610157162
.4016520737466116
.2475180276240239
.9485158035836488
.4095053877411374
.6134984789578997
.1256537831663986
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment