《最新多元线性回归模型:假设检验精品课件.ppt》由会员分享,可在线阅读,更多相关《最新多元线性回归模型:假设检验精品课件.ppt(41页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、2Assumptions of the Classical Linear Model (CLM) So far, we know that given the Gauss-Markov assumptions, OLS is BLUE, In order to do classical hypothesis testing, we need to add another assumption (beyond the Gauss-Markov assumptions) Assume that u is independent of x1, x2, xk and u is normally dis
2、tributed with zero mean and variance s2: u Normal(0,s2)9t Test: One-Sided Alternatives Besides our null, H0, we need an alternative hypothesis, H1, and a significance level H1 may be one-sided, or two-sided H1: bj 0 and H1: bj 0c0a(1 - a)One-Sided Alternatives (cont)Fail to rejectreject12Examples 1H
3、ourly Wage EquationH0: bexper = 0 H1: bexper 0 316. 0526)003. 0()0017. 0()007. 0()104. 0(022. 0exp0041. 0092. 0284. 0)log(2Rntenureereducgeaw13One-sided vs Two-sided Because the t distribution is symmetric, testing H1: bj 0 is straightforward. The critical value is just the negative of before We can
4、 reject the null if the t statistic than c then we fail to reject the null For a two-sided test, we set the critical value based on a/2 and reject H1: bj 0 if the absolute value of the t statistic c14yi = b0 + b1Xi1 + + bkXik + uiH0: bj = 0 H1: bj 0c0a/2(1 - a)-ca/2Two-Sided Alternativesrejectreject
5、fail to reject15Summary for H0: bj = 0 Unless otherwise stated, the alternative is assumed to be two-sided If we reject the null, we typically say “xj is statistically significant at the a % level” If we fail to reject the null, we typically say “xj is statistically insignificant at the a % level”16
6、Examples 2Determinants of College GPA colGPAcollege GPA(great point average), hsGPAhigh school GPA skippedaverage numbers of letures missed per week.234. 0141)026. 0()011. 0()094. 0()33. 0(083. 0015. 0412. 039. 12-RnskippedACThsGPAAPcolG17Testing other hypothesesA more general form of the t statisti
7、c recognizes that we may want to test something like H0: bj = aj In this case, the appropriate t statistic is()( ) teststandard for the 0 where,-jjjjaseatbb18Examples 3Campus Crime and EnrollmentH0: benroll = 1 H1: benroll 1585. 0)11. 0()03. 1 (97)log(27. 163. 6)log(2-Rnenrollmeicruenrollcrime)log()
8、log(10bb19Examples 4Housing Prices and Air PollutionH0: blog(nox) = -1 H1: blog(nox) - 1581. 0506)006. 0()019. 0()043. 0()117. 0()32. 0(052. 0255. 0)log(134. 0)log(954. 008.11)log(2-Rnstratioroomsdistnoxpriceustratioroomsdistnoxprice43210)log()log()log(bbbbb20Confidence Intervals Another way to use
9、classical statistical testing is to construct a confidence interval using the same critical value as was used for a two-sided test A (1 - a) % confidence interval is defined as( )ondistributi ain percentile 2-1 theis c where,1-knjjtsecabb21Computing p-values for t tests An alternative to the classic
10、al approach is to ask, “what is the smallest significance level at which the null would be rejected?” So, compute the t statistic, and then look up what percentile it is in the appropriate t distribution this is the p-value p-value is the probability we would observe the t statistic we did, if the n
11、ull were true22 Most computer packages will compute the p-value for you, assuming a two-sided test If you really want a one-sided alternative, just divide the two-sided p-value by 2Many software,such as Stata or Eviews provides the t statistic, p-value, and 95% confidence interval for H0: bj = 0 for
12、 you23Testing a Linear Combination Suppose instead of testing whether b1 is equal to a constant, you want to test if it is equal to another parameter, that is H0 : b1 = b2 Use same basic procedure for forming a t statistic ()2121bbbb-set24Testing Linear Combo (cont)()()()( )( )()()( )( )()2112211222
13、21212121212121, of estimatean is where2,2 then,SincebbbbbbbbbbbbbbbbCovssseseseCovVarVarVarVarse-25Testing a Linear Combo (cont) So, to use formula, need s12, which standard output does not have Many packages will have an option to get it, or will just perform the test for youMore generally, you can
14、 always restate the problem to get the test you want26Examples 5 Suppose you are interested in the effect of campaign expenditures on outcomes Model is voteA = b0 + b1log(expendA) + b2log(expendB) + b3prtystrA + u H0: b1 = - b2, or H0: q1 = b1 + b2 = 0 b1 = q1 b2, so substitute in and rearrange vote
15、A = b0 + q1log(expendA) + b2log(expendB - expendA) + b3prtystrA + u27Example (cont): This is the same model as originally, but now you get a standard error for b1 b2 = q1 directly from the basic regression Any linear combination of parameters could be tested in a similar manner Other examples of hyp
16、otheses about a single linear combination of parameters:nb1 = 1 + b2 ; b1 = 5b2 ; b1 = -1/2b2 ; etc 28Multiple Linear Restrictions Everything weve done so far has involved testing a single linear restriction, (e.g. b1 = 0 or b1 = b2 ) However, we may want to jointly test multiple hypotheses about ou
17、r parameters A typical example is testing “exclusion restrictions” we want to know if a group of parameters are all equal to zero29Testing Exclusion Restrictions Now the null hypothesis might be something like H0: bk-q+1 = 0, . , bk = 0 The alternative is just H1: H0 is not true Cant just check each
18、 t statistic separately, because we want to know if the q parameters are jointly significant at a given level it is possible for none to be individually significant at that level30Exclusion Restrictions (cont) To do the test we need to estimate the “restricted model” without xk-q+1, , xk included, a
19、s well as the “unrestricted model” with all xs included Intuitively, we want to know if the change in SSR is big enough to warrant inclusion of xk-q+1, , xk ()()edunrestrict isur and restricted isr where,1-knSSRqSSRSSRFururr31The F statistic The F statistic is always positive, since the SSR from the
20、 restricted model cant be less than the SSR from the unrestricted Essentially the F statistic is measuring the relative increase in SSR when moving from the unrestricted to restricted model q = number of restrictions, or dfr dfur n k 1 = dfur32The F statistic (cont) To decide if the increase in SSR
21、when we move to a restricted model is “big enough” to reject the exclusions, we need to know about the sampling distribution of our F stat Not surprisingly, F Fq,n-k-1, where q is referred to as the numerator degrees of freedom and n k 1 as the denominator degrees of freedom 330ca(1 - a)f(F)FThe F s
22、tatistic (cont)rejectfail to rejectReject H0 at a significance level if F c34Example:Major League Baseball Players Salaryurbisyrhrunsyrbavggamesyryearssalary543210)log(bbbbbb6278. 0186.183353)0072. 0()0161. 0()00110. 0(0108. 00144. 000098. 0)0026. 0()0121. 0()29. 0(0126. 00689. 010.11)log(2RSSRnrbis
23、yrhrunsyrbavggamesyryearssalaryugamesyryearssalary210)log(bbb5971. 0311.198353)0013. 0()0125. 0()11. 0(0202. 00713. 022.11)log(2RSSRngamesyryearssalary35Relationship between F and t StatThe F statistic is intended to detect whether any combination of a set of coefficients is different from zero, The
24、 t test is best suited for testing a single hypothesis.Group a bunch of insignificant varialbes with a significant variable, it is possible conclude that the entire set of variables is jointly insignificant. Often, when a variable is very statistically significant and it is tested jointly with anoth
25、er set of variables, the set will be jointly significant. 36The R2 form of the F statistic Because the SSRs may be large and unwieldy, an alternative form of the formula is useful We use the fact that SSR = SST(1 R2) for any regression, so can substitute in for SSRu and SSRur()()()edunrestrict isur
26、and restricted isr again where,11222-knRqRRFurrur37Overall Significance A special case of exclusion restrictions is to test H0: b1 = b2 = bk = 0 Since the R2 from a model with only an intercept will be zero, the F statistic is simply()()1122-knRkRF38General Linear Restrictions The basic form of the
27、F statistic will work for any set of linear restrictions First estimate the unrestricted model and then estimate the restricted model In each case, make note of the SSR Imposing the restrictions can be tricky will likely have to redefine variables again39Example: Use same voting model as before Mode
28、l is voteA = b0 + b1log(expendA) + b2log(expendB) + b3prtystrA + u now null is H0: b1 = 1, b3 = 0 Substituting in the restrictions: voteA = b0 + log(expendA) + b2log(expendB) + u, so Use voteA - log(expendA) = b0 + b2log(expendB) + u as restricted model40F Statistic Summary Just as with t statistics, p-values can be calculated by looking up the percentile in the appropriate F distributionIf only one exclusion is being tested, then F = t2, and the p-values will be the same