Question: in R language please ! Problem 2 The dataset CASchools from the AER contains data on test performance, school characteristics and student demographic backgrounds for
Problem 2 The dataset CASchools from the AER contains data on test performance, school characteristics and student demographic backgrounds for school districts in California. We will create two variables: the student-teacher ratio, and the average of math and reading scores: library(AER) library(tidyverse) # Some packages require that you explicitly import the data ixke so. # Try removing the next line and running the code below. data("CASchools") dataset % mutate (STR. - students/teachers, score - 0.5*(read + math)) # the function mean wouldn't work here a) Fit a linear regression of score by STR. Carefully interpret the regression coefficient estimates. b) Perform a residual analysis to investigate whether the linear regression assumption holds. Discuss. c) Fit a new linear regression model, by adding english as a second covariate. Carefully interpret the regression coefficient estimates. d) Repeat the residual analysis with this new model. e) Is the association between score and student-teacher ratio statistically significant? Be explicit about which model and which confidence interval you use to answer this question. f) Bonus: Which of the two models would you recommend? Discuss
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
