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

Data URL: https://raw.githubusercontent.com/gweon/stat420/master/hw5 data.csv or

ID: 3059441 • Letter: D

Question

Data URL: https://raw.githubusercontent.com/gweon/stat420/master/hw5 data.csv

or read.csv("https://raw.githubusercontent.com/gweon/stat420/master/hw5_data.csv")

This is R-program question!

1. For question 1, import the data in R from "https://raw.githubusercontent.com/gweon/stat420/master/hw5.data.csv" The data set contains 50 observations with 3 variables: y (response), al (numerical predictor) and r2 (cate- gorical predictor). Predictor x2 represents the group of each observation (either A or B). (d) Consider the MLR model: Yi-Bo +Azil +2x2-ci where zi2 = 1 if group = B and 0 otherwise. Obtain the fitted model and add the two fitted lines (one for each group) to the plot you obtained in (b). (1 pt) (e) Was the MLR model better than the SLR model in (a)? Use an appropriate test at = 0.05, (1 pt) (f) Consider another MLR model with the interaction between x1 and x2: I; = 0+AZn+B2%2+3XilXi2+G Obtain the fitted model. Was the interaction term needed? Use an appropriate test at -0.05. (1 pt)

Explanation / Answer

Data URL: https://raw.githubusercontent.com/gweon/stat420/master/hw5 data.csv

or read.csv("https://raw.githubusercontent.com/gweon/stat420/master/hw5_data.csv")

This is R-program question!

1. For question 1, import the data in R from "https://raw.githubusercontent.com/gweon/stat420/master/hw5.data.csv" The data set contains 50 observations with 3 variables: y (response), al (numerical predictor) and r2 (cate- gorical predictor). Predictor x2 represents the group of each observation (either A or B). (d) Consider the MLR model: Yi-Bo +Azil +2x2-ci where zi2 = 1 if group = B and 0 otherwise. Obtain the fitted model and add the two fitted lines (one for each group) to the plot you obtained in (b). (1 pt) (e) Was the MLR model better than the SLR model in (a)? Use an appropriate test at = 0.05, (1 pt) (f) Consider another MLR model with the interaction between x1 and x2: I; = 0+AZn+B2%2+3XilXi2+G Obtain the fitted model. Was the interaction term needed? Use an appropriate test at -0.05. (1 pt)