Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Using the body fat data, use matrix calculations to calculate the following:(

ID: 3074171 • Letter: 1

Question

1. Using the body fat data, use matrix calculations to calculate the following:(Need to solve this using R)

(a) Write down the 20 × 4 design matrix X and the 20 × 1 response vector Y. (b) Calculate the vector b=(b0, b1, b2, b3) of parameter estimates.

(c) Calculate MSR and MSE.
(d) Calculate the standard errors of b0, b1, b2 and b3.

98719714334278896481 12802175195717232541 12121222212211122212 12019766280306317615 98710370340838105477 22333223223222232222 t-E-8932951956752743620 f 13914, 2 3 8 2 9 3 6 6 6 4 2 4 5881 yTL44554, 5 5 5 4 5 5 5 4 4 4 5 5 5 4 5 2 NA5778-649151477657272 ID 94099517251089497025 12321232223311122322

Explanation / Answer

SAS code :

/*(a)the 20 × 4 design matrix X and the 20 × 1 response vector Y.*/
DATA bodyfat1;
INPUT x1 x2 x3 y;
DATALINES;
19.5 43.1 29.1 11.9
24.7 49.8 28.2 22.8
30.7 51.9 37.0 18.7
29.8 54.3 31.1 20.1
19.1 42.2 30.9 12.9
25.6 53.9 23.7 21.7
31.4 58.5 27.6 27.1
27.9 52.1 30.6 25.4
22.1 49.9 23.2 21.3
25.5 53.5 24.8 19.3
31.1 56.6 30.0 25.4
30.4 56.7 28.3 17.8
18.7 46.5 23.0 11.7
19.7 44.2 28.6 17.8
14.6 42.7 21.3 12.8
29.5 54.4 30.1 23.9
27.7 55.3 25.7 22.6
30.2 58.6 24.6 25.4
22.7 48.2 27.1 14.8
25.2 51.0 27.5 21.1
;
run;
proc print data=bodyfat1;
run;
/*(b)the vector b=(b0, b1, b2, b3) of parameter estimates and (c) Calculate MSR and MSE.
(d) Calculate the standard errors of b0, b1, b2 and b3. */
proc reg data=bodyfat1;
model y = x1 x2 x3;
run;

OUTPUT :

The REG Procedure

Model: MODEL1

Dependent Variable: y

The SAS System