Chengyuan Yin School of Mathematics

Slides:



Advertisements
Similar presentations
Introduction Describe what panel data is and the reasons for using it in this format Assess the importance of fixed and random effects Examine the Hausman.
Advertisements

Econometric Analysis of Panel Data Panel Data Analysis – Random Effects Assumptions GLS Estimator Panel-Robust Variance-Covariance Matrix ML Estimator.
Econometric Analysis of Panel Data
Econometric Analysis of Panel Data
Econometric Analysis of Panel Data
Part 11: Asymptotic Distribution Theory 11-1/72 Econometrics I Professor William Greene Stern School of Business Department of Economics.
Econometric Analysis of Panel Data Random Regressors –Pooled (Constant Effects) Model Instrumental Variables –Fixed Effects Model –Random Effects Model.
Part 12: Random Parameters [ 1/46] Econometric Analysis of Panel Data William Greene Department of Economics Stern School of Business.
Econometric Analysis of Panel Data Dynamic Panel Data Analysis –First Difference Model –Instrumental Variables Method –Generalized Method of Moments –Arellano-Bond-Bover.
Econometric Analysis of Panel Data Instrumental Variables in Panel Data –Assumptions of Instrumental Variables –Fixed Effects Model –Random Effects Model.
Econometric Analysis of Panel Data Lagged Dependent Variables –Pooled (Constant Effects) Model –Fixed Effects Model –Random Effects Model –First Difference.
Econometric Analysis Using Stata
Econometrics I Professor William Greene Stern School of Business
Part 7: Regression Extensions [ 1/59] Econometric Analysis of Panel Data William Greene Department of Economics Stern School of Business.
Econometric Analysis of Panel Data Fixed Effects and Random Effects: Extensions – Time-invariant Variables – Two-way Effects – Nested Random Effects.
Part 14: Generalized Regression 14-1/46 Econometrics I Professor William Greene Stern School of Business Department of Economics.
Part 5: Random Effects [ 1/54] Econometric Analysis of Panel Data William Greene Department of Economics Stern School of Business.
[Part 3: Common Effects ] 1/57 Econometric Analysis of Panel Data William Greene Department of Economics Stern School of Business.
Topics in Microeconometrics William Greene Department of Economics Stern School of Business.
Panel Data Analysis Introduction
1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William.
[Topic 2-Endogeneity] 1/33 Topics in Microeconometrics William Greene Department of Economics Stern School of Business.
1/69: Topic Descriptive Statistics and Linear Regression Microeconometric Modeling William Greene Stern School of Business New York University New.
Empirical Methods for Microeconomic Applications University of Lugano, Switzerland May 27-31, 2013 William Greene Department of Economics Stern School.
Chapter 15 Panel Data Models Walter R. Paczkowski Rutgers University.
[Topic 1-Regression] 1/37 1. Descriptive Tools, Regression, Panel Data.
Spatial Econometric Analysis Using GAUSS 8 Kuan-Pin Lin Portland State University.
Part 4A: GMM-MDE[ 1/33] Econometric Analysis of Panel Data William Greene Department of Economics Stern School of Business.
Econometric Analysis of Panel Data
Vera Tabakova, East Carolina University
Chapter 15 Panel Data Models.
Vera Tabakova, East Carolina University
Econometric Analysis of Panel Data
Esman M. Nyamongo Central Bank of Kenya
PANEL DATA 1. Dummy Variable Regression 2. LSDV Estimator
Econometric Analysis of Panel Data
Econometric Analysis of Panel Data
Chapter 15 Panel Data Analysis.
Microeconometric Modeling
Discrete Choice Modeling
Panel Data Analysis Using GAUSS
Advanced Panel Data Methods
Microeconometric Modeling
Microeconometric Modeling
Econometric Analysis of Panel Data
Econometric Analysis of Panel Data
Microeconometric Modeling
Econometric Analysis of Panel Data
Econometrics I Professor William Greene Stern School of Business
Econometric Analysis of Panel Data
Ch. 13. Pooled Cross Sections Across Time: Simple Panel Data.
Microeconometric Modeling
Microeconometric Modeling
Econometric Analysis of Panel Data
Econometrics Analysis
Microeconometric Modeling
Econometrics I Professor William Greene Stern School of Business
Econometric Analysis of Panel Data
Linear Regression Summer School IFPRI
Econometrics I Professor William Greene Stern School of Business
Econometric Analysis of Panel Data
Ch. 13. Pooled Cross Sections Across Time: Simple Panel Data.
Econometrics I Professor William Greene Stern School of Business
Empirical Methods for Microeconomic Applications University of Lugano, Switzerland May 27-31, 2019 William Greene Department of Economics Stern School.
Econometric Analysis of Panel Data
Advanced Panel Data Methods
Econometrics I Professor William Greene Stern School of Business
Econometrics I Professor William Greene Stern School of Business
Econometrics I Professor William Greene Stern School of Business
Presentation transcript:

Chengyuan Yin School of Mathematics Econometrics Chengyuan Yin School of Mathematics

17. Linear Models for Panel Data Econometrics 17. Linear Models for Panel Data

Panel Data Sets Longitudinal data Cross section time series National longitudinal survey of youth (NLS) British household panel survey (BHPS) Panel Study of Income Dynamics (PSID) Cross section time series Grunfeld’s investment data Penn world tables Financial data by firm, year rit – rft = i(rmt - rft) + εit, i = 1,…,many; t=1,…many Exchange rate data, essentially infinite T, large N Effects: i=  + vi

Terms of Art Cross sectional vs. time series variation - (history: consumption function studies) Heterogeneity Group effects (individual effects) Fixed effects and/or random effects Substantive differences? Is it possible to tell them apart in observed data?

Panel Data Rotating panels: Spanish household survey Spanish income study (http://www.cemfi.es/~albarran/0008r.pdf) Efficiency analysis: “Efficiency measurement in rotating panel data,” Heshmati, A, Applied Economics, 30, 1998, pp. 919-930 Hierarchical (nested) data sets: Student outcome, by year, district, school, teacher

Nested Panel Data Antweiler, W., Nested Random Effects…” Journal of Econometrics, 101, 2001, 295-313

Balanced and Unbalanced Panels Distinction A notation to help with mechanics zi,t, i = 1,…,N; t = 1,…,Ti The role of the assumption Mathematical and notational convenience: Balanced, NT Unbalanced: Is the fixed Ti assumption ever necessary? SUR models.

Benefits of Panel Data Time and individual variation in behavior unobservable in cross sections or aggregate time series Observable and unobservable individual heterogeneity Rich hierarchical structures Dynamics in economic behavior

Fixed and Random Effects Unobserved individual effects in regression: E[yit | xit, ci] Notation: Linear specification: Fixed Effects: E[ci | Xi ] = g(Xi); effects are correlated with included variables. Common: Cov[xit,ci] ≠0 Random Effects: E[ci | Xi ] = μ; effects are uncorrelated with included variables. If Xi contains a constant term, μ=0 WLOG. Common: Cov[xit,ci] =0, but E[ci | Xi ] = μ is needed for the full model

Convenient Notation Fixed Effects Random Effects Individual specific constant terms. Compound (“composed”) disturbance; “error components”

Assumptions for Asymptotics Convergence of moments involving cross section Xi. N increasing, T or Ti assumed fixed. “Fixed T asymptotics” (see text, p. 196) Time series characteristics are not relevant (may be nonstationary) If T is also growing, need to treat as multivariate time series. Ranks of matrices. X must have full column rank. (Xi may not, if Ti < K.) Strict exogeneity and dynamics. If xit contains yi,t-1 then xit cannot be strictly exogenous. Xit will be correlated with the unobservables in period t-1. (To be revisited later.) Empirical characteristics of microeconomic data

The Pooled Regression Presence of omitted effects Potential bias/inconsistency of OLS – depends on ‘fixed’ or ‘random’

Cornwell and Rupert Data Cornwell and Rupert Returns to Schooling Data, 595 Individuals, 7 Years Variables in the file are EXP = work experience WKS = weeks worked OCC = occupation, 1 if blue collar, IND = 1 if manufacturing industry SOUTH = 1 if resides in south SMSA = 1 if resides in a city (SMSA) MS = 1 if married FEM = 1 if female UNION = 1 if wage set by unioin contract ED = years of education BLK = 1 if individual is black LWAGE = log of wage = dependent variable in regressions These data were analyzed in Cornwell, C. and Rupert, P., "Efficient Estimation with Panel Data: An Empirical Comparison of Instrumental Variable Estimators," Journal of Applied Econometrics, 3, 1988, pp. 149-155.  See Baltagi, page 122 for further analysis.  The data were downloaded from the website for Baltagi's text.

Application: Cornell and Rupert

Using First Differences Eliminating the heterogeneity

OLS with First Differences With strict exogeneity of (Xi,ci), OLS regression of Δyit on Δxit is unbiased and consistent but inefficient. GLS is unpleasantly complicated. In order to compute a first step estimator of σε2 we would use fixed effects. We should just stop there. Or, use OLS in first differences and use Newey-West with one lag.

Two Periods With two periods and strict exogeneity, This is a classical regression model. If there are no regressors,

Application of a Two Period Model “Hemoglobin and Quality of Life in Cancer Patients with Anemia,” Finkelstein (MIT), Berndt (MIT), Greene (NYU), Cremieux (Univ. of Quebec) 1998 With Ortho Biotech – seeking to change labeling of already approved drug ‘erythropoetin.’ r-HuEPO

QOL Study Quality of life study i = 1,… 1200+ clinically anemic cancer patients undergoing chemotherapy, treated with transfusions and/or r-HuEPO t = 0 at baseline, 1 at exit. (interperiod survey by some patients was not used) yit = self administered quality of life survey, scale = 0,…,100 xit = hemoglobin level, other covariates Treatment effects model (hemoglobin level) Background – r-HuEPO treatment to affect Hg level Important statistical issues Unobservable individual effects The placebo effect Attrition – sample selection FDA mistrust of “community based” – not clinical trial based statistical evidence Objective – when to administer treatment for maximum marginal benefit

Regression-Treatment Effects Model

Effects and Covariates Individual effects that would impact a self reported QOL: Depression, comorbidity factors (smoking), recent financial setback, recent loss of spouse, etc. Covariates Change in tumor status Measured progressivity of disease Change in number of transfusions Presence of pain and nausea Change in number of chemotherapy cycles Change in radiotherapy types Elapsed days since chemotherapy treatment Amount of time between baseline and exit

First Differences Model

Dealing with Attrition The attrition issue: Appearance for the second interview was low for people with initial low QOL (death or depression) or with initial high QOL (don’t need the treatment). Thus, missing data at exit were clearly related to values of the dependent variable. Solutions to the attrition problem Heckman selection model (used in the study) Prob[Present at exit|covariates] = Φ(z’θ) (Probit model) Additional variable added to difference model i = Φ(zi’θ)/Φ(zi’θ) The FDA solution: fill with zeros. (!)

Estimation with Fixed Effects The fixed effects model ci is arbitrarily correlated with xit but E[εit|Xi,ci]=0 Dummy variable representation

Assumptions for the FE Model yi = Xi + diαi + εi, for each individual E[ci | Xi ] = g(Xi); Effects are correlated with included variables. Common: Cov[xit,ci] ≠0

Useful Analysis of Variance Notation Total variation = Within groups variation + Between groups variation

WHO Data

Baltagi and Griffin’s Gasoline Data World Gasoline Demand Data, 18 OECD Countries, 19 years Variables in the file are COUNTRY = name of country YEAR = year, 1960-1978 LGASPCAR = log of consumption per car LINCOMEP = log of per capita income LRPMG = log of real price of gasoline LCARPCAP = log of per capita number of cars See Baltagi (2001, p. 24) for analysis of these data. The article on which the analysis is based is Baltagi, B. and Griffin, J., "Gasolne Demand in the OECD: An Application of Pooling and Testing Procedures," European Economic Review, 22, 1983, pp. 117-137.  The data were downloaded from the website for Baltagi's text.

Analysis of Variance

Analysis of Variance

Estimating the Fixed Effects Model The FEM is a linear regression model but with many independent variables Least squares is unbiased, consistent, efficient, but inconvenient if N is large.

Fixed Effects Estimator (cont.)

The Within Transformation Removes the Effects

Least Squares Dummy Variable Estimator b is obtained by ‘within’ groups least squares (group mean deviations) Normal equations for a are D’Xb+D’Da=D’y a = (D’D)-1D’(y – Xb) Notes: This is simple algebra – the estimator is just OLS Least squares is an estimator, not a model. (Repeat twice.) Note what ai is when Ti = 1. Follow this with yit-ai-xit’b=0 if Ti=1.

Inference About OLS Assume strict exogeneity: Cov[εit,(xjs,cj)]=0. Every disturbance in every period for each person is uncorrelated with variables and effects for every person and across periods. Now, it’s just least squares in a classical linear regression model. Asy.Var[b] =

Application Cornwell and Rupert

LSDV Results

The Effect of the Effects

The Random Effects Model ci is uncorrelated with xit for all t; E[ci |Xi] = 0 E[εit|Xi,ci]=0

Error Components Model Generalized Regression Model

Notation

Notation

Convergence of Moments

Random vs. Fixed Effects Random Effects Small number of parameters Efficient estimation Objectionable orthogonality assumption (ci  Xi) Fixed Effects Robust – generally consistent Large number of parameters

Ordinary Least Squares Standard results for OLS in a GR model Consistent Unbiased Inefficient True Variance

Estimating the Variance for OLS

Mechanics

Cornwell and Rupert Data Cornwell and Rupert Returns to Schooling Data, 595 Individuals, 7 Years Variables in the file are EXP = work experience, EXPSQ = EXP2 WKS = weeks worked OCC = occupation, 1 if blue collar, IND = 1 if manufacturing industry SOUTH = 1 if resides in south SMSA = 1 if resides in a city (SMSA) MS = 1 if married FEM = 1 if female UNION = 1 if wage set by unioin contract ED = years of education BLK = 1 if individual is black LWAGE = log of wage = dependent variable in regressions These data were analyzed in Cornwell, C. and Rupert, P., "Efficient Estimation with Panel Data: An Empirical Comparison of Instrumental Variable Estimators," Journal of Applied Econometrics, 3, 1988, pp. 149-155.  See Baltagi, page 122 for further analysis.  The data were downloaded from the website for Baltagi's text.

OLS Results +----------------------------------------------------+ | Residuals Sum of squares = 522.2008 | | Standard error of e = .3544712 | | Fit R-squared = .4112099 | | Adjusted R-squared = .4100766 | +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| Constant 5.40159723 .04838934 111.628 .0000 EXP .04084968 .00218534 18.693 .0000 19.8537815 EXPSQ -.00068788 .480428D-04 -14.318 .0000 514.405042 OCC -.13830480 .01480107 -9.344 .0000 .51116447 SMSA .14856267 .01206772 12.311 .0000 .65378151 MS .06798358 .02074599 3.277 .0010 .81440576 FEM -.40020215 .02526118 -15.843 .0000 .11260504 UNION .09409925 .01253203 7.509 .0000 .36398559 ED .05812166 .00260039 22.351 .0000 12.8453782

Alternative Variance Estimators +---------+--------------+----------------+--------+---------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Constant 5.40159723 .04838934 111.628 .0000 EXP .04084968 .00218534 18.693 .0000 EXPSQ -.00068788 .480428D-04 -14.318 .0000 OCC -.13830480 .01480107 -9.344 .0000 SMSA .14856267 .01206772 12.311 .0000 MS .06798358 .02074599 3.277 .0010 FEM -.40020215 .02526118 -15.843 .0000 UNION .09409925 .01253203 7.509 .0000 ED .05812166 .00260039 22.351 .0000 Robust Constant 5.40159723 .10156038 53.186 .0000 EXP .04084968 .00432272 9.450 .0000 EXPSQ -.00068788 .983981D-04 -6.991 .0000 OCC -.13830480 .02772631 -4.988 .0000 SMSA .14856267 .02423668 6.130 .0000 MS .06798358 .04382220 1.551 .1208 FEM -.40020215 .04961926 -8.065 .0000 UNION .09409925 .02422669 3.884 .0001 ED .05812166 .00555697 10.459 .0000

Generalized Least Squares

GLS (cont.)

Estimators for the Variances

Feasible GLS x´ does not contain a constant term in the preceding.

Practical Problems with FGLS x´ does not contain a constant term in the preceding.

Computing Variance Estimators

Application +--------------------------------------------------+ | Random Effects Model: v(i,t) = e(i,t) + u(i) | | Estimates: Var[e] = .231188D-01 | | Var[u] = .102531D+00 | | Corr[v(i,t),v(i,s)] = .816006 | | (High (low) values of H favor FEM (REM).) | | Sum of Squares .141124D+04 | | R-squared -.591198D+00 | +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| EXP .08819204 .00224823 39.227 .0000 19.8537815 EXPSQ -.00076604 .496074D-04 -15.442 .0000 514.405042 OCC -.04243576 .01298466 -3.268 .0011 .51116447 SMSA -.03404260 .01620508 -2.101 .0357 .65378151 MS -.06708159 .01794516 -3.738 .0002 .81440576 FEM -.34346104 .04536453 -7.571 .0000 .11260504 UNION .05752770 .01350031 4.261 .0000 .36398559 ED .11028379 .00510008 21.624 .0000 12.8453782 Constant 4.01913257 .07724830 52.029 .0000

Testing for Effects: LM Test

Application: Cornwell-Rupert

Testing for Effects Regress; lhs=lwage;rhs=fixedx,varyingx;res=e$ Matrix ; tebar=7*gxbr(e,person)$ Calc ; list;lm=595*7/(2*(7-1))* (tebar'tebar/sumsqdev - 1)^2$ LM = 3797.06757

Hausman Test for FE vs. RE Estimator Random Effects E[ci|Xi] = 0 Fixed Effects E[ci|Xi] ≠ 0 FGLS (Random Effects) Consistent and Efficient Inconsistent LSDV (Fixed Effects) Consistent Inefficient Possibly Efficient

Hausman Test for Effects β does not contain the constant term in the preceding.

Computing the Hausman Statistic β does not contain the constant term in the preceding.

Hausman Test +--------------------------------------------------+ | Random Effects Model: v(i,t) = e(i,t) + u(i) | | Estimates: Var[e] = .235236D-01 | | Var[u] = .133156D+00 | | Corr[v(i,t),v(i,s)] = .849862 | | Lagrange Multiplier Test vs. Model (3) = 4061.11 | | ( 1 df, prob value = .000000) | | (High values of LM favor FEM/REM over CR model.) | | Fixed vs. Random Effects (Hausman) = 2632.34 | | ( 4 df, prob value = .000000) | | (High (low) values of H favor FEM (REM).) |

Wu (Variable Addition) Test Under the FE assumptions, the common effect is correlated with the group means. Add the group means to the RE model. If statistically significant, this suggests that the RE model is inappropriate.

Mundlak (Augmented) Regression +--------+--------------+----------------+--------+--------+----------+ |Variable| Coefficient | Standard Error |b/St.Er.|P[|Z|>z]| Mean of X| |EXPBAR | -.08769*** .00162096 -54.099 .0000 19.853782| |OCCBAR | -.14806*** .03623348 -4.086 .0000 .5111645| |SMSABAR | .21707*** .03209640 6.763 .0000 .6537815| |MSBAR | .14855*** .05087686 2.920 .0035 .8144058| |UNYNBAR | .07831** .03257465 2.404 .0162 .3639856| |WKSBAR | .00857** .00362039 2.367 .0179 46.811525| |INDBAR | .03998 .02966215 1.348 .1777 .3954382| |SOUTHBAR| -.05487 .04293224 -1.278 .2012 .2902761| |EXP | .11448*** .00225862 50.684 .0000 19.853782| |EXPSQ | -.00045*** .483957D-04 -9.304 .0000 514.40504| |OCC | -.02122 .01380348 -1.537 .1243 .5111645| |SMSA | -.04237** .01945829 -2.178 .0294 .6537815| |MS | -.02969 .01901293 -1.561 .1184 .8144058| |FEM | -.31359*** .05419945 -5.786 .0000 .1126050| |UNION | .03268** .01494574 2.187 .0288 .3639856| |ED | .05150*** .00550816 9.349 .0000 12.845378| |BLK | -.15768*** .04463738 -3.533 .0004 .0722689| |WKS | .00081 .00060031 1.354 .1759 46.811525| |IND | .01909 .01546993 1.234 .2171 .3954382| |SOUTH | -.00176 .03435229 -.051 .9592 .2902761| |Constant| 5.15038*** .20122987 25.595 .0000 | +--------+------------------------------------------------------------+

Wu TEst --> matr;bm=b(1:8);vm=varb(1:8,1:8)$ --> matr;list;wutest=bm'<vm>bm$ Matrix WUTEST has 1 rows and 1 columns. 1 +-------------- 1| 3006.13788 --> calc;list;ctb(.95,8)$ +------------------------------------+ | Listed Calculator Results | Result = 15.507313