Presentation is loading. Please wait.

Presentation is loading. Please wait.

Econometrics I Professor William Greene Stern School of Business

Similar presentations


Presentation on theme: "Econometrics I Professor William Greene Stern School of Business"— Presentation transcript:

1 Econometrics I Professor William Greene Stern School of Business
Department of Economics

2 Econometrics I Part 8 – Interval Estimation and Hypothesis Testing

3 Interval Estimation b = point estimator of 
We acknowledge the sampling variability. Estimated sampling variance b =  + sampling variability induced by 

4 Point estimate is only the best single guess
Form an interval, or range of plausible values Plausible  likely values with acceptable degree of probability. To assign probabilities, we require a distribution for the variation of the estimator. The role of the normality assumption for 

5 Confidence Interval bk = the point estimate
Std.Err[bk] = sqr{[σ2(XX)-1]kk} = vk Assume normality of ε for now: bk ~ N[βk,vk2] for the true βk. (bk-βk)/vk ~ N[0,1] Consider a range of plausible values of βk given the point estimate bk. bk  sampling error. Measured in standard error units, |(bk – βk)/ vk| < z* Larger z*  greater probability (“confidence”) Given normality, e.g., z* = 1.96  95%, z*=1.64590% Plausible range for βk then is bk ± z* vk

6 Computing the Confidence Interval
Assume normality of ε for now: bk ~ N[βk,vk2] for the true βk. (bk-βk)/vk ~ N[0,1] vk = [σ2(X’X)-1]kk is not known because σ2 must be estimated. Using s2 instead of σ2, (bk-βk)/Est.(vk) ~ t[N-K]. (Proof: ratio of normal to sqr(chi-squared)/df is pursued in your text.) Use critical values from t distribution instead of standard normal. Will be the same as normal if N > 100.

7 Confidence Interval Critical t[.975,29] = 2.045
Confidence interval based on t:  * .1501 Confidence interval based on normal:  * .1501

8 Bootstrap Confidence Interval For a Coefficient

9 Bootstrap CI for Least Squares

10 Bootstrap CI for Least Absolute Deviations

11 Econometrics I Part 8.1 – Hypothesis Testing

12 Testing a Hypothesis Using a Confidence Interval
Given the range of plausible values Testing the hypothesis that a coefficient equals zero or some other particular value: Is the hypothesized value in the confidence interval? Is the hypothesized value within the range of plausible values? If not, reject the hypothesis.

13 Test a Hypothesis About a Coefficient

14 Classical Hypothesis Testing
We are interested in using the linear regression to support or cast doubt on the validity of a theory about the real world counterpart to our statistical model. The model is used to test hypotheses about the underlying data generating process.

15 Types of Tests Nested Models: Restriction on the parameters of a particular model y = 1 + 2x + 3z + , 3 = 0 Nonnested models: E.g., different RHS variables yt = 1 + 2xt + 3xt-1 + t yt = 1 + 2xt + 3yt-1 + wt Specification tests:  ~ N[0,2] vs. some other distribution

16 Methodology Bayesian Prior odds compares strength of prior beliefs in two states of the world Posterior odds compares revised beliefs Symmetrical treatment of competing ideas Not generally practical to carry out in meaningful situations Classical “Null” hypothesis given prominence Propose to “reject” toward default favor of “alternative” Asymmetric treatment of null and alternative Huge gain in practical applicability

17 Neyman – Pearson Methodology
Formulate null and alternative hypotheses Define “Rejection” region = sample evidence that will lead to rejection of the null hypothesis. Gather evidence Assess whether evidence falls in rejection region or not.

18 Inference in the Linear Model
Formulating hypotheses: linear restrictions as a general framework Hypothesis Testing J linear restrictions Analytical framework: y = X +  Hypothesis: R - q = 0, Substantive restrictions: What is a "testable hypothesis?"  Substantive restriction on parameters  Reduces dimension of parameter space  Imposition of restriction degrades estimation criterion

19 Testable Implications of a Theory
Investors care about nominal interest rates and expected inflation: I = b1 + b2r + b3dp + e Investors care about real interest rates I = c1 + c2(r-dp) + c3dp + e No testable restrictions implied. c1 =b1, c2=b2-b3, c3=b3. Investors care only about real interest rates I = f1 + f2(r-dp) + f3dp + e. f3 = 0

20 The General Linear Hypothesis: H0: R - q = 0
A unifying departure point: Regardless of the hypothesis, least squares is unbiased. E[b] =  The hypothesis makes a claim about the population R – q = 0. Then, if the hypothesis is true, E[Rb – q] = 0. The sample statistic, Rb – q will not equal zero. Two possibilities: Rb – q is small enough to attribute to sampling variability Rb – q is too large (by some measure) to be plausibly attributed to sampling variability Large Rb – q is the rejection region.

21 Approaches to Defining the Rejection Region
(1) Imposing the restrictions leads to a loss of fit. R2 must go down. Does it go down “a lot?” (I.e., significantly?). Ru2 = unrestricted model, Rr2 = restricted model fit. F = { (Ru2 – Rr2)/J } / [(1 – Ru2)/(N-K)] = F[J,N-K]. (2) Is Rb - q close to 0? Basing the test on the discrepancy vector: m = Rb - q. Using the Wald criterion: m(Var[m])-1m has a chi-squared distribution with J degrees of freedom But, Var[m] = R[2(X’X)-1]R. If we use our estimate of 2, we get an F[J,N-K], instead. (Note, this is based on using ee/(N-K) to estimate 2.) These are the same for the linear model

22 Testing Fundamentals - I
SIZE of a test = Probability it will incorrectly reject a “true” null hypothesis. This is the probability of a Type I error. Under the null hypothesis, F(3,100) has an F distribution with (3,100) degrees of freedom. Even if the null is true, F will be larger than the 5% critical value of 2.7 about 5% of the time.

23 Testing Procedures How to determine if the statistic is 'large.'
Need a 'null distribution.' If the hypothesis is true, then the statistic will have a certain distribution. This tells you how likely certain values are, and in particular, if the hypothesis is true, then 'large values' will be unlikely. If the observed statistic is too large, conclude that the assumed distribution must be incorrect and the hypothesis should be rejected. For the linear regression model with normally distributed disturbances, the distribution of the relevant statistic is F with J and N-K degrees of freedom.

24 Distribution Under the Null

25 A Simulation Experiment
sample ; $ matrix ; fvalues=init(1000,1,0)$ proc$ create ; fakelogc = rnn( , )$ Coefficients all = 0 regress ; quietly ; lhs = fakelogc Compute regression ; rhs=one,logq,logpl_pf,logpk_pf$ calc ; fstat = (rsqrd/3)/((1-rsqrd)/(n-4))$ Compute F matrix ; fvalues(i)=fstat$ Save 1000 Fs endproc execute ; i= 1,1000 $ replications histogram ; rhs = fvalues ; title=F Statistic for H0:b2=b3=b4=0$

26 Simulation Results 48 outcomes to the right of 2.7 in this run of the experiment.

27 Testing Fundamentals - II
POWER of a test = the probability that it will correctly reject a “false null” hypothesis This is 1 – the probability of a Type II error. The power of a test depends on the specific alternative.

28 Power of a Test Null: Mean = 0. Reject if observed mean < or > Prob(Reject null|mean=0) = 0.05 Prob(Reject null|mean=.5)= Prob(Reject null|mean=1)= Increases as the (alternative) mean rises.

29 Test Statistic For the fit measures, use a normalized measure of the loss of fit:

30 Test Statistics Forming test statistics:
For distance measures use Wald type of distance measure, W = m[Est.Var(m)]-1m An important relationship between t and F For a single restriction, m = r’b - q. The variance is r’(Var[b])r The distance measure is m / standard error of m.

31 An important relationship between t and F
For a single restriction, F[1,N-K] is the square of the t ratio.

32 Gasoline Market Regression Analysis: logG versus logIncome, logPG
The regression equation is logG = logIncome logPG Predictor Coef SE Coef T P Constant logIncome logPG S = R-Sq = 93.6% R-Sq(adj) = 93.4% Analysis of Variance Source DF SS MS F P Regression Residual Error Total

33

34 Application Time series regression, LogG = 1 + 2logY + 3logPG
+ 4logPNC + 5logPUC + 6logPPT + 7logPN + 8logPD + 9logPS +  Period = Note that all coefficients in the model are elasticities.

35 Full Model Ordinary least squares regression LHS=LG Mean = Standard deviation = Number of observs. = Model size Parameters = Degrees of freedom = Residuals Sum of squares = <******* Standard error of e = <******* Fit R-squared = <******* Adjusted R-squared = <******* Variable| Coefficient Standard Error t-ratio P[|T|>t] Mean of X Constant| *** LY| *** LPG| *** LPNC| LPUC| * LPPT| LPN| *** LPD| *** LPS| ***

36 Test About One Parameter
Is the price of public transportation really relevant? H0 : 6 = 0. Confidence interval: b6  t(.95,27)  Standard error =  2.052(.07859) =  = ( ,.27698) Contains Do not reject hypothesis Regression fit if drop? Without LPPT, R-squared= Compare R2, was , F(1,27) = [( )/1]/[( )/(36-9)] = = (with some rounding difference)

37 Hypothesis Test: Sum of Coefficients = 1?
Ordinary least squares regression LHS=LG Mean = Standard deviation = Number of observs. = Model size Parameters = Degrees of freedom = Residuals Sum of squares = <******* Standard error of e = <******* Fit R-squared = <******* Adjusted R-squared = <******* Variable| Coefficient Standard Error t-ratio P[|T|>t] Mean of X Constant| *** LY| *** LPG| *** LPNC| LPUC| * LPPT| LPN| *** LPD| *** LPS| ***

38 Imposing the Restriction
Linearly restricted regression LHS=LG Mean = Standard deviation = Number of observs. = Model size Parameters = <*** 9 – 1 restriction Degrees of freedom = Residuals Sum of squares = <*** With the restriction Residuals Sum of squares = <*** Without the restriction Fit R-squared = Restrictns. F[ 1, 27] (prob) = 8.5(.01) Not using OLS or no constant.R2 & F may be < 0 Variable| Coefficient Standard Error t-ratio P[|T|>t] Mean of X Constant| *** LY| *** LPG| *** LPNC| *** LPUC| LPPT| *** LPN| *** LPD| LPS| *** F = [( )/1] / [ /(36 – 9)] =

39 Joint Hypotheses Joint hypothesis: Income elasticity = +1, Own price elasticity = -1. The hypothesis implies that logG = β1 + logY – logPg + β4 logPNC + ... Strategy: Regress logG – logY + logPg on the other variables and Compare the sums of squares With two restrictions imposed Residuals Sum of squares = Fit R-squared = Unrestricted Residuals Sum of squares = Fit R-squared = F = (( )/2) / ( /(36-9)) = The critical F for 95% with 2,27 degrees of freedom is The hypothesis is rejected.

40 Basing the Test on R2 After building the restrictions into the model and computing restricted and unrestricted regressions: Based on R2s, F = (( )/2)/(( )/(36-9)) = (!) What's wrong? The unrestricted model used LHS = logG. The restricted one used logG-logY. The calculation is safe using the sums of squared residuals.

41 Wald Distance Measure Testing more generally about a single parameter.
Sample estimate is bk Hypothesized value is βk How far is βk from bk? If too far, the hypothesis is inconsistent with the sample evidence. Measure distance in standard error units t = (bk - βk)/Estimated vk. If t is “large” (larger than critical value), reject the hypothesis.

42 The Wald Statistic

43 Robust Tests The Wald test generally will (when properly constructed) be more robust to failures of the narrow model assumptions than the t or F Reason: Based on “robust” variance estimators and asymptotic results that hold in a wide range of circumstances. Analysis: Later in the course – after developing asymptotics.

44 Particular Cases Some particular cases:
One coefficient equals a particular value: F = [(b - value) / Standard error of b ]2 = square of familiar t ratio. Relationship is F [ 1, d.f.] = t2[d.f.] A linear function of coefficients equals a particular value (linear function of coefficients - value)2 F = Variance of linear function Note square of distance in numerator Suppose linear function is k wk bk Variance is kl wkwl Cov[bk,bl] This is the Wald statistic. Also the square of the somewhat familiar t statistic. Several linear functions. Use Wald or F. Loss of fit measures may be easier to compute.

45 Hypothesis Test: Sum of Coefficients
Do the three aggregate price elasticities sum to zero? H0 :β7 + β8 + β9 = 0 R = [0, 0, 0, 0, 0, 0, 1, 1, 1], q = [0] Variable| Coefficient Standard Error t-ratio P[|T|>t] Mean of X LPN| *** LPD| *** LPS| ***

46 Wald Test

47 Using the Wald Statistic
--> Matrix ; R = [0,1,0,0,0,0,0,0,0 / 0,0,1,0,0,0,0,0,0]$ --> Matrix ; q = [1/-1]$ --> Matrix ; list ; m = R*b - q $ Matrix M has 2 rows and 1 columns. 1 1| 2| --> Matrix ; list ; vm = R*varb*R' $ Matrix VM has 2 rows and 2 columns. 1| 2| --> Matrix ; list ; w = m'<vm>m $ Matrix W has 1 rows and 1 columns. 1| Joint hypothesis: b(LY) = 1 b(LPG) = -1

48 Application: Cost Function

49 Regression Results Ordinary least squares regression LHS=C Mean = Standard deviation = Number of observs. = Model size Parameters = Degrees of freedom = Residuals Sum of squares = Standard error of e = Fit R-squared = Adjusted R-squared = Variable| Coefficient Standard Error t-ratio P[|T|>t] Mean of X Constant| K| L| *** F| Q| *** Q2| *** QK| QL| *** QF| ** Note: ***, **, * = Significance at 1%, 5%, 10% level.

50 Price Homogeneity: Only Price Ratios Matter β2 + β3 + β4 = 1
Linearly restricted regression LHS=C Mean = Standard deviation = Number of observs. = Model size Parameters = Degrees of freedom = Residuals Sum of squares = Standard error of e = Fit R-squared = Restrictns. F[ 2, 149] (prob) = (.0003) Not using OLS or no constant. Rsqrd & F may be < 0 Variable| Coefficient Standard Error t-ratio P[|T|>t] Mean of X Constant| *** K| ** L| F| ** Q| *** Q2| *** QK| QL| QF|

51 Imposing the Restrictions
Alternatively, compute the restricted regression by converting to price ratios and Imposing the restrictions directly. This is a regression of log(c/pf) on log(pk/pf), log(pl/pf) etc. Ordinary least squares regression LHS=LOGC_PF Mean = Standard deviation = Number of observs. = Model size Parameters = Degrees of freedom = Residuals Sum of squares = (restricted) Residuals Sum of squares = (unrestricted) Variable| Coefficient Standard Error t-ratio P[|T|>t] Mean of X Constant| *** LOGQ| *** LOGQSQ| *** LOGPK_PF| ** LOGPL_PF| LQ_LPKPF| LQ_LPLPF| F Statistic = (( – )/2) / ( /(158-9)) = 8.52 (This is a problem. The underlying theory requires linear homogeneity in prices.)

52 Wald Test of the Restrictions Chi squared = J*F
wald ; fn1 = b_k + b_l + b_f - 1 ; fn2 = b_qk + b_ql + b_qf – 0 $ WALD procedure. Estimates and standard errors for nonlinear functions and joint test of nonlinear restrictions. Wald Statistic = Prob. from Chi-squared[ 2] = Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] Fncn(1)| *** Fncn(2)| *** Note: ***, **, * = Significance at 1%, 5%, 10% level. Recall: F Statistic = (( – )/2) / ( /(158-9)) = 8.52 The chi squared statistic is JF. Here, 2F = = the chi squared.

53 Test of Homotheticity Cross Product Terms = 0
Homothetic Production: β7 = β8 = β9 = 0. With linearity homogeneity in prices already imposed, this is β6 = β7 = 0. WALD procedure. Estimates and standard errors for nonlinear functions and joint test of nonlinear restrictions. Wald Statistic = Prob. from Chi-squared[ 2] = Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] Fncn(1)| Fncn(2)| The F test would produce F = (( – )/1)/( /(158-7)) = 1.285

54 Econometrics I Part 8.2 – Restrictions

55 Linear Least Squares Subject to Restrictions
Restrictions: Theory imposes certain restrictions on parameters. Some common applications  Dropping variables from the equation = certain coefficients in b forced to equal 0. (Probably the most common testing situation. “Is a certain variable significant?”)  Adding up conditions: Sums of certain coefficients must equal fixed values. Adding up conditions in demand systems. Constant returns to scale in production functions.  Equality restrictions: Certain coefficients must equal other coefficients. Using real vs. nominal variables in equations. General formulation for linear restrictions: Minimize the sum of squares, ee, subject to the linear constraint Rb = q.

56 Restricted Least Squares

57 Restricted Least Squares Solution
General Approach: Programming Problem Minimize for  L = (y - X)(y - X) subject to R = q Each row of R is the K coefficients in a restriction. There are J restrictions: J rows 3 = 0: R = [0,0,1,0,…] q = (0). 2 = 3: R = [0,1,-1,0,…] q = (0) 2 = 0, 3 = 0: R = 0,1,0,0,… q = ,0,1,0,…

58 Solution Strategy Quadratic program: Minimize quadratic criterion subject to linear restrictions All restrictions are binding Solve using Lagrangean formulation Minimize over (,) L* = (y - X)(y - X) + 2(R-q) (The 2 is for convenience – see below.)

59 Restricted LS Solution

60 Restricted Least Squares

61 Aspects of Restricted LS
1. b* = b - Cm where m = the “discrepancy vector” Rb - q. Note what happens if m = 0. What does m = 0 mean? 2. =[R(XX)-1R]-1(Rb - q) = [R(XX)-1R]-1m. When does  = 0. What does this mean? 3. Combining results: b* = b - (XX)-1R. How could b* = b?

62

63 Example: Panel Data on Spanish Dairy Farms
N = 247 farms, T = 6 years ( ) Units Mean Std. Dev. Minimum Maximum OutputMilk Milk production (liters) 131,107 92,584 14,410 727,281 Input Cows # of milking cows 22.12 11.27 4.5 82.3 Labor # man-equivalent units 1.67 0.55 1.0 4.0 Land Hectares of land devoted to pasture and crops. 12.99 6.17 2.0 45.1 Input Feed Total amount of feedstuffs fed to dairy cows (Kg) 57,941 47,981 3,924.14 376,732

64 Application y = log output
x = Cobb douglas production: x = 1,x1,x2,x3,x4 = constant and logs of 4 inputs (5 terms) z = Translog terms, x12, x22, etc. and all cross products, x1x2, x1x3, x1x4, x2x3, etc. (10 terms) w = (x,z) (all 15 terms) Null hypothesis is Cobb Douglas, alternative is translog = Cobb-Douglas plus second order terms.

65 Translog Regression Model
x H0:z=0

66 F test based on the change in fit

67 Chi squared test based on the Wald distance (from 0)
Close to 0?

68 Likelihood Ratio Test The normality assumption
Does it work ‘approximately?’ For any regression model yi = h(xi,)+εi where εi ~N[0,2], (linear or nonlinear), at the linear (or nonlinear) least squares estimator, however computed, with or without restrictions, This forms the basis for likelihood ratio tests.

69

70 The LM test Theory 1. b* = b - Cm where Practice:
m = the “discrepancy vector” Rb - q. 2. =[R(XX)-1R]-1(Rb - q) = [R(XX)-1R]-1m. When does  = 0. What does this mean? 3. Test  = 0 using a Wald test Practice: 1. Compute residuals from restricted regression, e0 2. Regress e0 on unrestricted spec, 3. LM = NR2 = N(1 - ResidualSS / e0’e0 )

71 LM test: Chi squared = N * (uncentered R2 of e(short) on [X,Z]).
= N * [RSS/ e0’e0] = N * [ / ] = 41.36


Download ppt "Econometrics I Professor William Greene Stern School of Business"

Similar presentations


Ads by Google