Question: Hi, could you please answer this using R-Studio? Also, can you please post screenshots of the code you have used within R-Studio. Thanks! Data: We

Hi, could you please answer this using R-Studio? Also, can you please post screenshots of the code you have used within R-Studio. Thanks!

Hi, could you please answer this using R-Studio?Hi, could you please answer this using R-Studio?Hi, could you please answer this using R-Studio?Hi, could you please answer this using R-Studio?Hi, could you please answer this using R-Studio?Hi, could you please answer this using R-Studio?Hi, could you please answer this using R-Studio?Hi, could you please answer this using R-Studio? Data: We will use the dataset "MASchools" included in the package "AER". The dataset contains data on test performance, school characteristics and student demographic backgrounds for school districts in Massachusetts. (The lectures use a similar dataset for schools in CA.) For the questions in this exercise, therefore, you should load the dataset "MASchools" via: data("MASchools", package = "AER") There are alternative ways to load the data in R. In tutorial sessions for example, we loaded the package first and then loaded the data. R-tips: You might want to attach the dataset via: attach(MASchools) You do not need to attach the dataset for this assessment. By attaching the dataset, however, you do not have to specify to which dataset the variables belong when you use them. For example, suppose you want to get summary statistics of the variable salary. Then, before attaching the dataset, you have to do this via summary(MASchools$salary) But, once you attach the dataset "MASchools", you can do the same thing simply by summary(salary) The R command attach() is useful when you work with many variables. When you do not need the dataset anymore, you can detach it via: detach(MASchools) Important information about variables used in the Questions: Questions 1-4 will study the effect of the student-computer ratio on test scores. We use two variables: (1) students per computer ratio (STC) and (2) 8th grade score (TestScore), which is the sum of math, English and science in the ataset "MASchool". Questions 5-7 will seek to learn the effect of student-teacher ratio on test scores, we use two variables: (1) student-teacher ratio (STR) and (2) 8th grade score (TestScore), which is the sum of math, English and science in the dataset "MASchool". QUESTION 1 What is the sample median of the student-computer ratio (two decimal places)? fF QUESTION 2 Estimate the population regression model: TestScore; = Bo+ BiSTC;+ uj where E[u;| STC;] = 0. What is the OLS estimate of the slope coefficient (two decimal places)?QUESTION 3 Consider the estimated regression equation in Question 2. What is the robust standard error for the OLS estimate of the slope coefficient (two decimal places)? For this question, the standard error type in R has to be either "stata" or "HC1". [| QUESTION 4 The first and third quartiles of STC are 6.10 and 9.80, respectively, in the data. Using the estimated regression equation in Question 2 and 3, predict difference in TestScores between the school district with STC = 6.10 and the school district with STC = 9.80. Report the difference in absolute value (two decimal places). [| QUESTION 5 Note that this exercise replicates Section 5.3 in Stock and Watson, but with the MA data instead of CA data. Hence, it would be helpful to read the section once again. Generate a new variable D. in R that equals either 0 or 1, depending on whether the student-teacher ratio is less than 17, i.e., _| 1 if the student-teacher ratio in i''district 17 Estimate the population regression model TestScore; = a@9+ 0, D;+ u; where E[ u;|.D,;]=0. What is the OLS estimate for the conditional expectation, E[TestScore | STR 17] Report your answer to two decimal places. fF QUESTION 6 Using the estimation results in Question 5, test the null hypothesis that the mean test score in districts with low student-teacher ratio (STR 17) . For this question, the standard error type in R has to be either "stata" or "HC1". Choose the correct statement: a. We do not reject the null hypothesis at the 10% significance level. b.We do not reject the null hypothesis at the 5% significance level. c. We do not reject the null hypothesis at the 1% significance level. d.We do not reject the null hypothesis regardless of the significance level. QUESTION 7 Using the estimation results in Question 5, test the null hypothesis that difference between the mean test score in districts with low student-teacher ratio (5 7R 17) is 13.5. For this question, the standard error type in R has to be either "stata" or "HC1". Choose the correct statement: a. We reject the null hypothesis at the 10% significance level. b.We reject the null hypothesis at the 5% significance level. c. We reject the null hypothesis at the 1% significance level. d.We reject the null hypothesis regardless of the significance level

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!