QUESTION 1
( no explanation needed please help to answer all not just one subquestion)
i) You are given a report which states that a response variable decreases by a factor of 2.5
for each unit increase in , from the following model:
What was the original coefficient of in the model output?
A. 6.25
B. -0.9162907
C. 12.18249
D. -1.581139
E. 0.9162907
ii) Consider the following R code and output. These data are on distance taken to stop (ft)
in cars and speed (mph) at which they were driving.
------------------------------------------------------------------------------
> cars.lm <- lm(sqrt(dist) ~ speed, data = cars)
> summary(cars.lm)
Call:
lm(formula = sqrt(dist) ~ speed, data = cars)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.27705 0.48444 2.636 0.0113
speed 0.32241 0.02978 10.825 1.77e-14
Residual standard error: 1.102 on 48 degrees of freedom
Multiple R-squared: 0.7094, Adjusted R-squared: 0.7034
F-statistic: 117.2 on 1 and 48 DF, p-value: 1.773e-14
------------------------------------------------------------------------------
Predict the average distance to stop (to the nearest ft) for a car driving at a speed of 30mph: (
Answer................)
iii) What does the coefficient for the quadratic term I(map^2) tell us in the output below?
Estimate Std. Error t value Pr(>|t|)
(Intercept) 75.4563024 12.4152072 6.078 1.78e-07
I(map^2) 0.0002260 0.0000372 6.075 1.79e-07
map -0.2627011 0.0431129 -6.093 1.68e-07
height 1.3070829 0.2594272 5.038 6.78e-06
A. The curve that describes the relationship between the response and map has a minimum at
some value of map and the response increases on both sides of that map value.
B. The relationship between the response and map is negative, if it is the only explanatory
variable in the model.
C. The slope for the marginal relationship between map and the response.
iv) Consider the following R code and output:
------------------------------------------------------
> diox$logTEQ <- log(TEQ)
> m1 <- lm(logTEQ ~ Year, data = diox)
> summary(m1)
Call:
lm(formula = logTEQ ~ Year, data = diox)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 218.91364 42.79187 5.116 0.000255
Year -0.10762 0.02143 -5.021 0.000299
Residual standard error: 0.3233 on 12 degrees of freedom
Multiple R-squared: 0.6775, Adjusted R-squared: 0.6506
F-statistic: 25.21 on 1 and 12 DF, p-value: 0.0002986
------------------------------------------------------
Which of the following statements are correct?
A. Median TEQ is estimated to decrease by 0.10762 units per year.
B. The decrease in median TEQ is constant from year to year.
C. The decrease in mean log(TEQ) is constant from year to year.
D. Median TEQ is estimated to decrease by a factor of 0.10762 per year.
E. Median TEQ levels are estimated to change/decrease by a factor of 0.898 per year.
F. Median TEQ levels are estimated to decrease by approximately 10% per year.
v) In a multiple regression model you are trying to fit, one of the explanatory variabl.
QUESTION 1 ( no explanation needed please help to answer all not just.pdf
1. QUESTION 1
( no explanation needed please help to answer all not just one subquestion)
i) You are given a report which states that a response variable decreases by a factor of 2.5
for each unit increase in , from the following model:
What was the original coefficient of in the model output?
A. 6.25
B. -0.9162907
C. 12.18249
D. -1.581139
E. 0.9162907
ii) Consider the following R code and output. These data are on distance taken to stop (ft)
in cars and speed (mph) at which they were driving.
------------------------------------------------------------------------------
> cars.lm <- lm(sqrt(dist) ~ speed, data = cars)
> summary(cars.lm)
Call:
lm(formula = sqrt(dist) ~ speed, data = cars)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.27705 0.48444 2.636 0.0113
speed 0.32241 0.02978 10.825 1.77e-14
Residual standard error: 1.102 on 48 degrees of freedom
Multiple R-squared: 0.7094, Adjusted R-squared: 0.7034
F-statistic: 117.2 on 1 and 48 DF, p-value: 1.773e-14
------------------------------------------------------------------------------
Predict the average distance to stop (to the nearest ft) for a car driving at a speed of 30mph: (
Answer................)
iii) What does the coefficient for the quadratic term I(map^2) tell us in the output below?
2. Estimate Std. Error t value Pr(>|t|)
(Intercept) 75.4563024 12.4152072 6.078 1.78e-07
I(map^2) 0.0002260 0.0000372 6.075 1.79e-07
map -0.2627011 0.0431129 -6.093 1.68e-07
height 1.3070829 0.2594272 5.038 6.78e-06
A. The curve that describes the relationship between the response and map has a minimum at
some value of map and the response increases on both sides of that map value.
B. The relationship between the response and map is negative, if it is the only explanatory
variable in the model.
C. The slope for the marginal relationship between map and the response.
iv) Consider the following R code and output:
------------------------------------------------------
> diox$logTEQ <- log(TEQ)
> m1 <- lm(logTEQ ~ Year, data = diox)
> summary(m1)
Call:
lm(formula = logTEQ ~ Year, data = diox)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 218.91364 42.79187 5.116 0.000255
Year -0.10762 0.02143 -5.021 0.000299
Residual standard error: 0.3233 on 12 degrees of freedom
Multiple R-squared: 0.6775, Adjusted R-squared: 0.6506
F-statistic: 25.21 on 1 and 12 DF, p-value: 0.0002986
------------------------------------------------------
Which of the following statements are correct?
A. Median TEQ is estimated to decrease by 0.10762 units per year.
B. The decrease in median TEQ is constant from year to year.
C. The decrease in mean log(TEQ) is constant from year to year.
D. Median TEQ is estimated to decrease by a factor of 0.10762 per year.
3. E. Median TEQ levels are estimated to change/decrease by a factor of 0.898 per year.
F. Median TEQ levels are estimated to decrease by approximately 10% per year.
v) In a multiple regression model you are trying to fit, one of the explanatory variables, x3,
shows a non-linear trend that you want to accommodate using a third order polynomial.
What is the correct model specification in R?
A. lm(y ~ x1 + x2 + I(x3^3))
B. lm(y ~ x1 + x2 + x3 + x3)
C. lm(y ~ x1 + x2 + x3 + I(x3^2) + I(x3^3))
D. lm(y ~ x1 + x2 + x3^2 + I(x3)^3)
QUESTION 2
i) The coefficient for a two-way interaction term between two continuous explanatory
variables (x1 and x2, say) gives the change in the slope between the response and x1 per
unit increase in x2.
Ii) Consider the R output from a linear regression model below. The response is soil
biomass, the explanatory variables are fertilizer (fert, continuous), and temperature (temp,
categorical with levels low and high).
Call:
lm(formula = y ~ temp * fert)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.30076 0.21582 6.027 2.64e-07
tempHigh -2.25373 0.31634 -7.124 5.93e-09
fert 2.93689 0.03616 81.220 < 2e-16
tempHigh:fert 1.54914 0.05368 28.856 < 2e-16
Residual standard error: 0.4866 on 46 degrees of freedom
Multiple R-squared: 0.9978, Adjusted R-squared: 0.9977
F-statistic: 7056 on 3 and 46 DF, p-value: < 2.2e-16
The estimated coefficient for the interaction term can be interpreted as follows:
A. For every one unit increase in temperature, fertilizer increases by 1.55 units.
B. For every one unit increase in fertilizer the effect of temperature on soil biomass increases by
1.55 units.
4. C. At high temperatures, for every one unit increase in fertilizer, mean soil biomass increases by
1.55 units.
iii) Consider the R output from a linear regression model below. The response is soil
biomass, the explanatory variables are fertilizer (fert, continuous), and temperature (temp,
categorical with levels low and high).
Call:
lm(formula = y ~ temp * fert)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.30076 0.21582 6.027 2.64e-07
tempHigh -2.25373 0.31634 -7.124 5.93e-09
fert 2.93689 0.03616 81.220 < 2e-16
tempHigh:fert 1.54914 0.05368 28.856 < 2e-16
Residual standard error: 0.4866 on 46 degrees of freedom
Multiple R-squared: 0.9978, Adjusted R-squared: 0.9977
F-statistic: 7056 on 3 and 46 DF, p-value: < 2.2e-16
What is the hypothesis tested on the tempHigh:fert line?
A. Temperature and fertilizer interact.
B. Temperature and fertilizer are correlated.
C. There is no interaction between temperature and fertilizer.
D. Temperature and fertilizer interact with the response.
E. Temperature and fertilizer do not interact with the response.
iv) What is the fitted value for the response in a model with an interaction term when
colour is red, length is 0.11 and mass is 10.2?
Estimate Std. Error t value Pr(>|t|)
(Intercept) 10.462891 1.183536 8.840 0.004021
colourRed 0.471709 0.269702 1.749 0.078420
colourWhite 0.519045 0.244247 2.125 0.057706
ColourBlue 1.574831 1.529718 1.029 0.154530
ColourYellow 0.991854 0.256221 3.871 0.019912
length -3.125657 0.611825 -5.109 0.011746
mass 0.871294 0.283496 3.073 0.030472
length:mass 15.462891 2.183536 7.082 0.006223
5. Answer...........
v) Consider the following R output. x1 and x2 are continuous explanatory variables.
Call:
lm(formula = y ~ x1 * x2)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 14.9710 8.0980 1.849 0.07093
x1 -0.4943 1.4795 -0.334 0.73983
x2 -2.6993 0.7714 -3.499 0.00105
x1:x2 1.7653 0.1399 12.614 < 2e-16
Residual standard error: 8.054 on 46 degrees of freedom
Multiple R-squared: 0.9812, Adjusted R-squared: 0.98
F-statistic: 801.3 on 3 and 46 DF, p-value: < 2.2e-16
Which of the following statements are correct?
A. There is no evidence that x1 affects the response.
B. Per unit increase in x2, the slope of the relationship between the response and x1 increases by
1.77 units.
C. The mean response is estimated to decrease by -2.6993 units per unit increase in x2,
independent of the value of x1.
A. Median TEQ is estimated to decrease by 0.10762 units per year.
B. The decrease in median TEQ is constant from year to year.
C. The decrease in mean log(TEQ) is constant from year to year.
D. Median TEQ is estimated to decrease by a factor of 0.10762 per year.
E. Median TEQ levels are estimated to change/decrease by a factor of 0.898 per year.
F. Median TEQ levels are estimated to decrease by approximately 10% per year.