Stats413 Homework 4

Q = i的观测值。考虑以下模型：
E（Y | Q）=β0+β1Q3
a）提供对β1的解释。 （请注意，这并不是要对估算值进行解释

b）该模型对第1组和第2组之间的关系有何假设？ （您的答案

E（Y | X）=β0+β1X，

β
（C）
0 +β
（C）
1个
（X − c）=β
（C）
0 +β
（C）
1 X-β
（C）
1个
C
=（β
（C）
0 −β
（C）
1个
c）+β
（C）
1 X
=β0+β1X，

（C）
1 =β1和β
（C）
0 =β0+β
（C）
1个
c =β0+β1c，这是我们在课堂上得出的。
a）使用类似的方法，表明该模型仍然是尺度不变的。
E（Y | X）=β0+β1X+β2X2
b）证明该模型在X中不是比例不变的。
E（Y | X）=β0+β1X2
c）我们在课堂上声称线性回归在所有情况下都是尺度不变的。说明结果如何
b）不违反该主张。 （提示：我们做了什么以显示具有二次项的模型

Question 3
Load the data “Mroz” from the package carData. We’ll focus on variables inc which represents the household
income excluding the wife’s income, and k5 which is the number of children under 5 in the household.
a) Consider fitting a model predicting inc based upon k5. Without actually fitting any models (you
can explore the data), would you recommend including k5 as a continuous variable or a categorical
b) Regardless of your answer to a), fit the model predicting inc based upon a categorical k5. Note that
this does not imply that including k5 as categorical is the right approach or the correct answer to part
a).
i) What is the reference category for k5?
ii) Interpret the results to briefly tell the full story regarding all the levels of k5.
iii) Having fit the model, provide evidence that is either for or against including k5 as a categorical
(Hint: The emmip function from the emmeans package may be very helpful for parts ii) and iii).)
Question 4
a) Consider the model
E(Y |X) = β + βX.
Note that here the intercept and slope are forced to be equivalent. Derive the least squares estimate
of β for this model.
(Hints: Be careful with signs. Your final answer should resemble other least squares estimates of β’s.
You may use any results we have previously derived.)
b) Verify that your estimate of β is unbiased. (Hint: It may make things more clear to simplify the
model.)
Question 5
You are asked to carry out a regression analysis, predicting a respondent’s opinion on Fischer’s Shampoo
(response) which their local newspaper recently carried an advertisement for. The sample size is 2,901
respondents. The predictor variables you have are:
• age – Age (continuous)
• ses – Socio-economic status (Low income, middle income, high income)
• subscriber – Respondent subscribes to their local newspaper (No, Yes)
• primarypurchaser – Response to “I am the primary purchaser of goods in my household” (continuous,
1-5 scale, 1 = strongly disagree, 2 = disagree, 3 = neutral, 4 = agree, 5 = strongly agree)
Your boss tells you that they suspect the relationship between opinion on Fischer’s Shampoo and