《面板数据3.ppt》由会员分享,可在线阅读,更多相关《面板数据3.ppt(39页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、Analysis of Cross Section and Panel DataYan ZhangSchool of Economics,Fudan UniversityCCER,Fudan UniversityIntroductory EconometricsA Modern ApproachYan ZhangSchool of Economics,Fudan UniversityCCER,Fudan UniversityAnalysis of Cross Section and Panel DataPart 1.Regression Analysis on Cross Sectional
2、DataChap 8.HeteroskedasticityvHeteroskedasticityvRobust statisticHeteroskedasticity-robust t statisticHeteroskedasticity-robust s.e.(White-Huber-Eicker s.e.)Heteroskedasticity-robust F statisticHeteroskedasticity-robust LM statisticv异方差检验方法:异方差检验方法:B-P方法;方法;White方法;方法;v异方差处理:异方差处理:GLSvFGLS8.1 Conseq
3、uences of Heteroskedasticity for OLSvHeteroskedasticityvNot Change:UnbiasednessConsistencyvChange:Biased variance of OLS estimator,Invalid t,F,LM statisticOLS No longer BLUEOLS no longer asymptotically efficientvSolutions:Modify the OLS test statistics More efficient estimator8.2 Heteroskedasticity-
4、Robust Inferences after OLS EstimationvHeteroskedasticity-Robust procedureshow to adjust standard errors,t,F,and LM statistics so that they are valid in the presence of heteroskedasticity of unknown form.vRobust statisticHeteroskedasticity-robust t statisticHeteroskedasticity-robust s.e.(White-Huber
5、-Eicker s.e.)Heteroskedasticity-robust F statisticHeteroskedasticity-robust LM statistic(E.g 5.3,8.3)Example 8.1(7.6,7.1,7.5)The Determination of log Hourly Wage:vStata Commanduse WAGE1generate marrmale=married*(1-female)generate marrfem=married*femalegenerate singfem=(1-married)*femalereg lwage mar
6、rmale marrfem singfem educ exper expersq tenure tenursqtest tenure tenuresqreg lwage marrmale marrfem singfem educ exper expersq tenure tenursq,robusttest tenure tenuresq(Heteroskedasticity-robust F statistic)Example 8.1(7.6,7.1,7.5)The Determination of log Hourly Wage:vHeteroskedasticity-Robust Sta
7、ndard ErrorvThe same coef.,R-squared and Adjusted R-squared(Unbias)vDifferent s.e.,t-statistic,p-value,CI,F-statisticExample 8.1(7.6):NoticevDummy Variables:Same“marriage premium”;(0,1);(1,1);(1,0);(0,0)Different“marriage premium”;(1,0,0);(0,1,0);(0,0,1);(0,0,0)Adding Interaction TermvInference:we c
8、an use this equation to obtain the estimated difference between any two groups.Unfortunately,we cannot use it for testing whether the estimated difference between single and married women is statistically significant.to choose one of these groups to be the base group and to reestimate the equation.E
9、xample 8.2:The Determination of GPAvStata Commanduse GPA3describereg cumgpa sat hsperc tothrs female black white if spring=1test black whiteregress cumgpa sat hsperc tothrs female black white if spring0,robusttest black white(Heteroskedasticity-robust F statistic)The Determination of GPA:补充Chap 7.4.
10、3Chow StatisticvStata Commandgen fmsat=female*satgen fmhsperc=female*hspercgen fmtothrs=female*tothrslabel variable fmsat“=female*sat”label variable fmhsperc=female*hsperclabel variable fmtothrs=female*tothrsreg cumgpa female sat fmsat hsperc fmhsperc tothrs fmtothrs if spring=1test female fmsat fmh
11、sperc fmtothrstest fmsat fmhsperc fmtothrsreg cumgpa female sat hsperc tothrs if spring=18.3 Testing for HeteroskedasticityvHeteroskedasticity-Robust s.e.不需知道是否存在不需知道是否存在异方差异方差vTesting for HeteroskedasticityThe Breusch-Pagan Test(B-P Test)The White TestvBasic MethodsBP TestWhite Test 8.3.1 The Breus
12、ch-Pagan Test(BP Test)for HeteroskedasticityvThe Breusch-Pagan Test(B-P Test)vBasic MethodsHeteroskedasticityBP TestHeteroskedasticityWhite Test 8.3.2 The White Test for HeteroskedasticityvThe White Test(B-P Test)adds the squares and cross products of all of the independent variables to equation(8.1
13、4).vThe procedure of White Test Notice:Problems with Heteroskedasticity TestsvCan we always take a rejection using one of the heteroskedasticity tests as evidence of heteroskedasticity?appropriate provided we maintain Assumptions MLR.1 through MLR.4.But,if MLR.3 is violatedin particular,if the funct
14、ional form of E(yxE(yx)is misspecifiedthen a test for heteroskedastcity can reject H0,even if Var(y/x)is constant.If we omit one or more quadratic terms in a regression model or use the level model when we should use the log,a test for heteroskedasticity can be significant.8.4 Weighted Least Square
15、Estimations(WLS)vMethods:Var(u/x)=2 -1=PP Y=XB+u B=(X-1 X)-1(X-1 Y)vWLSWeight:The efficient procedure,GLS,weights each squared residual by the inverse of the conditional variance of ui given xiExamples of GLSThe R-squares of OLS and WLS are not comparableExample 8.6:Family Saving FunctionvMarginal P
16、ropensity to Save:vSTATA Command:help weights;use savingreg sav inc;reg sav inc size educ age black;test size educ age blackreg sav inc pw=1/inc;reg sav inc size educ age black pw=1/inctest size educ age blackvNotice:not comparable R-squarescompare the coef.either is goodadding demographic control v
17、ariablesindividually and jointly insignificant the var.of the error is proportional to the level of income.This means that,as income increases,the variability in savings increases.Notice:The WeightsvUnknownvOne case where the weights needed for WLS arise naturally from an underlying econometric mode
18、l.Individual level datadata across some group(firm-level)or geographic regionA similar weighting arises when we are using per capita data at the city,county,state,or country level.If the individual-level equation satisfies the Gauss-Markov assumptions,then the error in the per capita equation has a
19、variance proportional to one over the size of the population.Therefore,weighted least squares with weights equal to the population is appropriate.8.4.2 Feasible GLS:The Hetero-skedasticity F.Must Be EstimatedvFGLS Estimator:Using the estimator,instead of hi in the GLS transformation yields an estima
20、tor(model the function h and use the data to estimate the unknown parameters)vOne FGLS:vProcedure:Notice:The Properties of FGLSvThe FGLS estimator is neither unbiased,nor BLUEvThe FGLS estimator is still consistent,and asymptotically more efficient than OLSvfor large sample sizes,FGLS is an attracti
21、ve alternative to OLS when there is evidence of heteroskedasticity that inflates the standard errors of the OLS estimates.vThe FGLS estimator measures the marginal impact of each xj on y,vThe F statistic with WLS:same weights in both restricted and unrestricted modelsCompare with the OLS and WLS Est
22、imatorsvthe OLS and WLS estimates can be substantially different.Not a big problem in the e.g.all the coefficients maintain the same signs,and the biggest changes are on variables that were statistically insignificant when the equation was estimated by OLS.The OLS and WLS estimates will always diffe
23、r due to sampling error.The issue is whether their difference is enough to change important conclusions.If OLS and WLS produce statistically significant estimates that differ in sign,or the difference in magnitudes of the estimates is practically large,we should be suspicious.Typically,this indicate
24、s that one of the other Gauss-Markov assumptions is false,particularly the zero conditional mean assumption on the error(MLR.3).Hausman TestExample 8.7:Demand for CigarettesvHomeworkvOLSvBP testvFGLSvInterpretationChap 9.More on Specification and Data ProblemvFunctional Form MisspecificationHeterosk
25、edasticityassumption 3,zero conditional meancorrelation between the error,u,and one or more of the explanatory variables.Endogenous Explanatory Variable vSpecific problem and SolutionsOmitting v.Proxy Variablemeasurement errorvData Problem9.1 Functional Form Misspecificationv表现:多元回归模型没有正确的解释因变量和观测到的
26、解释变量之间的表现:多元回归模型没有正确的解释因变量和观测到的解释变量之间的关系关系vE.g.:Explanatory variables:Log-wage:the return to working experience,exper2Biased estimator of all coef.sLog-wage:the return to education,female*educ explanationExplained VariableLog-wage wageUnobservable key variablev检验:检验:the F test for joint exclusion re
27、strictions.增加一个显著变量的平方项,进行联合显著性检验增加一个显著变量的平方项,进行联合显著性检验缺点:无法确定函数形式误设的确切原因;使用大量自由度缺点:无法确定函数形式误设的确切原因;使用大量自由度一般情形下,对数形式和平方项一般情形下,对数形式和平方项RESET as a General Test for Functional Form MisspecificationvRESET:Regression Specification Error Test(回归设定误差检验回归设定误差检验)vIdea:RESET adds polynomials in the OLS fitte
28、d values to equation(9.2)to detect general kinds of functional form misspecification.vDrawbacks:it provides no real direction on how to proceed if the model is rejected.Just a Functional Form Test,Misguide on omitted v.and heteroskedasticityRESET has no power for detecting omitted v.whenever they ha
29、ve expectations that are linear in the included independent v.in the modelif the functional form is properly specified,RESET has no power for detecting heteroskedasticity.Test against Non-nested Alternativesv vConstruct a Comprehensive ModelvDavidson-Mackinnon TestvProblems with non-nested testa cle
30、ar winner need not emerge(reject or accept simultaneously)rejecting one does not mean the other is rightdifficult when the non-nested models have different dependent variables9.2 Using Proxy Variables for Unobserved Explanatory VariablesvUnobserved omitted v.Proxy v.Loosely speaking,a proxy variable
31、 is something that is related to the unobserved variable that we would like to control for in our analysis.Ability&IQvPlug-in solution to the omitted variables problemWhen does the plug-in solution give consistent estimators?The error u is uncorrelated with x1,x2,and x3*,in addition,u is uncorrelate
32、d with x3.The error v3 is uncorrelated with x1,x2,and x3.Influence:consistent estimator of Proxy Variables:cases of Biasvthe average level of ability not only changes with IQ,but also with educ and exper.vBiased estimator of Upward bias of proxy variable IQ Proxy Variables:Lagged Dependent V.vaccoun
33、t for historical factors that cause current differences in the dependent variable that are difficult to account for in other ways.vE.g.:Crime rate&expenditure on law enforcementthe main reason for putting crime-1 in the equation is that cities with high historical crime rates may spend more on crime
34、 prevention.Hardly perfect,but bettervOther waydifferentials9.3 Properties of OLS under Measurement ErrorvMeasurement Error:use an imprecise measure of an economic v.in a regression modelMarginal tax rate(average)vDifferences between proxy variables and measurement errorDifferent conceptually:In the
35、 proxy variable case,looking for a v.that is somehow associated with the unobserved v.In the measurement error case,the v.that we do not observe has a well-defined,quantitative meaning,but our recorded measures of it may contain error.Different primary interests:In the proxy variable case,we are usu
36、ally concerned with the effects of the other independent v.In the measurement error case,the mis-measured independent v.v只有当可搜集到数据的变量与影响个人决策的变量不同时,只有当可搜集到数据的变量与影响个人决策的变量不同时,测量误差才成为问题测量误差才成为问题9.3.1 Measurement Error in the Dependent VariablevThe bottom line is that measurement error in the dependent
37、v.can cause biases in OLS if it is systematically related to one or more of the explanatory v.-s.If the measurement error is just a random reporting error that is independent of the explanatory v.-s,then OLS is perfectly appropriate.vMeasurement Error(the difference between the observed value and th
38、e actual value)vThe usual assumption is that the measurement error in y is statistically independent of each explanatory v.If this is true,then the OLS estimators from(9.19)are unbiased and consistent.Further,the usual OLS inference procedures(t,F,and LM statistics)are valid.(larger var.of OLS estim
39、ators)vMultiplicative measurement error:9.3.2 Measurement Error in the Independent VariablesvMuch more important problemvMaintained assumption:u is uncorrelated with x1*and x1.vIf:Then OLS has all of its nice properties.vIf:(Classical Error-in-variables,CEV)Then biased and inconsistent estimator;Att
40、enuation Bias(衰减偏误):(衰减偏误):on average(or in large samples),the estimated OLS effect will be attenuated.If the variance of x1*is large,relative to the variance in the measurement error,then the inconsistency in OLS will be small.v多个变量时,一般的一个变量的多个变量时,一般的一个变量的ME会导致所有估计量有偏、不一致会导致所有估计量有偏、不一致9.4 Missing D
41、ata,Nonrandom Samples and Outlying ObservationsvMissing DataReduce the sample sizeMissing at random某些样本缺失数据的概率更大某些样本缺失数据的概率更大 非随机抽样非随机抽样vNonrandom SamplesCertain types of nonrandom sampling do not cause bias or inconsistency in OLS.sample selection based on the independent variables:Exogenous sample
42、 selection.sample selection based on the dependent variable:Endogenous sample selection.Biased and Inconsistent Outlying ObservationsvOutlying Observations(Influential Observations)Loosely speaking,an observation is an outlier if dropping it from a regression analysis makes the OLS estimates change
43、by a practically“large”amount.Entering mistakes;sampling from a small population if one or several members of the population are very different in some relevant aspect from the rest of the population.vOLS results should probably be reported with and without outlying observations in cases where one o
44、r several data points substantially change the results.vCertain functional forms are less sensitive to outlying observations.logarithmic transformation significantly narrows the range of the data and also yields functional forms that can explain a broader range of data.Outlying Observations:LADvleas
45、t absolute deviations(LAD):The LAD estimator minimizes the sum of the absolute deviation of the residuals,rather than the sum of squared residuals.Compared with OLS,LAD gives less weight to large residuals.Thus,it is less influenced by changes in a small number of observations.vDrawbacks:there are n
46、o formulas for the estimatorsLAD consistently estimates the parameters in the population regression function(the conditional mean),only when the distribution of the error term u is symmetric.if the error u is normally distributed,LAD is less efficient(asymptotically)than OLS.vRobust Regression:Examp
47、le 9.1(1.1,3.5,5.3,7.12,8.3)Economic Model of CrimevEconomics of Crime(Gary Becker,1968)vEconomic Model:choice of labor supplyvEconometric Model:vFunctional Form Misspecification?vProxy Variable?Example 9.1(1.1,3.5,5.3,7.12,8.3)Economic Model of CrimevData:CRIME1.RAW contains data on arrests during
48、the year 1986 and other information on 2,725 men born in either 1960 or 1961 in California.Each man in the sample was arrested at least once prior to 1986.vFunctional Form Misspecification?Quadratic terms?vProxy Variable?E.g.9.4(CRIME2.RAW)Example 9.1(1.1,3.5,5.3,7.12,8.3)Economic Model of CrimevReg
49、ression and Resultsreg narr86 pcnv ptime86 qemp86 avgsen(+)问题:判刑时间越长,增加犯罪活动?问题:判刑时间越长,增加犯罪活动?(e.g.3.5;avgsen的系数不的系数不显著显著)reg narr86 pcnv ptime86 qemp86 avgsen tottimetest avgsen tottime(F,LM)二值因变量线性概率模型二值因变量线性概率模型LPM(e.g.7.12)gen arr86=narr86;replace arr86=1 if arr860reg arr86 pcnv avgsen tottime ptime86 qemp86(解释解释)Quadratic terms(显著的项增加其平方项,看其显著性)(显著的项增加其平方项,看其显著性)RESETpredict yhat;predict resid,resid;(drop)vProxy Variable?E.g.9.4(CRIME2.RAW);作业;作业9.2;9.4;9.3(习题习题9.7);ReferencesvJeffrey M.Wooldridge,Introductory EconometricsA Modern Approach,Chap 47.
限制150内