0 of 4 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 4 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0) 0 Essay(s) Pending (Possible Point(s): 0)
First summarize total_ely3 to identify the mean value. Then you can create the new binary variable by either manually entering the mean value or using macros:
gen total_ely3_below_avg = (total_ely3 < 10.6438) if total_ely3 != . or gen total_ely3_below_avg = (total_ely3 < `r(mean)’) if total_ely3 != .
Macros will be covered in the Stata Best Practices lesson.
Then you just need to count the number of values that are below average.
count if total_ely3_below_avg == 1
First summarize total_ely3 to calculate the mean and standard deviation (SD). Then you can either enter these values manually or use macros:
gen total_ely3_std = (total_ely3 – 10.6438)/3.662166 if total_ely3 != . or gen total_ely3_std = (total_ely3 – `r(mean)’)/`r(sd)’ if total_ely3 != .
Then just count the number of observations that have values less than 2 for this new variable:
count if total_ely3_std < -2
Create a new total_bl variable that takes on values of the original total_bl variable for children in grades 3, 4, and 5 at baseline:
gen total_bl_2 = hindi_bl + math_bl + english_bl if (child_class_bl == 3 | child_class_bl == 4 | child_class_bl == 5)
Then replace the values of this new variable with only Hindi+math scores for children in grades 1 and 2 at baseline:
replace total_bl_2 = hindi_bl + math_bl if (child_class_bl == 1 | child_class_bl == 2)
Now you can take the average of this new variable for children in grades 1 and 2 at baseline:
sum total_bl_2 if (child_class_bl == 1 | child_class_bl == 2)
Sorting on total_bl first puts all of the students with the lowest total_bl score at the top. Then sorting on total_ely1 puts the students with the lowest total_ely1 scores at the top of those students with the lowest total_bl scores. But since multiple students have the lowest scores on both tests (total_bl = 3, total_ely1 = 3), Stata will vary which specific student shows up first, unless you included the ‘stable’ option.
1. Create a binary variable named total_ely3_below_avg that is equal to 1 if the student scores below average on the Year 3 endline test, 0 if the student scores at or above average on the Year 3 endline test, and missing if the student does not have a Year 3 endline test score. How many students have a value of 1 for this new variable?
2. Create a new variable named total_ely3_std that contains the standardized values of the total_ely3 variable (i.e. the new variable should have mean = 0 and sd = 1). How many students score more than 2 standard deviations below average on the Year 3 endline test?
3. Suppose that English is not part of the curriculum until Grade 3, so we want to ignore English scores for lower grades. Create a new variable named total_bl_2 that omits English scores for children in grades 1 & 2. Note that total_bl = hindi_bl + math_bl + english_bl, and that grade at baseline is recorded in the variable child_class_bl. What is the average baseline test score, using this new variable, for children in Grades 1 & 2? Round to the nearest 0.1.
4. Suppose that you run the command sort total_bl total_ely1. Which student will show up first in the newly sorted dataset?
6 December 2024
5 December 2024
4 December 2024
3 December 2024
12 September 2022
Username or Email Address
Password
Remember Me