schooling.log 7/5/2006

Similar documents
Bivariate (Simple) Regression Analysis

Linear regression Number of obs = 6,866 F(16, 326) = Prob > F = R-squared = Root MSE =

Stata Training. AGRODEP Technical Note 08. April Manuel Barron and Pia Basurto

Health Disparities (HD): It s just about comparing two groups

Stata Session 2. Tarjei Havnes. University of Oslo. Statistics Norway. ECON 4136, UiO, 2012

Lab 2: OLS regression

Panel Data 4: Fixed Effects vs Random Effects Models

optimization_machine_probit_bush106.c

Source:

Stata versions 12 & 13 Week 4 Practice Problems

piecewise ginireg 1 Piecewise Gini Regressions in Stata Jan Ditzen 1 Shlomo Yitzhaki 2 September 8, 2017

Introduction to STATA 6.0 ECONOMICS 626

. predict mod1. graph mod1 ed, connect(l) xlabel ylabel l1(model1 predicted income) b1(years of education)

Week 4: Simple Linear Regression III

THE LINEAR PROBABILITY MODEL: USING LEAST SQUARES TO ESTIMATE A REGRESSION EQUATION WITH A DICHOTOMOUS DEPENDENT VARIABLE

Introduction to Hierarchical Linear Model. Hsueh-Sheng Wu CFDR Workshop Series January 30, 2017

Week 5: Multiple Linear Regression II

range: [1,20] units: 1 unique values: 20 missing.: 0/20 percentiles: 10% 25% 50% 75% 90%

SOCY7706: Longitudinal Data Analysis Instructor: Natasha Sarkisian. Panel Data Analysis: Fixed Effects Models

ECON Introductory Econometrics Seminar 4

texdoc 2.0 An update on creating LaTeX documents from within Stata Example 2

How fixed mobile usage interact? Does FTTH deployment. influence the interaction?

Week 10: Heteroskedasticity II

Creating LaTeX and HTML documents from within Stata using texdoc and webdoc. Example 2

May 24, Emil Coman 1 Yinghui Duan 2 Daren Anderson 3

Week 9: Modeling II. Marcelo Coca Perraillon. Health Services Research Methods I HSMP University of Colorado Anschutz Medical Campus

Week 4: Simple Linear Regression II

/23/2004 TA : Jiyoon Kim. Recitation Note 1

Two-Stage Least Squares

Introduction to Programming in Stata

THE UNIVERSITY OF BRITISH COLUMBIA FORESTRY 430 and 533. Time: 50 minutes 40 Marks FRST Marks FRST 533 (extra questions)

Introduction to Stata: An In-class Tutorial

Heteroskedasticity and Homoskedasticity, and Homoskedasticity-Only Standard Errors

Conditional and Unconditional Regression with No Measurement Error

Instruction on JMP IN of Chapter 19

Data Management 2. 1 Introduction. 2 Do-files. 2.1 Ado-files and Do-files

Instrumental variables, bootstrapping, and generalized linear models

Week 11: Interpretation plus

Lecture 3: The basic of programming- do file and macro

RUDIMENTS OF STATA. After entering this command the data file WAGE1.DTA is loaded into memory.

CH5: CORR & SIMPLE LINEAR REFRESSION =======================================

set mem 10m we can also decide to have the more separation line on the screen or not when the software displays results: set more on set more off

Stat 500 lab notes c Philip M. Dixon, Week 10: Autocorrelated errors

PubHlth 640 Intermediate Biostatistics Unit 2 - Regression and Correlation. Simple Linear Regression Software: Stata v 10.1

1 Downloading files and accessing SAS. 2 Sorting, scatterplots, correlation and regression

Factorial ANOVA. Skipping... Page 1 of 18

Stat 5100 Handout #6 SAS: Linear Regression Remedial Measures

Instrumental Variable Regression

Centering and Interactions: The Training Data

An Introductory Guide to Stata

Computing Murphy Topel-corrected variances in a heckprobit model with endogeneity

Review of Stata II AERC Training Workshop Nairobi, May 2002

25 Working with categorical data and factor variables

ST512. Fall Quarter, Exam 1. Directions: Answer questions as directed. Please show work. For true/false questions, circle either true or false.

Stat 401 B Lecture 26

Page 1. Notes: MB allocated to data 2. Stata running in batch mode. . do 2-simpower-varests.do. . capture log close. .

THIS IS NOT REPRESNTATIVE OF CURRENT CLASS MATERIAL. STOR 455 Midterm 1 September 28, 2010

xsmle - A Command to Estimate Spatial Panel Data Models in Stata

Cell means coding and effect coding

Confirmatory Factor Analysis on the Twin Data: Try One

Within-Cases: Multivariate approach part one

CSC 328/428 Summer Session I 2002 Data Analysis for the Experimenter FINAL EXAM

Linear Model Selection and Regularization. especially usefull in high dimensions p>>100.

MODULE ONE, PART THREE: READING DATA INTO STATA, CREATING AND RECODING VARIABLES, AND ESTIMATING AND TESTING MODELS IN STATA

Package tonymisc. R topics documented: February 15, Title Functions for Econometrics Output. Version Date

Introduction to Stata Session 3

STA431 Handout 9 Double Measurement Regression on the BMI Data

Performing Cluster Bootstrapped Regressions in R

Missing Data Part II: Multiple Imputation Richard Williams, University of Notre Dame, Last revised January 24, 2015

Reproducible Research: Weaving with Stata

ECON Stata course, 3rd session

Box-Cox Transformation for Simple Linear Regression

tm / / / / / / / / / / / / Statistics/Data Analysis

CDAA No. 4 - Part Two - Multiple Regression - Initial Data Screening

Introduction to SAS proc calis

Introduction to mixed-effects regression for (psycho)linguists

Example 1 of panel data : Data for 6 airlines (groups) over 15 years (time periods) Example 1

Lab #13 - Resampling Methods Econ 224 October 23rd, 2018

Orifice Flow Meter

Factorial ANOVA with SAS

Economics 561: Economics of Labour (Industrial Relations) Empirical Assignment #2 Due Date: March 7th

INTRODUCTION TO PANEL DATA ANALYSIS

Introduction to SAS proc calis

Robust Linear Regression (Passing- Bablok Median-Slope)

Compare Linear Regression Lines for the HP-67

STAT:5201 Applied Statistic II

Important Things to Know about Stata

22s:152 Applied Linear Regression

Dr. Barbara Morgan Quantitative Methods

Stat 5100 Handout #19 SAS: Influential Observations and Outliers

5.5 Regression Estimation

DS Machine Learning and Data Mining I. Alina Oprea Associate Professor, CCIS Northeastern University

Chapter 7 Heteroscedastic Tobit Model Code

Programming MLE models in STATA 1

Subset Selection in Multiple Regression

Baruch College STA Senem Acet Coskun

Beta-Regression with SPSS Michael Smithson School of Psychology, The Australian National University

Compare Linear Regression Lines for the HP-41C

Statistics Lab #7 ANOVA Part 2 & ANCOVA

Repeated Measures Part 4: Blood Flow data

Transcription:

----------------------------------- log: C:\dnb\schooling.log log type: text opened on: 5 Jul 2006, 09:03:57. /* schooling.log */ > use schooling;. gen age2=age76^2;. /* OLS (inconsistent) */ > reg lwage76 ed76 age76 age2 black smsa76 south76; -------------+------------------------------ F( 6, 3003) = 194.69 Model 165.973797 6 27.6622995 Prob > F = 0.0000 Residual 426.667849 3003.142080536 R-squared = 0.2801 -------------+------------------------------ Adj R-squared = 0.2786 Total 592.641646 3009.196956346 Root MSE =.37694 ed76.0340887.0027293 12.49 0.000.0287371.0394402 age76.1443718.0452368 3.19 0.001.0556734.2330701 age2 -.0018257.0007852-2.33 0.020 -.0033652 -.0002861 black -.1887294.0177561-10.63 0.000 -.2235447 -.1539141 smsa76.1647065.0156804 10.50 0.000.1339611.1954519 south76 -.1298909.0152216-8.53 0.000 -.1597367 -.100045 _cons 3.190643.6437037 4.96 0.000 1.928498 4.452787. outreg2 using schooling, replace ctitle("ols");. /* IV with 1 instrument */ > /* First stage regression */ > reg ed76 nearc4 age76 age2 black smsa76 south76; -------------+------------------------------ F( 6, 3003) = 67.29 Model 2555.48762 6 425.914603 Prob > F = 0.0000 Residual 19006.5924 3003 6.32920161 R-squared = 0.1185 -------------+------------------------------ Adj R-squared = 0.1168 Total 21562.0801 3009 7.16586243 Root MSE = 2.5158 ed76 Coef. Std. Err. t P> t [95% Conf. Interval] nearc4.347105.1069972 3.24 0.001.1373098.5569002 age76 1.061441.3013985 3.52 0.000.4704727 1.65241 age2 -.0187598.0052314-3.59 0.000 -.0290173 -.0085024 black -1.468367.1154434-12.72 0.000-1.694723-1.242011 smsa76.8354027.1092524 7.65 0.000.6211856 1.04962 south76 -.4596997.1024337-4.49 0.000 -.6605469 -.2588524 _cons -1.869524 4.298357-0.43 0.664-10.29755 6.558497. /* instrument relevance test */ > testparm nearc4; ( 1) nearc4 = 0 F( 1, 3003) = 10.52 Prob > F = 0.0012. scalar frelev=r(f); 1

. /* exogeneity test */ > predict resed76,res;. reg lwage76 ed76 age76 age2 black smsa76 south76 resed76; -------------+------------------------------ F( 7, 3002) = 167.16 Model 166.210579 7 23.7443684 Prob > F = 0.0000 Residual 426.431067 3002.14204899 R-squared = 0.2805 -------------+------------------------------ Adj R-squared = 0.2788 Total 592.641646 3009.196956346 Root MSE =.37689 ed76.0936071.0461802 2.03 0.043.003059.1841552 age76.0824397.0659313 1.25 0.211 -.0468354.2117149 age2 -.0007331.0011544-0.64 0.525 -.0029965.0015304 black -.1011767.0700988-1.44 0.149 -.2386233.0362699 smsa76.1080666.0465875 2.32 0.020.01672.1994132 south76 -.0994275.0280781-3.54 0.000 -.1544817 -.0443732 resed76 -.059727.0462611-1.29 0.197 -.1504336.0309796 _cons 3.275667.6469925 5.06 0.000 2.007074 4.544261. testparm resed76; ( 1) resed76 = 0 F( 1, 3002) = 1.67 Prob > F = 0.1968. scalar rexog=r(p);. drop resed76;. /* tsls */ > ivreg lwage76 (ed76=nearc4) age76 age2 black smsa76 south76; Instrumental variables (2SLS) regression -------------+------------------------------ F( 6, 3003) = 146.22 Model 98.4080021 6 16.4013337 Prob > F = 0.0000 Residual 494.233644 3003.164579968 R-squared = 0.1660 -------------+------------------------------ Adj R-squared = 0.1644 Total 592.641646 3009.196956346 Root MSE =.40568 ed76.0936071.0497079 1.88 0.060 -.0038579.1910722 age76.0824397.0709678 1.16 0.245 -.0567107.2215901 age2 -.0007331.0012426-0.59 0.555 -.0031694.0017033 black -.1011767.0754536-1.34 0.180 -.2491227.0467694 smsa76.1080666.0501463 2.16 0.031.0097421.2063911 south76 -.0994274.030223-3.29 0.001 -.1586873 -.0401676 _cons 3.275667.6964159 4.70 0.000 1.910167 4.641168 Instruments: age76 age2 black smsa76 south76 nearc4. outreg2 using schooling, append ctitle("iv1") > addstat("f-value test intrument relevance",frelev, > "p-value Hausman-Wu test exogeneity",rexog); 2

. /* IV with more than 1 instrument */ > /* First stage regression */ > reg ed76 nearc4 daded momed age76 age2 black smsa76 south76; -------------+------------------------------ F( 8, 3001) = 131.51 Model 5596.85573 8 699.606966 Prob > F = 0.0000 Residual 15965.2243 3001 5.31996812 R-squared = 0.2596 -------------+------------------------------ Adj R-squared = 0.2576 Total 21562.0801 3009 7.16586243 Root MSE = 2.3065 ed76 Coef. Std. Err. t P> t [95% Conf. Interval] nearc4.2652582.0982436 2.70 0.007.0726266.4578897 daded.179144.0155571 11.52 0.000.1486403.2096477 momed.214897.0170983 12.57 0.000.1813715.2484225 age76.9874191.2763478 3.57 0.000.4455688 1.529269 age2 -.0170751.0047968-3.56 0.000 -.0264804 -.0076698 black -.7947936.1095649-7.25 0.000-1.009624 -.5799637 smsa76.569724.1007944 5.65 0.000.3720908.7673571 south76 -.2234506.0944376-2.37 0.018 -.4086195 -.0382817 _cons -5.154972 3.943185-1.31 0.191-12.88659 2.576647. /* instrument relevance test */ > testparm nearc4 daded momed; ( 1) nearc4 = 0 ( 2) daded = 0 ( 3) momed = 0 F( 3, 3001) = 194.74 Prob > F = 0.0000. scalar frelev=r(f);. /* exogeneity test */ > predict resed76,res;. reg lwage76 ed76 age76 age2 black smsa76 south76 resed76; -------------+------------------------------ F( 7, 3002) = 167.18 Model 166.225364 7 23.7464806 Prob > F = 0.0000 Residual 426.416282 3002.142044065 R-squared = 0.2805 -------------+------------------------------ Adj R-squared = 0.2788 Total 592.641646 3009.196956346 Root MSE =.37689 ed76.0423199.0067604 6.26 0.000.0290644.0555754 age76.1358068.0456866 2.97 0.003.0462265.225387 age2 -.0016746.0007933-2.11 0.035 -.0032299 -.0001192 black -.1766212.0199494-8.85 0.000 -.215737 -.1375053 smsa76.1568734.0167468 9.37 0.000.124037.1897098 south76 -.1256779.0155454-8.08 0.000 -.1561586 -.0951971 resed76 -.0098336.0073892-1.33 0.183 -.024322.0046548 _cons 3.202401.6436817 4.98 0.000 1.940299 4.464503. testparm resed76; ( 1) resed76 = 0 F( 1, 3002) = 1.77 3

. scalar rexog=r(p);. drop resed76; Prob > F = 0.1834. /* tsls */ > ivreg lwage76 (ed76=nearc4 daded momed) age76 age2 black smsa76 south76; Instrumental variables (2SLS) regression -------------+------------------------------ F( 6, 3003) = 174.70 Model 164.681532 6 27.4469221 Prob > F = 0.0000 Residual 427.960114 3003.14251086 R-squared = 0.2779 -------------+------------------------------ Adj R-squared = 0.2764 Total 592.641646 3009.196956346 Root MSE =.37751 ed76.0423199.0067715 6.25 0.000.0290426.0555972 age76.1358068.0457616 2.97 0.003.0460794.2255341 age2 -.0016746.0007946-2.11 0.035 -.0032325 -.0001166 black -.1766212.0199822-8.84 0.000 -.2158013 -.137441 smsa76.1568734.0167743 9.35 0.000.1239831.1897637 south76 -.1256779.0155709-8.07 0.000 -.1562087 -.0951471 _cons 3.202401.6447385 4.97 0.000 1.938227 4.466575 Instruments: age76 age2 black smsa76 south76 nearc4 daded momed. predict uu,res;. reg uu nearc4 daded momed age76 age2 black smsa76 south76; -------------+------------------------------ F( 8, 3001) = 0.54 Model.614522827 8.076815353 Prob > F = 0.8275 Residual 427.34559 3001.142401063 R-squared = 0.0014 -------------+------------------------------ Adj R-squared = -0.0012 Total 427.960113 3009.142226691 Root MSE =.37736 uu Coef. Std. Err. t P> t [95% Conf. Interval] nearc4.0190807.0160733 1.19 0.235 -.0124352.0505966 daded -.004102.0025453-1.61 0.107 -.0090927.0008886 momed.0039202.0027974 1.40 0.161 -.0015648.0094052 age76.0006869.0452125 0.02 0.988 -.0879636.0893375 age2 -.0000158.0007848-0.02 0.984 -.0015545.001523 black.0002275.0179256 0.01 0.990 -.0349202.0353752 smsa76 -.0051471.0164907-0.31 0.755 -.0374813.0271871 south76.0027335.0154507 0.18 0.860 -.0275615.0330284 _cons -.0167472.6451331-0.03 0.979-1.281695 1.248201. drop uu;. outreg2 using schooling, append ctitle("aux. reg. sargan") bdec(4);. scalar sargan=e(n)*e(r2);. scalar rr=e(df_m)+1;. ivreg lwage76 (ed76=nearc4 daded momed) age76 age2 black smsa76 south76; 4

Instrumental variables (2SLS) regression -------------+------------------------------ F( 6, 3003) = 174.70 Model 164.681532 6 27.4469221 Prob > F = 0.0000 Residual 427.960114 3003.14251086 R-squared = 0.2779 -------------+------------------------------ Adj R-squared = 0.2764 Total 592.641646 3009.196956346 Root MSE =.37751 ed76.0423199.0067715 6.25 0.000.0290426.0555972 age76.1358068.0457616 2.97 0.003.0460794.2255341 age2 -.0016746.0007946-2.11 0.035 -.0032325 -.0001166 black -.1766212.0199822-8.84 0.000 -.2158013 -.137441 smsa76.1568734.0167743 9.35 0.000.1239831.1897637 south76 -.1256779.0155709-8.07 0.000 -.1562087 -.0951471 _cons 3.202401.6447385 4.97 0.000 1.938227 4.466575 Instruments: age76 age2 black smsa76 south76 nearc4 daded momed. scalar kk=e(df_m)+1;. scalar df_sargan=rr-kk;. scalar pvalue_sargan=chi2tail(df_sargan,sargan);. outreg2 using schooling, append ctitle("iv2") > addstat("f-value test intrument relevance",frelev,"p-value Hausman-Wu test exogeneity",rexog, > "Sargan statistic",sargan,"degrees freedom Sargan statistic",df_sargan, "P value Sargan statistic",pvalue_sarga > n);. /* gmm */ > ivreg2 lwage76 (ed76=nearc4 daded momed) age76 age2 black smsa76 south76,gmm; GMM estimation -------------- Number of obs = 3010 F( 6, 3003) = 191.93 Prob > F = 0.0000 Total (centered) SS = 592.641646 Centered R2 = 0.2777 Total (uncentered) SS = 118616.3654 Uncentered R2 = 0.9964 Residual SS = 428.0862589 Root MSE =.3771 Robust lwage76 Coef. Std. Err. z P> z [95% Conf. Interval] ed76.0427006.0070747 6.04 0.000.0288344.0565667 age76.1376785.0461597 2.98 0.003.0472071.2281499 age2 -.0017036.0008009-2.13 0.033 -.0032733 -.000134 black -.1769194.0198298-8.92 0.000 -.215785 -.1380537 smsa76.1583036.0162745 9.73 0.000.1264062.1902011 south76 -.1246765.0158253-7.88 0.000 -.1556935 -.0936594 _cons 3.16688.6485453 4.88 0.000 1.895755 4.438006 Anderson canon. corr. LR statistic (identification/iv relevance test): 535.393 Chi-sq(3) P-val = 0.0000 5

Hansen J statistic (overidentification test of all instruments): 4.347 Chi-sq(2) P-val = 0.1138 Included instruments: age76 age2 black smsa76 south76 Excluded instruments: nearc4 daded momed. scalar pvalue_sargan=e(jp);. outreg2 using schooling, append ctitle("gmm") > addstat("f-value test intrument relevance",e(idstat), > "Sargan statistic",e(j),"degrees freedom Sargan statistic",e(jdf), "P value Sargan statistic",pvalue_sargan);. stop; unrecognized command: stop r(199); end of do-file r(199);. exit, clear 6