课件计量经济学19章第2the simple regression model_第1页
课件计量经济学19章第2the simple regression model_第2页
课件计量经济学19章第2the simple regression model_第3页
课件计量经济学19章第2the simple regression model_第4页
课件计量经济学19章第2the simple regression model_第5页
已阅读5页,还剩97页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Intermediate Econometrics Yan Shen1The Simple Regression Model (1)简单二元回归y = b0 + b1x + uIntermediate Econometrics Yan Shen2Chapter Outline 本章大纲nDefinition of the Simple Regression Model 简单回归模型的定义简单回归模型的定义-面临的三个问题(面临的三个问题(P22)nDeriving the Ordinary Least Squares Estimates 普通最小二乘法的推导普通最小二乘法的推导nMechani

2、cs of OLS OLS的操作技巧nUnits of Measurement and Functional Form测量单位和函数形式nExpected Values and Variances of the OLS estimators OLS估计量的期望值和方差nRegression through the Origin 过原点回归Intermediate Econometrics Yan Shen3Lecture Outline 讲义大纲nSome Terminology 一些术语的注解(P23)nFunctional relationship(P23)nDifficult(P24)

3、nA Simple Assumption 一个简单假定(P25)nZero Conditional Mean Assumption 条件期望零值假定 nWhat is Ordinary Least Squares 何为普通最小二乘法nDeriving OLS Estimates 普通最小二乘法的推导Intermediate Econometrics Yan Shen4Some Terminology 术语注解n In the simple linear regression model, where y = b0 + b1x + u, we typically refer to y as th

4、enDependent Variable, ornLeft-Hand Side Variable, ornExplained Variable, ornRegressand在简单二元回归模型y = b0 + b1x + u中, y通常被称为因变量,左边变量,被解释变量,或回归子。Intermediate Econometrics Yan Shen5Some Terminology术语注解n In the simple linear regression of y on x, we typically refer to x as thenIndependent Variable, ornRigh

5、t-Hand Side Variable, ornExplanatory Variable, ornRegressor, ornCovariate, ornControl Variables在y 对 x进行回归的简单二元回归模型中, x通常被称为自变量,右边变量,解释变量,回归元,协变量,或控制变量。Intermediate Econometrics Yan Shen6Some Terminology术语注解nEquation y = b0 + b1x + u has only one nonconstant regressor x, it is called a simple linear

6、regression model, or two-variables regression model, or bivariate linear regression model. 等式y = b0 + b1x + u只有一个非常数回归元。我们称之为简单回归模型, 两变量回归模型或双变量回归模型.Intermediate Econometrics Yan Shen7Some Terminology术语注解nThe coefficients b0 , b1 are called the regression coefficients. nb0 is also called the constan

7、t term or the intercept term, or intercept parameter. nb1 represents the marginal effects of the regressor, x. It is also called the slope parameter.b0 , b1被称为回归系数。 b0也被称为常数项或截矩项,或截矩参数。 b1代表了回归元x的边际效果,也被成为斜率参数。Intermediate Econometrics Yan Shen8Some Terminology术语注解n The variable u is called the erro

8、r term or disturbance in the relationship. nIt represents factors other than x that can affect y. u 为误差项或扰动项,它代表了除了x之外可以影响y的因素。Intermediate Econometrics Yan Shen9Some Terminology术语注解nMeaning of linear: linear means linear in parameters, not necessarily mean that y and x must have a linear relationsh

9、ip.nThere are many cases that y and x have nonlinear relationship, but after some transformation, they are linear in parameters.nFor example, y=eb0+b1x+u .n线性的含义: y 和x 之间并不一定存在线性关系,但是,只要通过转换可以使y的转换形式和x的转换形式存在相对于参数的线性关系,该模型即称为线性模型。Intermediate Econometrics Yan Shen10Examples 简单二元回归模型例子nA simple wage

10、equationwage= b0 + b1(years of education) + unb1 : if education increase by one year, how much more wage will one gain.n上述简单工资函数描述了受教育年限和工资之间的关系, b1 衡量了多接受一年教育工资可以增加多少.Intermediate Econometrics Yan Shen11A Simple Assumption关于u的假定n The average value of u, the error term, in the population is 0. That

11、is, E(u) = 0(2.5)n It it restrictive?n我们假定总体中误差项u的平均值为零. 该假定是否具有很大的限制性呢?Intermediate Econometrics Yan Shen12A Simple Assumption关于u的假定nIf for example, E(u)=5. Then y = (b0 +5)+ b1x + (u-5),therefore, E(u)=E(u-5)=0.nThis is not a restrictive assumption, since we can always use b0 to normalize E(u) to

12、0.n上述推导说明我们总可以通过调整常数项来实现误差项的均值为零, 因此该假定的限制性不大.Intermediate Econometrics Yan Shen13Zero Conditional Mean Assumption 条件期望零值假定 n We need to make a crucial assumption about how u and x are related n We want it to be the case that knowing something about x does not give us any information about u, so tha

13、t they are completely unrelated. That isE(u|x) = E(u)。(P25)(阅读)P25FIG.2.1的阅读我们需要对u和 x之间的关系做一个关键假定。理想状况是对x的了解并不增加对u的任何信息。换句话说,我们需要u和 x完全不相关。Intermediate Econometrics Yan Shen14Zero Conditional Mean Assumption 条件期望零值假定 nSince we have assumed E(u) = 0, therefore, E(u|x) = E(u) = 0. (2.6)nWhat does it m

14、ean?由于我们已经假定了E(u) = 0,因此有E(u|x) = E(u) = 0。该假定是何含义?Intermediate Econometrics Yan Shen15Zero Conditional Mean Assumption 条件期望零值假定 nIn the example of education, suppose u represents innate ability, zero conditional mean assumption meansE(ability|edu=6)=E(ability|edu=18)=0.nThe average level of ability

15、 is the same regardless of years of education.n在教育一例中,假定u 代表内在能力,条件期望零值假定说明不管解释教育的年限如何,该能力的平均值相同。 Intermediate Econometrics Yan Shen16Zero Conditional Mean Assumption 条件期望零值假定 nQuestion: Suppose that a score on a final exam, score, depends on classes attended (attend) and unobserved factors that aff

16、ect exam performance (such as student ability). Then consider model score =b0 + b1attend +unWhen would you expect it satisfy (2.6)?n假设期末成绩分数取决于出勤次数和影响学生现场发挥的因素,如学生个人素质。那么上述模型中假设(2.6)何时能够成立?Intermediate Econometrics Yan Shen17Zero Conditional Mean Assumption 条件期望零值假定 n(2.6) implies the population reg

17、ression function, E(y|x) , satisfies E(y|x) = b0 + b1x.nE(y|x) as a linear function of x, where for any x the distribution of y is centered about E(y|x).n(2.6)说明总体回归函数应满足E(y|x) = b0 + b1x。该函数是x的线性函数,y的分布以它为中心。Intermediate Econometrics Yan Shen18.x1=5x2 =10E(y|x) = b0 + b1xyf(y)给定x时y的条件分布Intermediate

18、 Econometrics Yan Shen19Deriving the Ordinary Least Squares Estimates 普通最小二乘法的推导n Basic idea of regression is to estimate the population parameters from a samplen Let (xi,yi): i=1, ,n denote a random sample of size n from the populationn For each observation in this sample, it will be the case that

19、yi = b0 + b1xi + ui回归的基本思想是从样本去估计总体参数。 我们用(xi,yi): i=1, ,n 来表示一个随机样本,并假定每一观测值满足yi = b0 + b1xi + ui。Intermediate Econometrics Yan Shen20.y4y1y2y3x1x2x3x4u1u2u3u4xyPopulation regression line, sample data pointsand the associated error terms总体回归线,样本观察点和相应误差E(y|x) = b b0 + b b1xIntermediate Econometrics

20、 Yan Shen21Deriving OLS Estimates普通最小二乘法的推导n To derive the OLS estimator we need to realize that our main assumption of E(u|x) = E(u) = 0 also implies thatn Cov(x,u) = E(xu) = 0 (P27)nWhy? Remember from basic probability that Cov(X,Y) = E(XY) E(X)E(Y)由E(u|x) = E(u) = 0 可得Cov(x,u) = E(xu) = 0 。Interm

21、ediate Econometrics Yan Shen22Deriving OLS continued普通最小二乘法的推导n We can write our 2 restrictions just in terms of x, y, b0 and b1 , since u = y b0 b1xn E(y b0 b1x) = 0n Ex(y b0 b1x) = 0nThese are called moment restrictionsn可将u = y b0 b1x代入以得上述两个矩条件。Intermediate Econometrics Yan Shen23Deriving OLS usi

22、ng M.O.M.使用矩方法推导普通最小二乘法n The method of moments approach to estimation implies imposing the population moment restrictions on the sample moments。n矩方法是将总体的矩限制应用于样本中。Intermediate Econometrics Yan Shen24Derivation of OLS普通最小二乘法的推导普通最小二乘法的推导n We want to choose values of the parameters that will ensure th

23、at the sample versions of our moment restrictions are true目标是通过选择参数值,使得在样本中矩条件也可以成立。n The sample versions are as follows(P28)0011011101niiiiniiixyxnxynbbbbIntermediate Econometrics Yan Shen25Derivation of OLS普通最小二乘法的推导普通最小二乘法的推导nGiven the definition of a sample mean, and properties of summation, we

24、can rewrite the first condition as follows根据样本均值的定义以及加总的性质,可将第一个条件写为xyxy1010or,bbbbIntermediate Econometrics Yan Shen26Derivation of OLS普通最小二乘法的推导普通最小二乘法的推导niiiniiniiiniiiniiiixxyyxxxxxyyxxxyyx12111111110bbbbIntermediate Econometrics Yan Shen27So the OLS estimated slope is因此OLS估计出的斜率为(P29)-meaning 0

25、 that provided121211niiniiniiixxxxyyxxbIntermediate Econometrics Yan Shen28Summary of OLS slope estimateOLS斜率估计法总结(P29涵义阅读,P30图的理解)n The slope estimate is the sample covariance between x and y divided by the sample variance of x.n If x and y are positively correlated, the slope will be positive.n If

26、 x and y are negatively correlated, the slope will be negative.n Only need x to vary in our sample.n斜率估计量等于样本中x 和 y 的协方差除以x的方差。若x 和 y 正相关则斜率为正,反之为负。Intermediate Econometrics Yan Shen29More OLS 关于OLS的更多信息(P30阅读OLS)n Intuitively, OLS is fitting a line through the sample points such that the sum of squ

27、ared residuals is as small as possible, hence the term least squares。n The residual, , is an estimate of the error term, u, and is the difference between the fitted line (sample regression function) and the sample point。nOLS法是要找到一条直线,使残差平方和最小。n残差是对误差项的估计,因此,它是拟合直线(样本回归函数)和样本点之间的距离。Intermediate Econo

28、metrics Yan Shen30.y4y1y2y3x1x2x3x41234xySample regression line, sample data pointsand the associated estimated error terms 样本回归线,样本数据点和相关的误差估计项xy10bbIntermediate Econometrics Yan Shen31Alternate approach to derivation推导方法二(P30阅读,为什么不用别的方法?)n Given the intuitive idea of fitting a line, we can set up

29、 a formal minimization problemn That is, we want to choose our parameters such that we minimize the following:n正式解一个最小化问题,即通过选取参数而使下列值最小: niiiniixyu121012bbIntermediate Econometrics Yan Shen32Alternate approach, continued推导方法二(阅读P32)n If one uses calculus to solve the minimization problem for the tw

30、o parameters you obtain the following first order conditions, which are the same as we obtained before, multiplied by nn如果直接解上述方程我们得到下面两式,这两个式子等于前面两式乘以n00110110niiiiniiixyxxybbbbIntermediate Econometrics Yan Shen33Lecture Summary 讲义总结nIntroduce the simple linear regression model.nIntroduce the metho

31、d of ordinary least squares to estimate the slope and intercept parameters using data from a random sample.n介绍简单线性回归模型n介绍通过随机样本的数据运用普通最小二乘法估计斜率和截距的参数值Intermediate Econometrics Yan Shen34The Simple Regression Model (2)简单二元回归y = b0 + b1x + uIntermediate Econometrics Yan Shen35Chapter Outline 本章大纲nDefi

32、nition of the Simple Regression Model 简单回归模型的定义nDeriving the Ordinary Least Squares Estimates 推导普通最小二乘法的估计量nMechanics of OLS OLS的操作技巧的操作技巧nUnites of Measurement and Functional Form 测量单位和回归方程形式测量单位和回归方程形式nExpected Values and Variances of the OLS estimators OLS估计量的期望值和方差nRegression through the Origin

33、过原点的回归Intermediate Econometrics Yan Shen36Lecture Outline 讲义大纲(P38)nAlgebraic Properties of OLS OLS的代数特性nGoodness of fit 拟合优度Using Stata for OLS regression使用stata做OLS 回归nEffects of Changing Units in Measurement on OLS Statistics改变测量单位对OLS统计量的效果Intermediate Econometrics Yan Shen37 obsno salary roe sa

34、laryhat uhat 1 1095 14.1 1224 -129 2 1001 10.9 1165 -164 3 1122 23.5 1398 -276 4 578 5.9 1072 -494 5 1368 13.8 1219 149 6 1145 20 1333 -188 7 1078 16.4 1267 -189 8 1094 16.3 1265 -171 9 1237 10.5 1157 80 10 833 26.3 1450 -617 11 567 25.9 1442 -875 12 933 26.8 1459 -526 13 1339 14.8 1237 102 14 937 2

35、2.3 1375 -439 15 2011 56.3 2005 6 Mechanics of OLS OLS的操作技巧Example: CEO Salary and Return on Equity 例:CEO的薪水和资本权益报酬率Intermediate Econometrics Yan Shen38Example: CEO Salary and Return on Equity 例:CEO的薪水和资本权益报酬率nSalary: annual salary measured in $1000. In the 1990 data above, (min, mean, max)=(223, 12

36、81, 14822).n变量salary衡量了已1000美元为单位的年薪,其最小值,均值和最大值分别如上。nRoe: net income/common equity, three-year average,(0.5, 17.18,56.3)nRoe净收入/所有者权益,为三年平均值。nN=209. The estimated relation(estimated salary)=963.191 + 18.501roe.Intermediate Econometrics Yan Shen39Example: CEO Salary and Return on Equity 例:CEO的薪水和资本权

37、益报酬率nInterpretation:n对估计量的解释:n963.19: The salary that the CEO will get when roe=0.n常数项的估计值衡量了当roe为零时CEO的薪水。n18.5: If ROE increases by one percentage point, then salary is going to increase by 18.5, i.e., $18,500.nb1 的估计值反应了ROE若增加一个百分点工资将增加18500美元。nIf roe=30, what is the estimated salary?Intermediate

38、 Econometrics Yan Shen40Algebraic Properties of OLS OLS的代数性质P38:3个特性阅读,P39,几个术语阅读n The sum of the OLS residuals is zero OLS 残差和为零 (p24)n Thus, the sample average of the OLS residuals is zero as well 因此 OLS 的样本残差平均值也为零.0 n1 thus,and0) (11011niiniiniiuxyubb Intermediate Econometrics Yan Shen41Algebrai

39、c Properties of OLS OLS的代数性质nThe sample covariance between the regressors and the OLS residuals is zeron回归元(解释变量)和OLS残差之间的样本协方差为零 (p25)Intermediate Econometrics Yan Shen42Algebraic Properties of OLS OLS的代数性质nThe OLS regression line always goes through the mean of the sample.nOLS回归线总是通过样本的均值。xy10bb I

40、ntermediate Econometrics Yan Shen43Algebraic Properties of OLS OLS的代数性质nWe can think of each observation as being made up of an explained part, and an unexplained part, 我们可把每一次观测看作由被解释部分和未解释部分构成.nThen the fitted values and residuals are uncorrelated in the sample. 预测值和残差在样本中是不相关的iiiuyy 0),cov(iiuyIn

41、termediate Econometrics Yan Shen44Algebraic Properties of OLS OLS的代数性质 0)()()()()()()()(),cov(1010iiiiiiiiiiiiiiiiiuxEuEuxEuEyuyEuyEyEuEuyEyEuybbbbIntermediate Econometrics Yan Shen45More Terminology更多术语nDefine the total sum of square as 定义总平方和为21()niiSSTyyIntermediate Econometrics Yan Shen46More Te

42、rminology更多术语nSST is a measure of the total sample variation in the ys; that is, it measures how spread out the ys are in the sample. n总平方和是对y在样本中所有变动的度量,即它度量了y在样本中的分散程度If we divide SST by n-1, we obtain the sample variance of y.n将总平方和除以n-1,我们得到y的样本方差。Intermediate Econometrics Yan Shen47More Termino

43、logy更多术语nExplained Sum of Squares (SSE)is defined as 解释平方和定义为nIt measures the sample variation in the predicted value of ys. n它度量了y的预测值的在样本中的变动21()niiSSEyyIntermediate Econometrics Yan Shen48More Terminology更多术语nResidual Sum of Squares is defined as 残差平方和定义为nSSR measures the sample variation in the

44、residuals.n残差平方和度量了残差的样本变异SSR=2iu Intermediate Econometrics Yan Shen49SST, SSR and SSEnThe total variation in y can always be expressed as the sum of the explained variation SSE and the unexplained variation SSR, i.e.ny 的总变动可以表示为已解释的变动SSE和 未解释的变动SSR之和,即nSST=SSE+SSRIntermediate Econometrics Yan Shen5

45、0Proof that SST = SSE + SSR证明 SST = SSE + SSR SSE 2 SSR 222222yyuyyyyuuyyuyyyyyyiiiiiiiiiiiiIntermediate Econometrics Yan Shen51Proof that SST = SSE + SSRnTherefore, SST = SSE + SSR.nWe have used the fact that the fitted value and residuals are uncorrelated in the sample.n该证明中我们使用了一个事实, 即样本中因变量的拟合值和

46、残差不相关. 0)(and showcan one0, 0 Usingn1n1n1yyuyyuxuiiiiiiiiIntermediate Econometrics Yan Shen52Goodness-of-Fit拟合优度(P40定义)R2范围n How do we think about how well our sample regression line fits our sample data?n我们如何衡量样本回归线是否很好地拟合了样本数据呢?n Can compute the fraction of the total sum of squares (SST) that is e

47、xplained by the model, call this the R-squared of regressionn可以计算模型解释的总平方和的比例,并把它定义为回归的R-平方n R2 = SSE/SST = 1 SSR/SSTIntermediate Econometrics Yan Shen53Goodness-of-Fit拟合优度nR-squared is the ratio of the explained variation compared to the total variation. nR-平方是已解释的变动占所有变动的比例nIt is thus interpreted

48、as the fraction of the sample variation in y that is explained by x. n它因此可被看作是y的样本变动中被可以被x解释的部分nThe value of R-squared is always between zero and one.nR-平方的值总是在0和1之间Intermediate Econometrics Yan Shen54Goodness-of-Fit拟合优度nIn the social sciences, low R-squareds in regression equations are not uncommon

49、, especially for cross-sectional analysis. n在社会科学中,特别是在截面数据分析中, 回归方程得到低的R-平方值并不罕见。nIt is worth emphasizing that a seemingly low R-squared does not necessarily mean that an OLS regression equation is useless.n值得强调的是表面上低的R-平方值不一定说明OLS回归方程是没有价值的Intermediate Econometrics Yan Shen55Goodness-of-Fit拟合优度nEx

50、ample 2.8(阅读阅读P41)nCEO Salary and Return on EquityCEO薪水和净资产回报nExample 2.9nVoting outcomes and Campaign Expenditures竞选结果和选举活动开支20.0132R 20.856R Intermediate Econometrics Yan Shen56Using Stata for OLS regressions使用 Stata 进行OLS回归n Now that weve derived the formula for calculating the OLS estimates of o

51、ur parameters, youll be happy to know you dont have to compute them by handn我们已经推导出公式计算参数的OLS估计值,所幸的是我们不必亲手去计算它们。n Regressions in Stata are very simple, to run the regression of y on x, just typen在Stata中进行回归非常简单,要让y对x进行回归,只需要输入n reg y xIntermediate Econometrics Yan Shen57Units of Measurement 测量单位nSu

52、ppose the salary is measured in hundreds of dollars, rather than in thousands of dollars, say salarhun. n假定薪水的单位是美元,而不是千美元,salarys.nWhat will be the OLS intercept and slope estimates in the regression of salarhun on roe? n在Salarys对roe进行回归时OLS截距和斜率的估计值是多少?Intermediate Econometrics Yan Shen58Units of

53、Measurement 测量单位nThe estimated sample regression is changed from (estimated salarys)=963.191 + 18.501roeto (estimated salarys)=963191 + 18501roenIn general, when the dependent variable is multiplied by the constant c, but nothing has changed for the independent variable, the OLS intercept and slope

54、estimates are also multiplied by c. 一般而言,当因变量乘上常数c,而自变量不改变时,OLS的截距和斜率估计量也要乘上c。Intermediate Econometrics Yan Shen59Units of Measurement 测量单位nIf redefine roedec = roe/100, then the sample regression line will change from 如果定义 roedec = roe/100,那么样本回归线将会从(estimated salary)=963.191 + 18.501roe to 改变到 (es

55、timated salary)=963.191 + 1850.1roedecnIn general, if the independent variable is divided or multiplied by some nonzero constant, c, then the OLS slope coefficient is multiplied or divided by c, but the intercept will not change. 一般而言,如果自变量除以或乘上某个非零常数,c,那么OLS斜率将乘以或除以c,而截距则不改变。Intermediate Econometri

56、cs Yan Shen60Incorporating Nonlinearrities in Simple Regression在简单回归中加入非线性(P46线性与非线性的)nLinear relationships are not general enough for all economic applications.n线性关系并不适合所有的经济学运用n However, it is rather easy to incorporate many nonlinearities into simple regression analysis by appropriately defining

57、the dependent and independent variables. n然而,通过对因变量和自变量进行恰当的定义, 我们可以在简单回归分析中非常容易地处理许多y和x之间的非线性关系.Intermediate Econometrics Yan Shen61The Natural Logarithm自然对数n log( )yxlog( )001log(1)0log( )1xforxxforx12121212log()log()log()log(/)log()log()log()log( )cx xxxxxxxxcxlog(1)xx0forx 101000log()log()()/xxx

58、xxx x Intermediate Econometrics Yan Shen62nIn the wage-education example, now suppose the percentage increase in wage is the same, given one more year of education. n在工资-教育的例子中,假定每增加一年的教育,工资的百分比增长都是相同的nA model that gives a constant percentage effect is n能够给出不变的百分比效果的模型是nIf , we have01log()wageeducub

59、b1%(100).wageeducb0u Intermediate Econometrics Yan Shen63Example 2.10nA log Wage Equation将对数工资方程nCompared to 和该方程相比和该方程相比log()0.5840.083wageeduc526n 20.186R 0.900.54wageeduc 20.165R Intermediate Econometrics Yan Shen64nAnother important use of the natural log is in obtaining a constant elasticity mo

60、deln自然对数的另一个重要用途是用于获得弹性为常数的模型nIn the example of CEO Salary and Firm Sales, a constant elasticity model isn在CEO的薪水和企业销售额的例子中,常数弹性模型是01log()log()salarysalesubb209,n log()4.8220.257log()salarysales20.211R Intermediate Econometrics Yan Shen65Combination of functional forms available from using either th

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论