R code & output of 3A > mod <- lm(Y*X1+x2+x3+X4+X5, data = data) > summary (mod) Call: Im (formula = Y - X1+x2+x3+x4+x5, data = data) Residuals: Min 1Q Median -4.6814 -1.2776 0.1618 3Q Max 1.2558 4.9231 Coefficients: Estimate Std. Error t value Pr(>It) (Intercept) 0.67789 0.80509 0.842 0.41301 X1 1.64174 0.59747 2.748 0.01495 * X2 2.70476 0.71929 3.760 0.00189 ** X3 -0.59798 0.64373 -0.929 0.36764 X4 1.39011 0.73963 1.879 0.07975. X5 -0.03198 1.02785 -0.031 0.97559 Residual standard error: 2.655 on 15 degrees of freedom Multiple R-squared: 0.7436, Adjusted R-squared: 0.6582 F-statistic: 8.702 on 5 and 15 DF, p-value: 0.0004881 > res <- resid(mod) > studentres <- studres (mod) > standres <- rstandard (mod) > H <- round (x %*% solve(t(X) %*% X) %*% t(X), 3) > hii <- diag (H) > press <- res/(1-hii)
3.1) Let X21x5 be the design matrix of the MLR model, present the formula of hat matrix H by X (1 mark] 3.2) Which one is more precise, the studentized residuals or the standardized residuals, and why? [3 marks) 3.3)Find the observation having the largest leverage and give statistical interpretation within the data context. [2 marks] 3.4) Determine the variance of the second and the sixteenth studentized residuals i.e Var(T2) and Var(116) respectively. [2 marks]
R code & output of 3A > mod <- lm(Y*X1+x2+x3+X4+X5, data = data) > summary (mod) Call: Im (formula = Y - X1+x2+x3+x4+x5,
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
R code & output of 3A > mod <- lm(Y*X1+x2+x3+X4+X5, data = data) > summary (mod) Call: Im (formula = Y - X1+x2+x3+x4+x5,
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!