0 of 3 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 3 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)
Since the variable “child_caste_cat” has 5 values and the variable “assessed_ely3” has 2 values, this bysort command executes 5*2 = 10 summarize commands. You could either run the bysort command and count the number of summarize commands, or tabulate child_caste_cat assessed_ely3 and count the number of cells with non-zero observation counts.
You can specify the top 25 students within each caste category with a single bysort command:
bys child_caste_cat (child_id_rand): gen top25 = (_n <= _N/4)
This command tells Stata to create a new variable “top25” that assigns a 1 to observations that have observation numbers less than or equal to 1/4 of the total number of observations. Since I specified bysort child_caste_cat, Stata repeats this calculation for each caste category. By including “(child_id_rand)” in the bysort command, Stata will sort by child_id_rand values within each child_caste_cat value before generating the values for the top25 variable. The reason why Stata knows to sort within child_caste_cat instead of using child_id_rand to define categories is because I put child_id_rand into parentheses. Since OBC students are denoted by the value 3 in the child_caste_cat variable, I can calculate the average baseline score of the top 25% of OBC students with the following command:
sum total_bl if child_caste_cat == 3 & top25 == 1
You can use the same approach in this problem as in the last problem:
bys child_caste_cat (child_id_rand): gen bottom25 = (_n > _N*3/4) sum total_bl if child_caste_cat == 3 & bottom25 == 1
1. If you run the command “bysort child_caste_cat assessed_ely3: sum total_bl”, how many summarize commands will Stata run?
2. Sort the dataset by child_caste_cat and then within caste categories by child_id_rand. What is the average baseline score (total_bl) of the first 25% of OBC students in this sorted dataset? Round to the nearest 0.1.
3. Without changing the sort order, what is the average baseline score of the last 25% of OBC students? Round to the nearest 0.1
6 December 2024
5 December 2024
4 December 2024
3 December 2024
12 September 2022
Username or Email Address
Password
Remember Me