Stata Best Practices-Quiz 4
Sign in to Google to save your progress. Learn more
Email *
1. Which variables would be included in the following varlist: child*bl *
1 point
Import the EG DIB dataset and create new versions of all test score variables that replace missing values with 0. (Note that test score variables are those that start with total, hindi, math, and english). Use a loop to do this efficiently.
2. How many variables are included in your loop? *
1 point
3. How many variables had at least 1 value change in this loop? *
1 point
4. Create a new variable total_avg that is a student’s average score across the 4 rounds of testing (total_bl, total_ely1, total_ely2, and total_ely3), using your new variables that replaced missing with 0. What is the average total_avg across the dataset? Round to the nearest 0.1 *
1 point
The variable child_age_bl contains the student’s age (in years) at baseline. Create a binary variable for each age-year: child_age_4 = 1 if the student is 4 and 0 if not 4, child_age_5 = 1 if the student is 5 and 0 if not 5, etc. Use a forvalue loop to do this task efficiently. (Hint: rather than hardcode the minimum and maximum ages in the dataset, summarize child_age_bl and save the minimum and maximum ages in locals).
5. How many new variables were created in the last step? *
1 point
6. Regress total_ely1 on the set of binary variables that you created (use the regress command). Which age group has the highest average test scores at the end of Year 1? *
1 point
Submit
Clear form
Never submit passwords through Google Forms.
This form was created inside of Idinsight.org. Report Abuse