Drop hier links of afbeeldingen om ze aan de editor toe te voegen.
Questions
-
MC1: Recall that the coefficient estimate \(\hat{\beta}\) for the linear regression of \(Y\) onto \(X\) without an intercept (\(Y=\beta X\))is given by
\[\hat\beta=\left ( \sum_{i=1}^{n}x_i y_i \right )/\left ( \sum_{j=1}^{n}x_{j}^2 \right )\]
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\)?
- When \(\sum_i x_i y_i = \sum_jy_j^2\)
- When \(\sum_i x_i y_i = \sum_jx_j^2\)
- When \(\sum_jx_j^2 = \sum_jy_j^2\)
- When \(\sum_jx_j^2 = \frac{1}{\sum_jy_j^2}\)
-
MC2: Using the knowledge of the question MC1, which of these statements is true based on the code given below.
- The coefficient estimate for the regression of \(X\) onto \(Y\) is different from the coefficient estimate for the regression of \(Y\) onto \(X\).
- The coefficient estimate for the regression of \(X\) onto \(Y\) is equal to the coefficient estimate for the regression of \(Y\) onto \(X\).
set.seed(1)
x <- 1:100
y <- 2 * x + rnorm(100, sd = 0.1)
fit.Y <- lm(y ~ x + 0)
fit.X <- lm(x ~ y + 0)
- MC3: Using the knowledge of the question MC1, which of these statements is true based on the code given below.
- The coefficient estimate for the regression of \(X\) onto \(Y\) is different from the coefficient estimate for the regression of \(Y\) onto \(X\).
- The coefficient estimate for the regression of \(X\) onto \(Y\) is equal to the coefficient estimate for the regression of \(Y\) onto \(X\).
x <- 1:100
y <- 100:1
fit.Y <- lm(y ~ x + 0)
fit.X <- lm(x ~ y + 0)