Create data set with only variables of interest and then divide into test and training set

Responsive Centered Red Button

Need Help with this Question or something similar to this? We got you! Just fill out the order form (follow the link below), and your paper will be assigned to an expert to help you ASAP.

Use “CAschools” dataset from “AER” package to practice out-of-sample prediction and robust standard error creation. First, perform out-of-sample prediction by randomly dividing the dataset into a training set and a test set (by a ratio of ~7/3) and testing the linear model on the “read”, or “math” variables, using the following as predictors:  grades, calworks, lunch, computer, expenditure, income, english, and student teacher ratio. The final result of the out-of-sample prediction should be presented by a scatter plot of predicted values against actual values. Second, run the same regression with all the data and then calculate robust standard errors for your estimates. The final result should be a professional regression table generated by “stargazer” or “texreg” function.
Breakdown of variables
grades – factor indicating grade span of district.
students – Total enrollment.
teachers – Number of teachers.
calworks – Percent qualifying for CalWorks (income assistance).
lunch – Percent qualifying for reduced-price lunch.
computer – Number of computers.
expenditure – Expenditure per student.
income – District average income (in USD 1,000).
english – Percent of English learners.
read – Average reading score.
math – Average math score.
Q1 – Create data set with only variables of interest and then divide into test and training set
Q2 – Generate predicted values on test data from the training model
Q3 – Present your actual vs. predicted values in either base R plot or ggplot format, with a fit line
Q4 – Create model on the full data and calculate robust standard errors, present either via stargazer or texreg

How to create Testimonial Carousel using Bootstrap5

Clients' Reviews about Our Services