Transcription of Examples of Multiple Linear Regression Models - Queen's U
1 ECON 351*: Examples of Multiple Regression Models Abbott Examples of Multiple Linear Regression Models Data: Stata tutorial data set in text file or Sample data: A cross-sectional sample of 74 cars sold in North America in 1978. Variable definitions: price i = the price of the i-th car (in US dollars);. wgt i = the weight of the i-th car (in pounds);. mpg i = the fuel efficiency of the i-th car (in miles per gallon);. foreign i = 1 if the i-th car is manufactured outside North America, = 0 otherwise. File: Page 1 of 21. ECON 351*: Examples of Multiple Regression Models Abbott Multiple Linear Regression model (1). The PRE is: pricei = 1 + 2 wgt i + 3 wgt i2 + u i . (1). k = 3; k 1=2. The regressor wgt i2 is called an interaction variable. It is the product of wgt i with itself; it is a second-order polynomial term in the variable wgt i . Marginal or partial effect of wgti The marginal effect of wgti on pricei is obtained by partially differentiating Regression equation (2) with respect to wgti.
2 Pricei E (pricei wgt i ) E(pricei ). = = = 2 + 2 3 wgt i . wgt i wgt i wgt i Marginal effect of wgti on pricei is a Linear function of wgti. It is not a constant. Hypotheses of interest 1. The marginal effect of wgti on pricei is zero: , wgti has no effect on pricei; or car pricei is unrelated to car wgti. pricei H0: 2 = 0 and 3 = 0 = 2 + 2 3 wgt i = 0 . wgt i Restricted model corresponding to H0: set 2 = 0 and 3 = 0 in PRE (1). price i = 1 + u i . k0 = 1; k0 1 = 0. pricei H1: 2 0 and/or 3 0 = 2 + 2 3 wgt i . wgt i Unrestricted model corresponding to H1: is PRE (1). File: Page 2 of 21. ECON 351*: Examples of Multiple Regression Models Abbott 2. The marginal effect of wgti on pricei is constant: , it does not depend on wgti. pricei H0: 3 = 0 = 2 + 2 3 wgt i = 2 . wgt i Restricted model corresponding to H0: set 3 = 0 in PRE (1). price i = 1 + 2 wgt i + u i . k0 = 2; k0 1 = 1. pricei H1: 3 0 = 2 + 2 3 wgt i.
3 Wgt i Unrestricted model corresponding to H1: is PRE (1). pricei = 1 + 2 wgt i + 3 wgt i2 + u i . (1). k = 3; k 1=2. The OLS SRE for model (1).. regress price wgt wgtsq Source | SS df MS Number of obs = 74. ---------+------------------------------ F( 2, 71) = model | 250285462 2 125142731 Prob > F = Residual | 384779934 71 R-squared = ---------+------------------------------ Adj R-squared = Total | 635065396 73 Root MSE = ---------------------------------------- -------------------------------------- price | Coef. Std. Err. t P>|t| [95% Conf. Interval]. ---------+------------------------------ -------------------------------------- wgt | wgtsq | .0015142 .0004337 .0006494 .002379. _cons | ---------------------------------------- -------------------------------------- . test wgt wgtsq F-test of hypothesis 1. ( 1) wgt = ( 2) wgtsq = F( 2, 71) = Prob > F = File: Page 3 of 21. ECON 351*: Examples of Multiple Regression Models Abbott 3.
4 The marginal effect of wgti on pricei is decreasing in wgti: , the marginal effect of wgti on pricei exhibits decreasing marginal returns in wgti. 2 pricei H0: 3 = 0 or 3 0 = 2 3 0 . wgt i2. pricei 2 pricei H1: 3 < 0 = 2 + 2 3 wgt i and = 2 3 < 0 . wgt i wgt i2. a one-sided alternative hypothesis a left-tail test Perform a left-tail t-test using the OLS coefficient estimate 3 of 3 for the unrestricted model corresponding to H1, which is PRE (1): pricei = 1 + 2 wgt i + 3 wgt i2 + u i . (1). k = 3; k 1 = 2; N k = N 3. 4. The marginal effect of wgti on pricei is increasing in wgti: , the marginal effect of wgti on pricei exhibits increasing marginal returns in wgti. 2 pricei H0: 3 = 0 or 3 0 = 2 3 0 . wgt i2. pricei 2 pricei H1: 3 > 0 = 2 + 2 3 wgt i and = 2 3 > 0 . wgt i wgt i2. a one-sided alternative hypothesis a right-tail test Perform a right-tail t-test using the OLS coefficient estimate 3 of 3 for the unrestricted model corresponding to H1, which is PRE (1): pricei = 1 + 2 wgt i + 3 wgt i2 + u i.
5 (1). k = 3; k 1 = 2; N k = N 3. File: Page 4 of 21. ECON 351*: Examples of Multiple Regression Models Abbott Multiple Linear Regression model (2). The PRE is: pricei = 1 + 2 wgt i + 3 wgt i2 + 4 mpg i + u i . (2). k = 4; k 1 = 3. Marginal or partial effect of wgti The marginal effect of wgti on pricei is obtained by partially differentiating Regression equation (2) with respect to wgti. pricei E (pricei wgt i , mpg i ) E(pricei ). = = = 2 + 2 3 wgt i . wgt i wgt i wgt i Marginal effect of wgti on pricei is a Linear function of wgti; it is not a constant. Marginal or partial effect of mpgi The marginal or partial effect of mpgi mpg i on pricei is obtained by partially differentiating Regression equation (2) with respect to mpgi. pricei E(pricei wgt i , mpg i ) E(pricei ). = = = 4 . mpg i mpg i mpg i Marginal effect of mpgi on pricei is constant: it does not vary with any observable variable.
6 Hypotheses of interest 1. The marginal effect of wgti on pricei is zero: , wgti has no effect on pricei; or car pricei is unrelated to car wgti. 2. The marginal effect of wgti on pricei is constant: , it does not depend on wgti. 3. The marginal effect of mpgi on pricei is zero: , mpgi has no effect on pricei; or car pricei is unrelated to fuel efficiency as measured by mpgi. File: Page 5 of 21. ECON 351*: Examples of Multiple Regression Models Abbott 1. The marginal effect of wgti on pricei is zero: , wgti has no effect on pricei; or car pricei is unrelated to car wgti. pricei H0: 2 = 0 and 3 = 0 = 2 + 2 3 wgt i = 0 . wgt i Restricted model corresponding to H0: set 2 = 0 and 3 = 0 in PRE (2). price i = 1 + 4 mpg i + u i . k0 = 2; k0 1 = 1. pricei H1: 2 0 and/or 3 0 = 2 + 2 3 wgt i . wgt i Unrestricted model corresponding to H1: is PRE (2). pricei = 1 + 2 wgt i + 3 wgt i2 + 4 mpg i + u i.
7 (2). k = 4; k 1 = 3. 2. The marginal effect of wgti on pricei is constant: , it does not depend on wgti. pricei H0: 3 = 0 = 2 + 2 3 wgt i = 2 . wgt i Restricted model corresponding to H0: set 3 = 0 in PRE (2). price i = 1 + 2 wgt i + 4 mpg i + u i . k0 = 3; k0 1 = 2. pricei H1: 3 0 = 2 + 2 3 wgt i . wgt i Unrestricted model corresponding to H1: is PRE (2). pricei = 1 + 2 wgt i + 3 wgt i2 + 4 mpg i + u i . (2). k = 4; k 1 = 3. File: Page 6 of 21. ECON 351*: Examples of Multiple Regression Models Abbott 3. The marginal effect of mpgi on pricei is zero: , mpgi has no effect on pricei; or car pricei is unrelated to fuel efficiency as measured by mpgi. pricei H0: 4 = 0 = 4 = 0 . mpg i Restricted model corresponding to H0: set 4 = 0 in PRE (2). price i = 1 + 2 wgt i + 3 wgt i2 + u i . k0 = 3; k0 1 = 2. price i H1: 4 0 = 4 . mpg i Unrestricted model corresponding to H1: is PRE (2). pricei = 1 + 2 wgt i + 3 wgt i2 + 4 mpg i + u i.
8 (2). k = 4; k 1 = 3. File: Page 7 of 21. ECON 351*: Examples of Multiple Regression Models Abbott The OLS SRE for model (2). pricei = 1 + 2 wgt i + 3 wgt i2 + 4 mpg i + u i . (2).. regress price wgt wgtsq mpg Source | SS df MS Number of obs = 74. ---------+------------------------------ F( 3, 70) = model | 262753599 3 Prob > F = Residual | 372311797 70 R-squared = ---------+------------------------------ Adj R-squared = Total | 635065396 73 Root MSE = ---------------------------------------- -------------------------------------- price | Coef. Std. Err. t P>|t| [95% Conf. Interval]. ---------+------------------------------ -------------------------------------- wgt | wgtsq | .0016794 .000443 .0007958 .002563. mpg | _cons | ---------------------------------------- -------------------------------------- . test wgt wgtsq F-test of hypothesis 1. ( 1) wgt = ( 2) wgtsq = F( 2, 70) = Prob > F =.
9 Test wgtsq F-test of hypothesis 2. ( 1) wgtsq = F( 1, 70) = Prob > F = . test mpg F-test of hypothesis 3. ( 1) mpg = F( 1, 70) = Prob > F = . lincom mpg t-test of hypothesis 3. ( 1) mpg = ---------------------------------------- -------------------------------------- price | Coef. Std. Err. t P>|t| [95% Conf. Interval]. ---------+------------------------------ -------------------------------------- (1) | ---------------------------------------- -------------------------------------- File: Page 8 of 21. ECON 351*: Examples of Multiple Regression Models Abbott Multiple Linear Regression model (3). The PRE is: pricei = 1 + 2 wgt i + 3 wgt i2 + 4 mpg i + 5 mpg i2 + u i . (3). k = 5; k 1 = 4. Marginal or partial effect of wgti pricei E(pricei wgt i , mpg i ) E(pricei ). = = = 2 + 2 3 wgt i . wgt i wgt i wgt i Marginal effect of wgti on pricei is a Linear function of wgti; it is not a constant.
10 Marginal or partial effect of mpgi pricei E(pricei wgt i , mpg i ) E(pricei ). = = = 4 + 2 5 mpg i . mpg i mpg i mpg i Marginal effect of mpgi on pricei is a Linear function of mpgi; it is not a constant. Hypotheses of interest 1. The marginal effect of wgti on pricei is zero: , wgti has no effect on pricei; or car pricei is unrelated to car wgti. 2. The marginal effect of wgti on pricei is constant: , it does not depend on wgti or mpgi. 3. The marginal effect of mpgi on pricei is zero: , mpgi has no effect on pricei; or car pricei is unrelated to fuel efficiency as measured by mpgi. 4. The marginal effect of mpgi on pricei is constant: , it does not depend on mpgi or wgti. File: Page 9 of 21. ECON 351*: Examples of Multiple Regression Models Abbott 1. The marginal effect of wgti on pricei is zero: , wgti has no effect on pricei; or car pricei is unrelated to car wgti. pricei H0: 2 = 0 and 3 = 0 = 2 + 2 3 wgt i = 0.