You have a dataset of observations given by 58.42) 1 10 48.41 1 12 -4 Y = 70.02 and X = 1 8-2 31.36 1 11 -5 48.89 1 9 wh
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
You have a dataset of observations given by 58.42) 1 10 48.41 1 12 -4 Y = 70.02 and X = 1 8-2 31.36 1 11 -5 48.89 1 9 wh
You have a dataset of observations given by 58.42) 1 10 48.41 1 12 -4 Y = 70.02 and X = 1 8-2 31.36 1 11 -5 48.89 1 9 where y is the response variable and X the design matrix. Given these values, calculate the residual variance, the leverages for each observation, and the vector of standardized residuals r = = (₁, 2,..., Tn) without using R 's built-in commands (you might use R as a calculator, though). The variance of the standardized residuals is expected to be close to 1. Is that the case here? Hint: Compute Var(r). R code: y <-c(58.42, 48.41, 70.02, 31.36, 48.89) x1 <-c(10, 12, 8, 11, 9) x2 < c(-1, -4, -2, -5, -7) X <- cbind (1, x1, x2) Check your results with R using R 's built-in functions at the end of the exercise (1m, hatvalues, rstandard, ...). "
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!