BUSN5000 HW5 Part B

pdf

School

Northwestern University *

*We aren’t endorsed by this school

Course

506

Subject

Statistics

Date

Feb 20, 2024

Type

pdf

Pages

10

Uploaded by arushic12

Report
9/25/23, 5 : 37 PM Homework 5: Measurement Error and Sample Selection Page 1 of 10 https://chris-cornwell.shinyapps.io/Assignment_5/#section-b.-empirical-exercise B. Empirical exercise Using the Project Star data provided in the AER package, you will estimate the e ! ect of class size on student achievement. Substantively, you will be replicating the Column (1) results in Table V of Krueger (1999), except with testing data reported in raw scores, not percentiles. Thus, the scale of your estimated e ! ects will be di ! erent. A few provenance questions Using the STAR data vignette located here (https://cran.r- project.org/web/packages/AER/AER.pdf) answer a few questions about the provenance of the data you we using in this exercise. Question 1: The data set has _____ observations and _____ variables. The data set has _____ observations and _____ variables. The data set has _____ observations and _____ variables. The data set has _____ observations and _____ variables. 11598, 47 Correct! Question 2: The STAR experiment assigned students to three class types: The STAR experiment assigned students to three class types: The STAR experiment assigned students to three class types: The STAR experiment assigned students to three class types: _____, _____, and _____.(Place them in order of class size _____, _____, and _____.(Place them in order of class size _____, _____, and _____.(Place them in order of class size _____, _____, and _____.(Place them in order of class size smallest to largest) smallest to largest) smallest to largest) smallest to largest) small, regular, regular+aide Correct! Question 3: A small class was defined as having between _____ and _____ A small class was defined as having between _____ and _____ A small class was defined as having between _____ and _____ A small class was defined as having between _____ and _____ students. students. students. students. 13, 17 Correct! Homework 5: Homework 5: Measurement Measurement Error and Error and Sample Sample Selection Selection A. Short answer (https://chris- cornwell.shinyapps.io/Assignment_5/#section- a.-short- answer) B. Empirical exercise (https://chris- cornwell.shinyapps.io/Assignment_5/#section- b.- empirical- exercise) Submission Start Over
9/25/23, 5 : 37 PM Homework 5: Measurement Error and Sample Selection Page 2 of 10 https://chris-cornwell.shinyapps.io/Assignment_5/#section-b.-empirical-exercise Question 4: A regular class was defined as having between _____ and _____ A regular class was defined as having between _____ and _____ A regular class was defined as having between _____ and _____ A regular class was defined as having between _____ and _____ students. students. students. students. 22, 25 Correct! Continue Estimating class-size effects using original and new students Now let’s turn to the estimation of class-size e ! ects, comparing the findings for the original kindergartners with the larger sample that includes new students who entered the experiment in later grades. The first order of business is to attach the data and create the test score variables. Section 2 of the slide deck can help with this. R Code ! Start Over Run Code ge ge… <fct> ethnicity ethnicity <fct> birth birth <yearqtr> stark stark <fct> star1 star1 <fct> star2 star2 <fct> 1122 female afam 1979 Q3 # load the library with the data data(STAR) # load the specific dataset STAR2 <- STAR %>% mutate( scorek= readk + mathk, # create the kinderga score1= read1 + math1, # create the 1st grad score2= read2 + math2, # create the 2nd grad score3= read3 + math3 # create the 3rd grad ) STAR2 NA NA NA 1 2 3 4 5 6 7 8 9 10
9/25/23, 5 : 37 PM Homework 5: Measurement Error and Sample Selection Page 3 of 10 https://chris-cornwell.shinyapps.io/Assignment_5/#section-b.-empirical-exercise Question 5: The second observation has the gender of _______, birth year The second observation has the gender of _______, birth year The second observation has the gender of _______, birth year The second observation has the gender of _______, birth year of ______, and was in a ______ type of class in the second of ______, and was in a ______ type of class in the second of ______, and was in a ______ type of class in the second of ______, and was in a ______ type of class in the second grade grade grade grade female, 1980, small Correct! Now, using the st function, replicate Table 3 in the deck to produce four tables of summary statistics, one for each grade. The kindergarten statistics should be the same as those reported in Table 3. Then, answer a few questions. Next 1 2 3 4 5 6 ... 100 Previous 1137 female cauc 1980 Q1 small small small 1143 female afam 1979 Q4 small small regula 1160 male cauc 1979 Q4 1183 male afam 1980 Q1 regular+aide 1195 male cauc 1979 Q3 regula 1215 male afam 1979 Q1 1224 female cauc 1979 Q4 regular+aide regula 1246 male cauc 1979 Q2 regular regula 1258 male cauc 1979 Q3 regular regula 1-10 of 1,000 ro… NA NA NA NA NA NA NA NA NA NA NA NA NA R Code ! Start Over Run Code #Generate summary statistics for Kindergarten 1
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/25/23, 5 : 37 PM Homework 5: Measurement Error and Sample Selection Page 4 of 10 https://chris-cornwell.shinyapps.io/Assignment_5/#section-b.-empirical-exercise Test scores by class type, Kindergarten grade stark stark regular regular small small regular+aide regular+aide Variable Variable N Mean Mean SD SD N Mean Mean SD SD N Mean Mean SD SD scorek 2005 918 73 1738 932 76 2043 918 71 Test scores by class type, 1st grade stark stark regular regular small small regular+aide regular+aide Variable Variable N Mean Mean SD SD N Mean Mean SD SD N Mean Mean SD SD score1 1456 1057 91 1339 1076 95 1503 1054 91 Test scores by class type, 2nd grade stark stark regular regular small small regular+aide regular+aide Variable Variable N Mean Mean SD SD N Mean Mean SD SD N Mean Mean SD SD score2 1201 1179 83 1080 1189 85 1183 1175 83 Test scores by class type, 3rd grade stark stark regular regular small small regular+aide regular+aide Variable Variable N Mean Mean SD SD N Mean Mean SD SD N Mean Mean SD SD score3 1047 1247 70 937 1258 73 1021 1247 73 #Generate summary statistics for Kindergarten st(STAR2, vars=c('scorek'), group='stark', title="Test scores by class type, Kindergarte #Generate summary statistics for 1st grade st(STAR2, vars=c('score1'), group='stark', title="Test scores by class type, 1st grade") #Generate summary statistics for 2nd grade st(STAR2, vars=c('score2'), group='stark', title="Test scores by class type, 2nd grade") 1 2 3 4 5 6 7 8 9 10
9/25/23, 5 : 37 PM Homework 5: Measurement Error and Sample Selection Page 5 of 10 https://chris-cornwell.shinyapps.io/Assignment_5/#section-b.-empirical-exercise Question 6: The di ! erence is average test scores between regular and small The di ! erence is average test scores between regular and small The di ! erence is average test scores between regular and small The di ! erence is average test scores between regular and small classes for kindergartners amounts to roughly _____ of a classes for kindergartners amounts to roughly _____ of a classes for kindergartners amounts to roughly _____ of a classes for kindergartners amounts to roughly _____ of a regular-class standard deviation. (Round to the nearest decile regular-class standard deviation. (Round to the nearest decile regular-class standard deviation. (Round to the nearest decile regular-class standard deviation. (Round to the nearest decile percentage.) percentage.) percentage.) percentage.) 20% Correct! Question 7: The largest di ! erence in average test scores between small and The largest di ! erence in average test scores between small and The largest di ! erence in average test scores between small and The largest di ! erence in average test scores between small and regular classes is in _____ grade. regular classes is in _____ grade. regular classes is in _____ grade. regular classes is in _____ grade. first Correct! Question 8: Between kindergarten and first grade, sample size _____ by Between kindergarten and first grade, sample size _____ by Between kindergarten and first grade, sample size _____ by Between kindergarten and first grade, sample size _____ by _____ students. _____ students. _____ students. _____ students. increases, 593 Correct! Question 9: The largest di ! erence in average test scores between regular The largest di ! erence in average test scores between regular The largest di ! erence in average test scores between regular The largest di ! erence in average test scores between regular and regular+aide classes is _____ points, which occurs in _____ and regular+aide classes is _____ points, which occurs in _____ and regular+aide classes is _____ points, which occurs in _____ and regular+aide classes is _____ points, which occurs in _____ grade. grade. grade. grade. 12, 1st Correct! Next, create a table of tests like in Section 6 of the slide deck for the null of no di ! erence between the average scores of small and regular classes in kindergarten, first, second, and third grades using all students. However, only report the grade level, di ! erence in means and the statistic value. t t
9/25/23, 5 : 37 PM Homework 5: Measurement Error and Sample Selection Page 6 of 10 https://chris-cornwell.shinyapps.io/Assignment_5/#section-b.-empirical-exercise Answer the following question based on Table 5. Question 10: The null hypothesis is _____ at the 5-percent level in all four The null hypothesis is _____ at the 5-percent level in all four The null hypothesis is _____ at the 5-percent level in all four The null hypothesis is _____ at the 5-percent level in all four cases because the 5-percent standard normal critical value is cases because the 5-percent standard normal critical value is cases because the 5-percent standard normal critical value is cases because the 5-percent standard normal critical value is _____. _____. _____. _____. rejected, 1.96 Correct! Question 11: The The The The test generates the smallest test generates the smallest test generates the smallest test generates the smallest value in _____ grade. value in _____ grade. value in _____ grade. value in _____ grade. R Code ! Start Over Run Code Table 5. Tests of no class-size e ! ect, 1st-3rd grade Test Test Estimate Estimate t df df K 13.898995 -5.663532 3616.041 1st 19.782214 -5.595915 2746.461 2nd 9.599936 -2.716076 2238.394 3rd 11.607821 -3.614289 1939.060 K <- t.test(scorek~stark, data = subset(STA First <- t.test(score1~stark, data = subset(STA Second <- t.test(score2~stark, data = subset(STA Third <- t.test(score3~stark, data = subset(STA results <- data.frame( Test = c("K", "1st", "2nd", "3rd"), Estimate = c(diff(K$estimate), diff(Firs diff(Second$estimate), diff(Thir t = c(K$statistic, First$statistic, Second$st df = c(K$parameter, First$parameter, Second$pa ) knitr::kable(results, "simple", caption = "Table 5. Tests of no cla t p 1 2 3 4 5 6 7 8 9 10 11 12 13
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/25/23, 5 : 37 PM Homework 5: Measurement Error and Sample Selection Page 7 of 10 https://chris-cornwell.shinyapps.io/Assignment_5/#section-b.-empirical-exercise first Correct! Question 12: The di ! erences in means in Table 5 are _____ than those The di ! erences in means in Table 5 are _____ than those The di ! erences in means in Table 5 are _____ than those The di ! erences in means in Table 5 are _____ than those reported in Section 6 of the deck, which compares only the reported in Section 6 of the deck, which compares only the reported in Section 6 of the deck, which compares only the reported in Section 6 of the deck, which compares only the _____ STAR participants. _____ STAR participants. _____ STAR participants. _____ STAR participants. greater, original Correct! Question 13: The di ! erences in means reported in Section 6 of the deck are The di ! erences in means reported in Section 6 of the deck are The di ! erences in means reported in Section 6 of the deck are The di ! erences in means reported in Section 6 of the deck are statistically _____ at the 5-percent level. statistically _____ at the 5-percent level. statistically _____ at the 5-percent level. statistically _____ at the 5-percent level. significant Correct! Continue Do aides matter? Up to this point, we have not considered whether teachers’ aides matter. Focusing on the kindergartners, replicate Figure 1 in the deck, comparing regular and regular+aid class types. R Code ! Start Over Run Code ggplot(data = subset(STAR2, stark=="regular" | st aes(x=scorek, fill=as.factor(stark), color=as.factor(stark))) + geom_density(alpha=0.4) + labs( title="Figure 1. Empirical test score distrib x="Kindergarten test score", y="Density" ) 1 2 3 4 5 6 7 8 9
9/25/23, 5 : 37 PM Homework 5: Measurement Error and Sample Selection Page 8 of 10 https://chris-cornwell.shinyapps.io/Assignment_5/#section-b.-empirical-exercise Finally, conduct a test of the null that there is no di ! erence in the average test scores of regular and regular+aide classes. Warning: Removed 377 rows containing non-finit Warning: Removed 377 rows containing non-finit e values (`stat_density()`). e values (`stat_density()`). t R Code ! Start Over Run Code Welch Two Sample t-test Welch Two Sample t-test data: scorek by stark data: scorek by stark t = -0.13824, df = 4038.2, p-value = 0.8901 t = -0.13824, df = 4038.2, p-value = 0.8901 alternative hypothesis: true difference in mea alternative hypothesis: true difference in mea ns between group regular and group regular+aid ns between group regular and group regular+aid e is not equal to 0 e is not equal to 0 95 percent confidence interval: 95 percent confidence interval: -4.766247 4.138376 -4.766247 4.138376 sample estimates: sample estimates: mean in group regular mean in group regul mean in group regular mean in group regul ar+aide ar+aide 918.0429 9 918.0429 9 18.3568 18.3568 t.test(scorek~ stark, data = subset(STAR2, stark= 1 2 3
9/25/23, 5 : 37 PM Homework 5: Measurement Error and Sample Selection Page 9 of 10 https://chris-cornwell.shinyapps.io/Assignment_5/#section-b.-empirical-exercise Question 14: The value of the test statistic indicates that we _____ the null The value of the test statistic indicates that we _____ the null The value of the test statistic indicates that we _____ the null The value of the test statistic indicates that we _____ the null at the 5-percent level. at the 5-percent level. at the 5-percent level. at the 5-percent level. fail to reject Correct! Question 15: The The The The value associated with the test is _____. (Round to 2 value associated with the test is _____. (Round to 2 value associated with the test is _____. (Round to 2 value associated with the test is _____. (Round to 2 decimal places) decimal places) decimal places) decimal places) 0.89 Correct! Continue Previous Topic Next Topic p
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
9/25/23, 5 : 37 PM Homework 5: Measurement Error and Sample Selection Page 10 of 10 https://chris-cornwell.shinyapps.io/Assignment_5/#section-b.-empirical-exercise