library(ISLR2)
attach(Auto)
problem 10
Problem 2
Describe the null hypotheses to which the p-values given in Table 3.4 correspond. Explain what conclusions you can draw based on these p-values. Your explanation should be phrased in terms of sales, TV, radio, and newspaper, rather than in terms of the coefficients of the linear model.
The null hypotheses associated with table 3.4 are that advertising budgets of “TV”, “radio” or “newspaper” do not have an effect on sales. More precisely H(1)0:β1=0, H(2)0:β2=0 and H(3)0:β3=0. The corresponding p-values are highly significant for “TV” and “radio” and not significant for “newspaper”; so we reject H(1)0 and H(2)0 and we do not reject H(3)0. We may conclude that newspaper advertising budget do not affect sales
Problem 9
This question involves the use of multiple linear regression on the Auto
data set.
(a) Produce a scatterplot matrix which includes all of the variables in the data set.
pairs(Auto)
(b) Compute the matrix of correlations between the variables using the DataFrame.corr() method.
names(Auto)
[1] "mpg" "cylinders" "displacement" "horsepower" "weight"
[6] "acceleration" "year" "origin" "name"
cor(Auto[1:8])
mpg cylinders displacement horsepower weight
mpg 1.0000000 -0.7776175 -0.8051269 -0.7784268 -0.8322442
cylinders -0.7776175 1.0000000 0.9508233 0.8429834 0.8975273
displacement -0.8051269 0.9508233 1.0000000 0.8972570 0.9329944
horsepower -0.7784268 0.8429834 0.8972570 1.0000000 0.8645377
weight -0.8322442 0.8975273 0.9329944 0.8645377 1.0000000
acceleration 0.4233285 -0.5046834 -0.5438005 -0.6891955 -0.4168392
year 0.5805410 -0.3456474 -0.3698552 -0.4163615 -0.3091199
origin 0.5652088 -0.5689316 -0.6145351 -0.4551715 -0.5850054
acceleration year origin
mpg 0.4233285 0.5805410 0.5652088
cylinders -0.5046834 -0.3456474 -0.5689316
displacement -0.5438005 -0.3698552 -0.6145351
horsepower -0.6891955 -0.4163615 -0.4551715
weight -0.4168392 -0.3091199 -0.5850054
acceleration 1.0000000 0.2903161 0.2127458
year 0.2903161 1.0000000 0.1815277
origin 0.2127458 0.1815277 1.0000000
(c) Use the sm.OLS() function to perform a multiple linear regression with mpg as the response and all other variables except name as the predictors. Use the summarize() function to print the results. Comment on the output. For instance:
i. Is there a relationship between the predictors and the response?
<- lm(mpg ~ . - name, data = Auto)
fit2 summary(fit2)
Call:
lm(formula = mpg ~ . - name, data = Auto)
Residuals:
Min 1Q Median 3Q Max
-9.5903 -2.1565 -0.1169 1.8690 13.0604
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -17.218435 4.644294 -3.707 0.00024 ***
cylinders -0.493376 0.323282 -1.526 0.12780
displacement 0.019896 0.007515 2.647 0.00844 **
horsepower -0.016951 0.013787 -1.230 0.21963
weight -0.006474 0.000652 -9.929 < 2e-16 ***
acceleration 0.080576 0.098845 0.815 0.41548
year 0.750773 0.050973 14.729 < 2e-16 ***
origin 1.426141 0.278136 5.127 4.67e-07 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 3.328 on 384 degrees of freedom
Multiple R-squared: 0.8215, Adjusted R-squared: 0.8182
F-statistic: 252.4 on 7 and 384 DF, p-value: < 2.2e-16
We can answer this question by again testing the hypothesis H0:βi=0 ∀i. The p-value corresponding to the F-statistic is 2.037105910^{-139}, this indicates a clear evidence of a relationship between “mpg” and the other predictors.
ii. Which predictors appear to have a statistically significant relationship to the response?
We can answer this question by checking the p-values associated with each predictor’s t-statistic. We may conclude that all predictors are statistically significant except “cylinders”, “horsepower” and “acceleration”.
iii. What does the coefficient for the year variable suggest?
The coefficient ot the “year” variable suggests that the average effect of an increase of 1 year is an increase of 0.7507727 in “mpg” (all other predictors remaining constant). In other words, cars become more fuel efficient every year by almost 1 mpg / year.
(d) Produce some of diagnostic plots of the linear regression fit as described in the lab. Comment on any problems you see with the fit. Do the residual plots suggest any unusually large outliers? Does the leverage plot identify any observations with unusually high leverage?
par(mfrow = c(2, 2))
plot(fit2)
As before, the plot of residuals versus fitted values indicates the presence of mild non linearity in the data. The plot of standardized residuals versus leverage indicates the presence of a few outliers (higher than 2 or lower than -2) and one high leverage point (point 14).
(e) Fit some models with interactions as described in the lab. Do any interactions appear to be statistically significant?
From the correlation matrix, we obtained the two highest correlated pairs and used them in picking interaction effects.
<- lm(mpg ~ cylinders * displacement+displacement * weight, data = Auto[, 1:8])
fit3 summary(fit3)
Call:
lm(formula = mpg ~ cylinders * displacement + displacement *
weight, data = Auto[, 1:8])
Residuals:
Min 1Q Median 3Q Max
-13.2934 -2.5184 -0.3476 1.8399 17.7723
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.262e+01 2.237e+00 23.519 < 2e-16 ***
cylinders 7.606e-01 7.669e-01 0.992 0.322
displacement -7.351e-02 1.669e-02 -4.403 1.38e-05 ***
weight -9.888e-03 1.329e-03 -7.438 6.69e-13 ***
cylinders:displacement -2.986e-03 3.426e-03 -0.872 0.384
displacement:weight 2.128e-05 5.002e-06 4.254 2.64e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 4.103 on 386 degrees of freedom
Multiple R-squared: 0.7272, Adjusted R-squared: 0.7237
F-statistic: 205.8 on 5 and 386 DF, p-value: < 2.2e-16
From the p-values, we can see that the interaction between displacement and weight is statistically signifcant, while the interactiion between cylinders and displacement is not.
Problem 10
This question should be answered using the Carseats data set.
library(ISLR2)
attach(Carseats)
<-lm(Sales ~ Price + Urban + US, data = Carseats)
fitsummary(fit)
Call:
lm(formula = Sales ~ Price + Urban + US, data = Carseats)
Residuals:
Min 1Q Median 3Q Max
-6.9206 -1.6220 -0.0564 1.5786 7.0581
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 13.043469 0.651012 20.036 < 2e-16 ***
Price -0.054459 0.005242 -10.389 < 2e-16 ***
UrbanYes -0.021916 0.271650 -0.081 0.936
USYes 1.200573 0.259042 4.635 4.86e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.472 on 396 degrees of freedom
Multiple R-squared: 0.2393, Adjusted R-squared: 0.2335
F-statistic: 41.52 on 3 and 396 DF, p-value: < 2.2e-16
(a) Fit a multiple regression model to predict Sales using Price, Urban, and US.
(b) Provide an interpretation of each coefficient in the model. Becareful—some of the variables in the model are qualitative!
From the table above, Price
and US
, are significant predictors of Sales
. For every $1 increase in Price
, sales decrease by $54. Sales at US stores are $1200 higher than stores outside of the US. Urban has no effect on sales (p=0.936)
(c) Write out the model in equation form, being careful to handle the qualitative variables properly.
$Sales = 13.043469 - 0.054459 * x_{Price} - 0.021916 * x_{Urban} + 1.200573 * x_{USYes}
(d) For which of the predictors can you reject the null hypothesis H0 : βj = 0?
Price
and US
(e) On the basis of your response to the previous question, fit a smaller model that only uses the predictors for which there is evidence of association with the outcome.
<-lm(Sales ~ Price + US, data = Carseats)
fit_smsummary(fit_sm)
Call:
lm(formula = Sales ~ Price + US, data = Carseats)
Residuals:
Min 1Q Median 3Q Max
-6.9269 -1.6286 -0.0574 1.5766 7.0515
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 13.03079 0.63098 20.652 < 2e-16 ***
Price -0.05448 0.00523 -10.416 < 2e-16 ***
USYes 1.19964 0.25846 4.641 4.71e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.469 on 397 degrees of freedom
Multiple R-squared: 0.2393, Adjusted R-squared: 0.2354
F-statistic: 62.43 on 2 and 397 DF, p-value: < 2.2e-16
(f) How well do the models in (a) and (e) fit the data?
Not great, \(R^2\) only 23%
(g) Using the model from (e), obtain 95 % confidence intervals for the coefficient(s).
confint(fit_sm)
2.5 % 97.5 %
(Intercept) 11.79032020 14.27126531
Price -0.06475984 -0.04419543
USYes 0.69151957 1.70776632
(h) Is there evidence of outliers or high leverage observations in the model from (e)?
par(mfrow=c(2,2))
plot(fit_sm)
influence.measures(fit_sm)
Influence measures of
lm(formula = Sales ~ Price + US, data = Carseats) :
dfb.1_ dfb.Pric dfb.USYs dffit cov.r cook.d hat inf
1 -4.68e-03 4.96e-03 0.026900 0.045975 1.007 7.05e-04 0.00392
2 4.17e-02 -4.42e-02 0.025407 0.058551 1.014 1.14e-03 0.00900
3 5.65e-03 -5.98e-03 0.003187 0.007653 1.018 1.96e-05 0.00995
4 -2.49e-02 2.64e-02 -0.024827 -0.047236 1.010 7.45e-04 0.00564
5 4.24e-04 -2.32e-02 0.053707 -0.069298 1.011 1.60e-03 0.00793
6 1.84e-02 -1.95e-02 0.008746 0.023345 1.020 1.82e-04 0.01288
7 -8.32e-03 2.66e-03 0.014024 -0.017881 1.015 1.07e-04 0.00720
8 -1.08e-02 1.14e-02 0.062068 0.106079 0.990 3.73e-03 0.00392
9 8.04e-04 2.29e-03 -0.007383 0.009329 1.015 2.91e-05 0.00750
10 1.63e-02 -1.73e-02 -0.040957 -0.072613 1.002 1.76e-03 0.00411
11 3.11e-03 -3.29e-03 0.003613 0.006628 1.013 1.47e-05 0.00514
12 5.30e-02 -5.61e-02 0.046280 0.091572 1.004 2.79e-03 0.00621
13 1.11e-02 -3.13e-02 0.046932 -0.064402 1.014 1.38e-03 0.00922
14 3.56e-02 -3.77e-02 0.023549 0.052047 1.013 9.04e-04 0.00813
15 -3.26e-03 3.45e-03 0.050559 0.085405 0.997 2.43e-03 0.00388
16 -4.70e-02 9.20e-02 -0.102546 0.152191 1.003 7.70e-03 0.01109
17 7.83e-03 -1.85e-03 -0.014742 0.018612 1.014 1.16e-04 0.00711
18 -6.03e-02 6.38e-02 0.074948 0.146807 0.979 7.12e-03 0.00478
19 1.36e-01 -1.44e-01 0.059885 0.168012 1.008 9.39e-03 0.01456
20 -3.72e-03 3.93e-03 0.016187 0.027875 1.010 2.60e-04 0.00395
21 7.89e-03 -8.35e-03 -0.009809 -0.019215 1.012 1.23e-04 0.00478
22 2.44e-02 -2.59e-02 0.059391 0.100708 0.993 3.37e-03 0.00415
23 3.63e-03 -9.00e-03 0.012416 -0.017355 1.017 1.01e-04 0.00964
24 -1.87e-02 5.22e-03 0.033221 -0.042137 1.013 5.93e-04 0.00715
25 6.40e-03 -6.77e-03 0.031478 0.052699 1.006 9.26e-04 0.00394
26 2.39e-01 -1.77e-01 -0.165700 0.281894 0.969 2.61e-02 0.01162 *
27 -1.43e-02 1.51e-02 0.017735 0.034739 1.011 4.03e-04 0.00478
28 -3.27e-02 1.16e-02 0.052321 -0.067102 1.010 1.50e-03 0.00726
29 -9.67e-02 1.02e-01 -0.096306 -0.183233 0.969 1.11e-02 0.00564 *
30 -1.04e-02 1.10e-02 -0.013639 -0.024475 1.012 2.00e-04 0.00486
31 1.71e-01 -1.17e-01 -0.141670 0.218753 0.981 1.58e-02 0.00983
32 -1.33e-02 1.41e-02 0.016587 0.032490 1.011 3.53e-04 0.00478
33 9.32e-03 -9.86e-03 -0.007971 -0.017421 1.013 1.01e-04 0.00570
34 -1.38e-02 1.46e-02 0.021925 0.040957 1.009 5.60e-04 0.00444
35 4.19e-02 -4.44e-02 -0.066749 -0.124690 0.986 5.15e-03 0.00444
36 3.51e-02 -3.71e-02 0.033353 0.064275 1.008 1.38e-03 0.00582
37 2.96e-02 -1.57e-02 -0.034951 0.047421 1.013 7.51e-04 0.00792
38 -1.82e-02 1.93e-02 -0.050674 -0.085522 0.998 2.43e-03 0.00408
39 -1.85e-02 9.12e-03 0.023720 -0.031589 1.014 3.33e-04 0.00768
40 1.91e-02 -4.73e-02 0.065259 -0.091217 1.011 2.77e-03 0.00964
41 -5.79e-03 -4.28e-02 0.115212 -0.146969 0.994 7.17e-03 0.00769
42 5.12e-03 1.46e-02 -0.047057 0.059461 1.012 1.18e-03 0.00750
43 -1.14e-01 1.04e-01 0.030773 -0.113868 1.051 4.33e-03 0.04334 *
44 3.94e-02 -4.17e-02 -0.039972 -0.082542 1.003 2.27e-03 0.00520
45 -8.73e-02 9.25e-02 -0.079479 -0.155182 0.984 7.97e-03 0.00601
46 3.43e-02 -3.63e-02 -0.032811 -0.069024 1.006 1.59e-03 0.00536
47 7.77e-02 -8.23e-02 0.035510 0.097200 1.016 3.15e-03 0.01371
48 -4.46e-02 1.42e-02 0.075147 -0.095815 1.005 3.06e-03 0.00720
49 -9.20e-02 5.23e-02 0.101053 -0.139932 0.998 6.50e-03 0.00818
50 -1.00e-01 1.74e-01 -0.168150 0.263200 0.979 2.28e-02 0.01255 *
51 -5.01e-02 5.30e-02 -0.108307 -0.184702 0.953 1.12e-02 0.00422 *
52 -4.39e-02 1.40e-02 0.074057 -0.094426 1.006 2.97e-03 0.00720
53 -7.01e-03 7.42e-03 0.010212 0.019367 1.012 1.25e-04 0.00454
54 1.47e-03 -1.56e-03 -0.012355 -0.020981 1.011 1.47e-04 0.00390
55 3.29e-02 -3.49e-02 -0.020405 -0.051351 1.012 8.80e-04 0.00719
56 -3.07e-02 3.25e-02 0.013392 0.041403 1.017 5.73e-04 0.01008
57 1.24e-01 -8.99e-02 -0.090119 0.149028 1.004 7.38e-03 0.01107
58 -5.06e-02 -1.52e-02 0.159478 -0.198393 0.974 1.30e-02 0.00708 *
59 -3.60e-02 3.81e-02 -0.050452 -0.089617 1.000 2.67e-03 0.00473
60 -1.80e-02 -6.85e-05 0.044160 -0.055073 1.011 1.01e-03 0.00704
61 -3.97e-03 4.21e-03 0.011643 0.020422 1.011 1.39e-04 0.00405
62 2.00e-03 -7.10e-04 -0.003202 0.004107 1.015 5.64e-06 0.00726
63 6.84e-02 -7.24e-02 -0.073995 -0.150060 0.979 7.44e-03 0.00505
64 -3.32e-03 3.51e-03 -0.004090 -0.007419 1.013 1.84e-05 0.00500
65 -7.96e-03 8.43e-03 -0.011997 -0.021106 1.012 1.49e-04 0.00461
66 2.57e-04 -1.40e-02 0.032576 -0.042033 1.014 5.90e-04 0.00793
67 2.33e-02 -1.54e-02 -0.020447 0.030757 1.016 3.16e-04 0.00941
68 1.54e-03 -1.63e-03 0.015803 0.026459 1.010 2.34e-04 0.00389
69 -9.11e-02 9.65e-02 0.092526 0.191069 0.961 1.20e-02 0.00520 *
70 8.26e-03 -4.55e-03 -0.009407 0.012891 1.016 5.55e-05 0.00804
71 9.02e-03 -9.55e-03 0.009932 0.018437 1.012 1.14e-04 0.00530
72 -1.20e-02 1.27e-02 0.005935 0.016906 1.016 9.55e-05 0.00882
73 -1.14e-02 -2.11e-03 0.032783 -0.040790 1.013 5.56e-04 0.00706
74 4.23e-02 -4.47e-02 0.063665 0.112006 0.992 4.16e-03 0.00461
75 9.70e-03 -1.03e-02 -0.008766 -0.018794 1.013 1.18e-04 0.00553
76 -1.35e-02 1.43e-02 -0.010908 -0.022176 1.014 1.64e-04 0.00664
77 8.56e-03 -9.07e-03 0.003911 0.010705 1.022 3.83e-05 0.01371
78 -3.81e-02 4.04e-02 -0.027729 -0.058767 1.011 1.15e-03 0.00735
79 4.37e-02 -4.63e-02 -0.026032 -0.066875 1.011 1.49e-03 0.00744
80 3.12e-02 -2.10e-02 -0.026604 0.040542 1.016 5.49e-04 0.00962
81 -5.93e-02 6.28e-02 -0.032660 -0.079511 1.013 2.11e-03 0.01029
82 -3.25e-04 1.77e-02 -0.041157 0.053105 1.013 9.42e-04 0.00793
83 -9.01e-02 9.54e-02 0.069639 0.158314 0.983 8.29e-03 0.00608
84 -8.75e-02 9.26e-02 -0.076361 -0.151090 0.986 7.56e-03 0.00621
85 -2.32e-02 -2.57e-02 0.117290 -0.146702 0.993 7.14e-03 0.00727
86 1.98e-02 -2.59e-03 -0.042095 0.052754 1.012 9.29e-04 0.00706
87 -1.52e-02 5.15e-02 -0.084653 0.114162 1.005 4.34e-03 0.00885
88 -3.25e-02 3.44e-02 0.063451 0.115270 0.988 4.41e-03 0.00425
89 -7.67e-03 8.12e-03 -0.024896 -0.041860 1.008 5.85e-04 0.00403
90 9.98e-03 6.11e-03 -0.038798 0.048336 1.012 7.80e-04 0.00716
91 -4.22e-02 1.98e-02 0.056206 -0.074210 1.010 1.84e-03 0.00758
92 -2.87e-02 3.04e-02 -0.055925 -0.096001 0.996 3.06e-03 0.00431
93 -3.76e-03 -1.61e-02 0.047332 -0.060078 1.012 1.20e-03 0.00759
94 2.89e-02 -1.28e-02 -0.040262 0.052732 1.012 9.28e-04 0.00749
95 -3.39e-02 3.59e-02 -0.021184 -0.048144 1.014 7.74e-04 0.00870
96 1.50e-02 -1.58e-02 -0.007960 -0.021759 1.016 1.58e-04 0.00824
97 -3.02e-02 3.20e-02 0.034931 0.069602 1.005 1.61e-03 0.00491
98 -2.45e-03 2.59e-03 0.003569 0.006769 1.012 1.53e-05 0.00454
99 -4.31e-02 4.57e-02 0.075690 0.139378 0.979 6.42e-03 0.00434
100 -2.81e-02 2.98e-02 -0.054829 -0.094121 0.996 2.95e-03 0.00431
101 -3.83e-02 4.06e-02 -0.067982 -0.117568 0.988 4.58e-03 0.00440
102 -3.19e-03 -1.41e-03 0.011111 -0.013829 1.015 6.39e-05 0.00712
103 -6.14e-02 3.59e-02 0.065142 -0.091186 1.008 2.77e-03 0.00833
104 -6.68e-02 7.07e-02 -0.063497 -0.122366 0.994 4.97e-03 0.00582
105 7.49e-03 -1.86e-02 0.025613 -0.035801 1.016 4.28e-04 0.00964
106 -5.49e-02 5.81e-02 -0.054638 -0.103954 0.999 3.59e-03 0.00564
107 4.91e-02 -1.16e-01 0.153162 -0.216141 0.982 1.54e-02 0.00986
108 2.26e-02 -7.21e-03 -0.038049 0.048514 1.012 7.86e-04 0.00720
109 -7.99e-02 3.75e-02 0.106486 -0.140596 0.996 6.56e-03 0.00758
110 2.63e-02 -1.77e-02 -0.022397 0.034131 1.016 3.89e-04 0.00962
111 7.17e-04 -7.59e-04 0.016421 0.027544 1.010 2.53e-04 0.00388
112 -1.72e-02 1.82e-02 0.008254 0.024001 1.016 1.92e-04 0.00912
113 5.00e-03 -5.29e-03 -0.010986 -0.019708 1.011 1.30e-04 0.00418
114 1.08e-02 -1.14e-02 -0.018929 -0.034856 1.010 4.06e-04 0.00434
115 7.51e-03 -7.95e-03 0.013312 0.023021 1.011 1.77e-04 0.00440
116 -2.64e-03 3.30e-02 -0.071598 0.092975 1.008 2.88e-03 0.00806
117 2.17e-04 -1.19e-02 0.027509 -0.035495 1.014 4.21e-04 0.00793
118 1.60e-02 9.82e-03 -0.062359 0.077691 1.008 2.01e-03 0.00716
119 -1.84e-02 1.94e-02 -0.020211 -0.037517 1.011 4.70e-04 0.00530
120 -1.02e-03 1.09e-03 0.001633 0.003050 1.012 3.11e-06 0.00444
121 2.58e-03 -2.73e-03 -0.003211 -0.006289 1.012 1.32e-05 0.00478
122 5.30e-02 -5.61e-02 0.036177 0.078845 1.010 2.07e-03 0.00786
123 -1.05e-02 1.11e-02 -0.022716 -0.038739 1.009 5.01e-04 0.00422
124 -7.51e-02 7.96e-02 0.031820 0.100391 1.011 3.36e-03 0.01042
125 1.50e-02 1.24e-02 -0.065936 0.082284 1.008 2.26e-03 0.00721
126 -6.68e-02 5.84e-02 0.025165 -0.068356 1.033 1.56e-03 0.02597 *
127 -5.66e-02 6.00e-02 0.061284 0.124281 0.990 5.12e-03 0.00505
128 -9.16e-04 9.69e-04 -0.020980 -0.035190 1.009 4.13e-04 0.00388
129 1.80e-02 -1.90e-02 -0.035135 -0.063829 1.005 1.36e-03 0.00425
130 4.32e-02 -4.57e-02 -0.023827 -0.063794 1.012 1.36e-03 0.00796
131 -5.30e-02 5.61e-02 -0.027877 -0.069716 1.015 1.62e-03 0.01099
132 -3.88e-02 2.43e-02 0.037317 -0.054076 1.014 9.76e-04 0.00883
133 -4.25e-02 4.50e-02 0.038402 0.082328 1.004 2.26e-03 0.00553
134 -2.14e-02 2.26e-02 -0.021291 -0.040509 1.011 5.48e-04 0.00564
135 5.94e-03 -3.28e-02 0.062996 -0.082961 1.010 2.30e-03 0.00835
136 3.25e-03 -3.44e-03 -0.018650 -0.031874 1.010 3.39e-04 0.00392
137 -8.34e-03 -6.91e-03 0.036690 -0.045786 1.013 7.00e-04 0.00721
138 -6.53e-04 -2.88e-04 0.002276 -0.002833 1.015 2.68e-06 0.00712
139 1.26e-02 -1.33e-02 0.030537 0.051781 1.007 8.95e-04 0.00415
140 5.94e-02 -6.29e-02 0.051823 0.102538 1.001 3.50e-03 0.00621
141 1.16e-02 -1.23e-02 -0.016939 -0.032125 1.010 3.45e-04 0.00454
142 -1.70e-03 9.36e-03 -0.017990 0.023691 1.016 1.88e-04 0.00835
143 1.45e-03 -6.43e-04 -0.002016 0.002640 1.015 2.33e-06 0.00749
144 1.75e-01 -1.85e-01 -0.066058 -0.225796 0.988 1.69e-02 0.01186
145 1.07e-02 2.16e-02 -0.077035 0.096957 1.005 3.13e-03 0.00741
146 -1.41e-04 1.49e-04 0.013728 0.023094 1.010 1.78e-04 0.00388
147 5.33e-03 -2.94e-02 0.056471 -0.074367 1.011 1.85e-03 0.00835
148 -4.92e-03 5.21e-03 0.041300 0.070133 1.002 1.64e-03 0.00390
149 -2.24e-02 2.37e-02 -0.022256 -0.042343 1.011 5.99e-04 0.00564
150 4.84e-02 -5.12e-02 0.033017 0.071958 1.011 1.73e-03 0.00786
151 5.65e-03 -5.98e-03 0.037533 0.062803 1.004 1.31e-03 0.00391
152 2.42e-02 -2.56e-02 0.033878 0.060177 1.007 1.21e-03 0.00473
153 -3.52e-04 1.92e-02 -0.044538 0.057467 1.012 1.10e-03 0.00793
154 3.49e-03 -3.69e-03 -0.001732 -0.004935 1.017 8.14e-06 0.00882
155 -7.46e-03 7.90e-03 -0.020735 -0.034995 1.009 4.09e-04 0.00408
156 -7.55e-02 6.12e-02 0.039681 -0.081521 1.021 2.22e-03 0.01611
157 -7.26e-02 1.13e-01 -0.089947 0.153612 1.012 7.86e-03 0.01536
158 1.93e-02 -2.04e-02 0.014496 0.030297 1.014 3.07e-04 0.00710
159 1.73e-02 -1.83e-02 0.067505 0.113196 0.987 4.25e-03 0.00398
160 4.87e-03 -3.93e-03 -0.002611 0.005286 1.024 9.34e-06 0.01571 *
161 -3.16e-02 5.90e-03 0.063142 -0.079398 1.008 2.10e-03 0.00708
162 9.15e-02 -9.69e-02 -0.033629 -0.117238 1.012 4.58e-03 0.01224
163 2.24e-02 -3.90e-02 0.037646 -0.058926 1.018 1.16e-03 0.01255
164 -2.79e-02 1.08e-02 0.042604 -0.054993 1.012 1.01e-03 0.00733
165 -3.29e-02 3.49e-02 0.023187 0.054876 1.011 1.01e-03 0.00650
166 2.14e-01 -2.27e-01 -0.040295 -0.243757 1.022 1.98e-02 0.02857 *
167 9.36e-04 -9.91e-04 -0.000801 -0.001751 1.013 1.02e-06 0.00570
168 -3.56e-02 2.27e-02 0.033142 -0.048613 1.015 7.89e-04 0.00901
169 5.62e-03 1.69e-03 -0.017724 0.022049 1.014 1.62e-04 0.00708
170 4.71e-02 -4.98e-02 0.024765 0.061933 1.016 1.28e-03 0.01099
171 -2.01e-04 2.13e-04 0.003114 0.005260 1.011 9.25e-06 0.00388
172 6.42e-02 -6.79e-02 0.023151 0.075234 1.027 1.89e-03 0.02101 *
173 4.38e-03 -4.64e-03 0.012182 0.020560 1.011 1.41e-04 0.00408
174 7.98e-03 -8.45e-03 -0.012712 -0.023746 1.011 1.88e-04 0.00444
175 1.41e-01 -1.86e-01 0.093690 -0.212431 1.027 1.50e-02 0.02969 *
176 5.40e-03 8.03e-03 -0.032149 0.040325 1.013 5.43e-04 0.00733
177 7.02e-03 -7.43e-03 -0.003063 -0.009471 1.018 3.00e-05 0.01008
178 2.55e-02 -2.70e-02 0.022222 0.043969 1.012 6.46e-04 0.00621
179 2.46e-02 -2.61e-02 0.014249 0.033756 1.016 3.81e-04 0.00963
180 -8.62e-05 9.13e-05 -0.001975 -0.003313 1.011 3.67e-06 0.00388
181 3.08e-02 -3.26e-02 -0.015840 -0.044200 1.015 6.52e-04 0.00852
182 -1.93e-02 1.28e-02 0.016936 -0.025475 1.017 2.17e-04 0.00941
183 6.66e-03 -1.50e-02 0.019119 -0.027245 1.017 2.48e-04 0.01009
184 -4.05e-02 4.29e-02 -0.053073 -0.095243 0.998 3.02e-03 0.00486
185 1.62e-02 -1.71e-02 0.016116 0.030662 1.012 3.14e-04 0.00564
186 1.33e-02 -1.41e-02 0.025930 0.044512 1.008 6.61e-04 0.00431
187 1.14e-02 -8.09e-03 -0.008726 0.014033 1.018 6.58e-05 0.01055
188 -4.59e-02 2.75e-02 0.047046 -0.066596 1.012 1.48e-03 0.00849
189 -1.78e-03 1.20e-03 0.001519 -0.002315 1.017 1.79e-06 0.00962
190 3.70e-02 -3.92e-02 0.055752 0.098084 0.997 3.20e-03 0.00461
191 7.95e-04 -8.41e-04 0.000979 0.001776 1.013 1.05e-06 0.00500
192 -8.64e-02 9.14e-02 0.023164 0.103201 1.022 3.55e-03 0.01804
193 -1.15e-02 7.32e-03 0.010681 -0.015667 1.017 8.20e-05 0.00901
194 7.28e-02 -7.70e-02 0.069173 0.133306 0.991 5.89e-03 0.00582
195 2.48e-04 -2.63e-04 -0.000395 -0.000739 1.012 1.82e-07 0.00444
196 -1.54e-02 1.63e-02 -0.060368 -0.101228 0.992 3.40e-03 0.00398
197 3.80e-02 -4.03e-02 -0.041172 -0.083496 1.002 2.32e-03 0.00505
198 2.52e-02 -6.24e-02 0.085999 -0.120208 1.006 4.81e-03 0.00964
199 3.32e-02 -3.51e-02 -0.052839 -0.098706 0.996 3.24e-03 0.00444
200 7.07e-03 -7.48e-03 -0.013803 -0.025075 1.011 2.10e-04 0.00425
201 -7.22e-03 1.34e-02 -0.014074 0.021332 1.019 1.52e-04 0.01165
202 -1.07e-03 3.63e-03 -0.005954 0.008029 1.017 2.15e-05 0.00885
203 3.27e-02 -3.47e-02 -0.043953 -0.084687 1.001 2.39e-03 0.00466
204 5.85e-02 -9.10e-02 0.072448 -0.123728 1.016 5.10e-03 0.01536
205 7.50e-03 2.14e-02 -0.068894 0.087054 1.008 2.53e-03 0.00750
206 5.57e-04 -2.49e-03 0.004529 -0.006009 1.016 1.21e-05 0.00850
207 1.92e-02 -2.04e-02 -0.007070 -0.024649 1.020 2.03e-04 0.01224
208 1.11e-02 -6.49e-03 -0.011796 0.016512 1.016 9.11e-05 0.00833
209 -9.27e-02 7.69e-02 0.044481 -0.098207 1.022 3.22e-03 0.01823
210 -1.39e-01 1.47e-01 -0.104454 -0.218309 0.965 1.57e-02 0.00710 *
211 1.60e-02 -1.69e-02 -0.046788 -0.082065 0.999 2.24e-03 0.00405
212 -4.40e-03 4.66e-03 0.025261 0.043173 1.008 6.22e-04 0.00392
213 3.40e-02 -3.60e-02 0.055324 0.096465 0.997 3.09e-03 0.00450
214 -2.84e-02 3.01e-02 0.021960 0.049923 1.011 8.32e-04 0.00608
215 -2.85e-02 3.02e-02 -0.055612 -0.095464 0.996 3.03e-03 0.00431
216 9.00e-02 -9.52e-02 -0.055731 -0.140250 0.994 6.53e-03 0.00719
217 -7.24e-03 1.42e-02 -0.015790 0.023434 1.019 1.83e-04 0.01109
218 -3.61e-02 6.74e-03 0.072173 -0.090753 1.006 2.74e-03 0.00708
219 -5.20e-03 5.51e-03 0.029883 0.051072 1.007 8.70e-04 0.00392
220 1.79e-03 -1.89e-03 0.040903 0.068607 1.002 1.57e-03 0.00388
221 -1.82e-02 1.93e-02 0.045822 0.081238 1.000 2.20e-03 0.00411
222 -1.30e-02 4.63e-03 0.020888 -0.026789 1.014 2.40e-04 0.00726
223 -2.66e-02 2.82e-02 0.015859 0.040743 1.013 5.54e-04 0.00744
224 2.65e-02 -2.81e-02 -0.058293 -0.104568 0.992 3.63e-03 0.00418
225 1.36e-02 -2.93e-02 0.036060 -0.051899 1.016 9.00e-04 0.01032
226 -7.06e-02 5.22e-02 0.048879 -0.083155 1.015 2.31e-03 0.01162
227 6.61e-03 9.84e-03 -0.039389 0.049406 1.013 8.15e-04 0.00733
228 -4.91e-04 5.20e-04 -0.000605 -0.001098 1.013 4.03e-07 0.00500
229 -1.87e-03 1.98e-03 0.000636 0.002349 1.021 1.84e-06 0.01345
230 9.54e-02 -7.60e-02 -0.053159 0.104548 1.017 3.65e-03 0.01494
231 -1.86e-02 -7.06e-05 0.045533 -0.056785 1.011 1.08e-03 0.00704
232 7.97e-03 1.19e-02 -0.047467 0.059539 1.011 1.18e-03 0.00733
233 4.46e-02 -4.73e-02 0.072701 0.126765 0.985 5.32e-03 0.00450
234 -2.48e-03 2.63e-03 0.014239 0.024336 1.010 1.98e-04 0.00392
235 -2.21e-02 2.34e-02 0.032191 0.061051 1.006 1.24e-03 0.00454
236 1.87e-02 -1.97e-02 -0.021587 -0.043012 1.010 6.18e-04 0.00491
237 6.97e-03 -7.38e-03 0.015067 0.025694 1.011 2.21e-04 0.00422
238 -4.07e-02 4.31e-02 0.038894 0.081820 1.004 2.23e-03 0.00536
239 -6.78e-03 2.59e-02 -0.044750 0.059853 1.013 1.20e-03 0.00867
240 3.79e-03 -4.02e-03 -0.058776 -0.099286 0.992 3.27e-03 0.00388
241 2.13e-02 2.36e-02 -0.107810 0.134844 0.996 6.04e-03 0.00727
242 1.13e-01 -7.09e-02 -0.108859 0.157746 0.995 8.26e-03 0.00883
243 5.92e-03 -1.81e-02 0.028414 -0.038648 1.016 4.99e-04 0.00903
244 -2.31e-03 2.45e-03 -0.006427 -0.010846 1.012 3.93e-05 0.00408
245 2.71e-02 -1.44e-02 -0.032008 0.043427 1.014 6.30e-04 0.00792
246 1.32e-02 -1.40e-02 0.009317 0.020024 1.015 1.34e-04 0.00760
247 -5.31e-02 5.62e-02 -0.039915 -0.083421 1.007 2.32e-03 0.00710
248 -4.49e-03 7.57e-03 -0.006928 0.011081 1.021 4.10e-05 0.01320
249 -4.34e-02 4.60e-02 -0.053479 -0.097012 0.998 3.13e-03 0.00500
250 -1.41e-02 -4.23e-03 0.044308 -0.055120 1.012 1.01e-03 0.00708
251 -1.10e-01 1.17e-01 0.045283 0.145780 1.004 7.07e-03 0.01077
252 4.11e-02 -4.35e-02 -0.047559 -0.094763 0.999 2.99e-03 0.00491
253 1.45e-02 4.35e-03 -0.045583 0.056706 1.011 1.07e-03 0.00708
254 8.20e-03 -8.68e-03 -0.028756 -0.049949 1.007 8.32e-04 0.00400
255 -2.36e-02 2.50e-02 0.034364 0.065172 1.005 1.42e-03 0.00454
256 -6.17e-02 6.53e-02 -0.035686 -0.084540 1.012 2.38e-03 0.00963
257 1.31e-02 -2.57e-02 0.028624 -0.042481 1.018 6.03e-04 0.01109
258 2.11e-03 -2.24e-03 0.008266 0.013861 1.011 6.42e-05 0.00398
259 -1.98e-01 1.48e-01 0.134017 -0.231280 0.986 1.77e-02 0.01191
260 -5.02e-02 5.32e-02 -0.058371 -0.107089 0.996 3.81e-03 0.00514
261 -1.36e-02 1.44e-02 -0.016766 -0.030414 1.011 3.09e-04 0.00500
262 2.02e-03 -2.14e-03 -0.031361 -0.052975 1.006 9.36e-04 0.00388
263 8.27e-03 -8.75e-03 -0.009570 -0.019068 1.012 1.21e-04 0.00491
264 -2.87e-04 3.04e-04 -0.002957 -0.004951 1.011 8.19e-06 0.00389
265 -4.77e-02 5.05e-02 0.018023 0.061606 1.017 1.27e-03 0.01186
266 1.88e-02 -1.99e-02 -0.027350 -0.051871 1.008 8.98e-04 0.00454
267 3.80e-03 -4.02e-03 0.014837 0.024880 1.010 2.07e-04 0.00398
268 -8.99e-03 9.52e-03 -0.035159 -0.058956 1.005 1.16e-03 0.00398
269 -1.45e-02 6.03e-03 0.021055 -0.027369 1.014 2.50e-04 0.00740
270 -3.23e-02 4.65e-02 -0.031065 0.058429 1.026 1.14e-03 0.01919 *
271 1.21e-01 -8.24e-02 -0.100195 0.154710 0.999 7.95e-03 0.00983
272 -3.60e-02 8.49e-03 0.067793 -0.085589 1.007 2.44e-03 0.00711
273 1.81e-01 -1.51e-01 -0.085270 0.190967 1.012 1.21e-02 0.01869
274 1.24e-02 -1.32e-02 0.008231 0.018192 1.016 1.11e-04 0.00813
275 9.39e-04 -9.94e-04 -0.007876 -0.013374 1.011 5.98e-05 0.00390
276 4.56e-03 -4.83e-03 -0.005280 -0.010522 1.012 3.70e-05 0.00491
277 2.34e-03 -2.48e-03 -0.003142 -0.006054 1.012 1.22e-05 0.00466
278 -2.52e-03 2.67e-03 0.005550 0.009956 1.012 3.31e-05 0.00418
279 -3.39e-02 3.59e-02 0.016301 0.047401 1.015 7.50e-04 0.00912
280 7.43e-02 -7.87e-02 -0.028858 -0.096700 1.013 3.12e-03 0.01149
281 8.00e-02 -8.47e-02 -0.047612 -0.122315 1.000 4.97e-03 0.00744
282 2.58e-02 -2.73e-02 0.041955 0.073155 1.003 1.78e-03 0.00450
283 -6.70e-02 1.08e-01 -0.091968 0.152008 1.010 7.69e-03 0.01424
284 -1.13e-02 -3.41e-03 0.035754 -0.044478 1.013 6.61e-04 0.00708
285 -2.15e-02 1.29e-02 0.022063 -0.031231 1.015 3.26e-04 0.00849
286 -5.84e-03 6.18e-03 0.007260 0.014220 1.012 6.76e-05 0.00478
287 -1.69e-03 1.78e-03 -0.008291 -0.013880 1.011 6.44e-05 0.00394
288 -1.26e-01 1.34e-01 -0.059874 -0.159817 1.006 8.49e-03 0.01288
289 -1.92e-02 1.12e-02 0.020386 -0.028536 1.015 2.72e-04 0.00833
290 -9.69e-02 1.03e-01 0.039845 0.128274 1.007 5.48e-03 0.01077
291 9.78e-03 -1.04e-02 0.013705 0.024344 1.011 1.98e-04 0.00473
292 -4.88e-02 3.33e-02 0.040480 -0.062505 1.015 1.30e-03 0.00983
293 5.69e-02 -6.02e-02 0.028071 0.073027 1.017 1.78e-03 0.01210
294 9.82e-02 -6.70e-02 -0.081428 0.125733 1.005 5.26e-03 0.00983
295 5.55e-02 -5.88e-02 0.061140 0.113493 0.995 4.28e-03 0.00530
296 4.21e-02 -4.45e-02 -0.035992 -0.078664 1.005 2.06e-03 0.00570
297 -3.42e-03 3.62e-03 0.010022 0.017579 1.011 1.03e-04 0.00405
298 -5.76e-02 6.10e-02 -0.086729 -0.152582 0.975 7.68e-03 0.00461 *
299 -9.38e-03 7.01e-02 -0.142836 0.186752 0.984 1.15e-02 0.00820
300 6.76e-03 -7.16e-03 0.006432 0.012395 1.013 5.13e-05 0.00582
301 -3.87e-03 4.10e-03 -0.004260 -0.007907 1.013 2.09e-05 0.00530
302 -5.06e-02 5.36e-02 -0.034543 -0.075284 1.010 1.89e-03 0.00786
303 -1.64e-02 1.74e-02 -0.045569 -0.076905 1.001 1.97e-03 0.00408
304 1.70e-02 -1.80e-02 0.018706 0.034724 1.011 4.03e-04 0.00530
305 -7.03e-02 7.44e-02 0.071362 0.147363 0.982 7.18e-03 0.00520
306 -1.22e-02 1.30e-02 0.014163 0.028221 1.011 2.66e-04 0.00491
307 2.91e-02 -3.08e-02 -0.031445 -0.063769 1.007 1.36e-03 0.00505
308 -3.74e-03 -3.10e-03 0.016448 -0.020526 1.014 1.41e-04 0.00721
309 -1.40e-02 1.48e-02 0.027347 0.049680 1.007 8.24e-04 0.00425
310 3.94e-02 -4.17e-02 0.022202 0.053321 1.016 9.49e-04 0.00995
311 -1.76e-01 1.86e-01 0.055491 0.217224 0.999 1.56e-02 0.01473
312 1.10e-02 -1.16e-02 -0.012716 -0.025337 1.012 2.14e-04 0.00491
313 1.12e-03 -1.19e-03 -0.001075 -0.002261 1.013 1.71e-06 0.00536
314 -4.64e-02 3.99e-02 0.018838 -0.047835 1.031 7.64e-04 0.02316 *
315 -5.12e-03 5.43e-03 0.007468 0.014163 1.012 6.70e-05 0.00454
316 -6.58e-02 6.97e-02 0.018456 0.079294 1.022 2.10e-03 0.01705
317 1.97e-01 -2.08e-01 0.093278 0.248981 0.985 2.05e-02 0.01288
318 -5.33e-03 1.50e-02 -0.022520 0.030903 1.016 3.19e-04 0.00922
319 -3.15e-02 3.33e-02 0.042264 0.081433 1.002 2.21e-03 0.00466
320 2.31e-03 -2.44e-03 -0.003362 -0.006376 1.012 1.36e-05 0.00454
321 2.58e-03 -2.73e-03 -0.001200 -0.003562 1.017 4.24e-06 0.00943
322 -4.17e-03 2.37e-03 0.004582 -0.006344 1.016 1.35e-05 0.00818
323 -4.53e-02 4.79e-02 0.034979 0.079520 1.006 2.11e-03 0.00608
324 1.96e-02 -2.07e-02 0.027411 0.048689 1.009 7.91e-04 0.00473
325 9.23e-02 -9.77e-02 -0.045828 -0.130542 1.002 5.67e-03 0.00882
326 3.27e-02 -3.46e-02 0.049276 0.086691 1.000 2.50e-03 0.00461
327 -7.92e-03 -1.18e-02 0.047162 -0.059156 1.011 1.17e-03 0.00733
328 -2.43e-02 2.58e-02 -0.036662 -0.064499 1.005 1.39e-03 0.00461
329 -2.39e-02 2.53e-02 -0.077556 -0.130402 0.980 5.62e-03 0.00403
330 4.28e-02 -4.53e-02 0.031133 0.065980 1.011 1.45e-03 0.00735
331 -2.49e-02 3.27e-03 0.053001 -0.066421 1.010 1.47e-03 0.00706
332 -4.44e-02 4.70e-02 0.045100 0.093132 1.000 2.89e-03 0.00520
333 -2.95e-02 3.12e-02 -0.044379 -0.078076 1.002 2.03e-03 0.00461
334 8.67e-03 -9.18e-03 -0.004787 -0.012816 1.016 5.49e-05 0.00796
335 -5.74e-02 6.08e-02 -0.034965 -0.080576 1.011 2.17e-03 0.00900
336 -1.14e-02 1.21e-02 -0.031674 -0.053455 1.006 9.53e-04 0.00408
337 8.81e-04 -1.77e-03 0.002042 -0.002999 1.019 3.01e-06 0.01083
338 2.38e-02 -1.17e-02 -0.030481 0.040592 1.014 5.50e-04 0.00768
339 -3.40e-02 1.74e-02 0.041758 -0.056117 1.012 1.05e-03 0.00779
340 -3.13e-02 3.31e-02 0.061091 0.110983 0.990 4.09e-03 0.00425
341 -1.72e-02 1.14e-02 0.015092 -0.022703 1.017 1.72e-04 0.00941
342 -1.66e-02 1.06e-02 0.015436 -0.022642 1.016 1.71e-04 0.00901
343 -7.66e-06 8.11e-06 0.000119 0.000200 1.012 1.34e-08 0.00388
344 5.61e-03 -5.94e-03 -0.024461 -0.042122 1.008 5.92e-04 0.00395
345 -7.95e-03 8.41e-03 0.015517 0.028190 1.010 2.65e-04 0.00425
346 1.81e-03 -3.15e-03 0.003038 -0.004755 1.020 7.56e-06 0.01255
347 6.12e-03 2.63e-02 -0.077015 0.097754 1.006 3.18e-03 0.00759
348 -6.32e-04 8.30e-05 0.001346 -0.001687 1.015 9.51e-07 0.00706
349 3.34e-02 -3.53e-02 0.064976 0.111539 0.990 4.13e-03 0.00431
350 5.41e-03 -5.73e-03 0.005144 0.009912 1.013 3.28e-05 0.00582
351 -1.33e-02 1.41e-02 -0.010362 -0.021358 1.014 1.52e-04 0.00686
352 1.85e-02 -1.96e-02 0.030191 0.052642 1.007 9.25e-04 0.00450
353 -2.49e-02 2.63e-02 0.087167 0.151410 0.969 7.55e-03 0.00400 *
354 4.68e-03 -4.95e-03 0.003777 0.007679 1.014 1.97e-05 0.00664
355 2.37e-02 -2.51e-02 -0.014112 -0.036253 1.014 4.39e-04 0.00744
356 -2.91e-02 5.40e-02 -0.056663 0.085884 1.015 2.46e-03 0.01165
357 1.54e-02 -2.26e-02 0.015622 -0.028768 1.026 2.77e-04 0.01828 *
358 1.12e-01 -1.19e-01 0.053278 0.142211 1.009 6.73e-03 0.01288
359 3.52e-03 -3.73e-03 -0.054546 -0.092139 0.995 2.82e-03 0.00388
360 4.32e-02 -4.58e-02 -0.058021 -0.111794 0.992 4.15e-03 0.00466
361 1.71e-03 -1.81e-03 0.011384 0.019048 1.011 1.21e-04 0.00391
362 1.20e-03 -1.27e-03 0.001807 0.003180 1.012 3.38e-06 0.00461
363 -1.66e-02 1.75e-02 -0.046033 -0.077688 1.001 2.01e-03 0.00408
364 5.01e-02 -1.60e-02 -0.084567 0.107827 1.003 3.87e-03 0.00720
365 -3.94e-02 4.17e-02 0.048971 0.095925 0.998 3.06e-03 0.00478
366 -6.57e-02 9.75e-02 -0.070092 0.126352 1.018 5.32e-03 0.01740
367 1.33e-02 -1.41e-02 -0.013498 -0.027874 1.012 2.60e-04 0.00520
368 2.63e-01 -2.27e-01 -0.105127 0.270614 1.009 2.43e-02 0.02371 *
369 2.42e-02 -2.56e-02 0.013339 0.032473 1.017 3.52e-04 0.01029
370 -1.13e-02 1.20e-02 0.039606 0.068796 1.003 1.58e-03 0.00400
371 1.20e-04 -1.27e-04 -0.001009 -0.001713 1.012 9.81e-07 0.00390
372 4.11e-03 3.04e-02 -0.081793 0.104339 1.005 3.63e-03 0.00769
373 2.62e-03 -1.49e-03 -0.002878 0.003985 1.016 5.31e-06 0.00818
374 -1.08e-02 -2.00e-03 0.031131 -0.038735 1.013 5.01e-04 0.00706
375 -1.58e-03 1.68e-03 0.024544 0.041460 1.008 5.74e-04 0.00388
376 4.94e-03 1.41e-02 -0.045379 0.057341 1.012 1.10e-03 0.00750
377 1.44e-01 -1.52e-01 0.116257 0.236355 0.953 1.83e-02 0.00664 *
378 1.31e-03 5.62e-03 -0.016475 0.020911 1.015 1.46e-04 0.00759
379 2.91e-03 -3.09e-03 -0.024458 -0.041533 1.008 5.76e-04 0.00390
380 -2.35e-02 8.35e-03 0.037680 -0.048326 1.013 7.80e-04 0.00726
381 5.85e-03 -6.19e-03 0.004252 0.009012 1.015 2.71e-05 0.00735
382 5.88e-02 -6.23e-02 -0.028235 -0.082100 1.011 2.25e-03 0.00912
383 9.16e-03 -9.70e-03 -0.039928 -0.068758 1.003 1.58e-03 0.00395
384 1.16e-03 -9.48e-04 -0.000601 0.001252 1.025 5.24e-07 0.01651 *
385 1.85e-02 -1.96e-02 0.072458 0.121500 0.984 4.89e-03 0.00398
386 1.44e-02 -1.53e-02 -0.016721 -0.033317 1.011 3.71e-04 0.00491
387 -2.67e-02 4.03e-02 -0.030167 0.053223 1.023 9.46e-04 0.01655 *
388 1.04e-03 -1.10e-03 0.010657 0.017844 1.011 1.06e-04 0.00389
389 -5.85e-02 6.19e-02 -0.031475 -0.077665 1.014 2.01e-03 0.01063
390 3.08e-04 -3.26e-04 0.000601 0.001031 1.012 3.55e-07 0.00431
391 -1.28e-02 1.36e-02 -0.041653 -0.070034 1.002 1.63e-03 0.00403
392 -5.34e-04 -1.52e-03 0.004902 -0.006194 1.015 1.28e-05 0.00750
393 2.81e-02 -2.98e-02 -0.037734 -0.072704 1.004 1.76e-03 0.00466
394 5.51e-03 -5.83e-03 -0.031617 -0.054036 1.006 9.74e-04 0.00392
395 2.36e-02 -2.50e-02 -0.018270 -0.041535 1.012 5.76e-04 0.00608
396 -4.86e-02 5.15e-02 0.077420 0.144625 0.977 6.91e-03 0.00444 *
397 4.03e-03 -4.26e-03 -0.023118 -0.039511 1.009 5.21e-04 0.00392
398 -6.37e-02 6.74e-02 0.024032 0.082145 1.015 2.25e-03 0.01186
399 -5.54e-02 5.87e-02 -0.050427 -0.098458 1.001 3.23e-03 0.00601
400 -5.23e-03 5.54e-03 0.030032 0.051327 1.006 8.79e-04 0.00392
Problem 12
This problem involves simple linear regression without an intercept.
(a) Recall that the coefficient estimateˆ β for the linear regression of Y onto X without an intercept is given by (3.38). Under what circumstance is the coefficient estimate for the regression of X onto Y the same as the coefficient estimate for the regression of Y onto X?
The coefficient estimate for the regression of Y onto X is β̂ =∑ixiyi∑jx2j;
The coefficient estimate for the regression of X onto Y is β̂ ′=∑ixiyi∑jy2j.
The coefficients are the same iff ∑jx2j=∑jy2j.
(b) Generate an example in Python with n = 100 observations in which the coefficient estimate for the regression of X onto Y is different from the coefficient estimate for the regression of Y onto X.
set.seed(1)
<- 1:100
x sum(x^2)
[1] 338350
<- 2 * x + rnorm(100, sd = 0.1)
y sum(y^2)
[1] 1353606
<- lm(y ~ x + 0)
fit.Y <- lm(x ~ y + 0)
fit.X summary(fit.Y)
Call:
lm(formula = y ~ x + 0)
Residuals:
Min 1Q Median 3Q Max
-0.223590 -0.062560 0.004426 0.058507 0.230926
Coefficients:
Estimate Std. Error t value Pr(>|t|)
x 2.0001514 0.0001548 12920 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.09005 on 99 degrees of freedom
Multiple R-squared: 1, Adjusted R-squared: 1
F-statistic: 1.669e+08 on 1 and 99 DF, p-value: < 2.2e-16
summary(fit.X)
Call:
lm(formula = x ~ y + 0)
Residuals:
Min 1Q Median 3Q Max
-0.115418 -0.029231 -0.002186 0.031322 0.111795
Coefficients:
Estimate Std. Error t value Pr(>|t|)
y 5.00e-01 3.87e-05 12920 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.04502 on 99 degrees of freedom
Multiple R-squared: 1, Adjusted R-squared: 1
F-statistic: 1.669e+08 on 1 and 99 DF, p-value: < 2.2e-16
(c) Generate an example in Python with n = 100 observations in which the coefficient estimate for the regression of X onto Y is the same as the coefficient estimate for the regression of Y onto X.
<- 1:100
x sum(x^2)
[1] 338350
<- 100:1
y sum(y^2)
[1] 338350
<- lm(y ~ x + 0)
fit.Y <- lm(x ~ y + 0)
fit.X summary(fit.Y)
Call:
lm(formula = y ~ x + 0)
Residuals:
Min 1Q Median 3Q Max
-49.75 -12.44 24.87 62.18 99.49
Coefficients:
Estimate Std. Error t value Pr(>|t|)
x 0.5075 0.0866 5.86 6.09e-08 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 50.37 on 99 degrees of freedom
Multiple R-squared: 0.2575, Adjusted R-squared: 0.25
F-statistic: 34.34 on 1 and 99 DF, p-value: 6.094e-08
summary(fit.X)
Call:
lm(formula = x ~ y + 0)
Residuals:
Min 1Q Median 3Q Max
-49.75 -12.44 24.87 62.18 99.49
Coefficients:
Estimate Std. Error t value Pr(>|t|)
y 0.5075 0.0866 5.86 6.09e-08 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 50.37 on 99 degrees of freedom
Multiple R-squared: 0.2575, Adjusted R-squared: 0.25
F-statistic: 34.34 on 1 and 99 DF, p-value: 6.094e-08