Skip to content

Commit

Permalink
Edit question text
Browse files Browse the repository at this point in the history
  • Loading branch information
ivelasq committed Aug 20, 2024
1 parent 975563e commit 0358918
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions 14-ambarom-vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,14 @@ When calculating estimates from the data, we use the survey design object `ambar

### Example: Worry about COVID-19

This survey was administered between March and August 2021, with the specific timing varying by country^[See table 2 in @lapop-tech for dates by country]. Given the state of the pandemic at that time, several questions about COVID-19 were included. The first question about COVID-19 asked was:
This survey was administered between March and August 2021, with the specific timing varying by country^[See table 2 in @lapop-tech for dates by country]. Given the state of the pandemic at that time, several questions about COVID-19 were included. According to the core questionnaire [@lapop-svy], the first question asked about COVID-19 was:

> Question text: "How worried are you about the possibility that you or someone in your household will get sick from coronavirus in the next 3 months?"
> "How worried are you about the possibility that you or someone in your household will get sick from coronavirus in the next 3 months?"
>
> | - Very worried
> | - Somewhat worried
> | - A little worried
> | - Not worried at all
>
> Source: [@lapop-svy]
If we are interested in those who are very worried or somewhat worried, we can create a new variable (`CovidWorry_bin`) that groups levels of the original question using the `fct_collapse()` function from the {forcats} package [@R-forcats]. We then use the `survey_count()` function to understand how responses are distributed across each category of the original variable (`CovidWorry`) and the new variable (`CovidWorry_bin`). \index{Functions in srvyr!survey\_count|(}

Expand Down Expand Up @@ -244,17 +242,15 @@ covid_worry_country_ests_gt %>%

### Example: Education affected by COVID-19

Respondents were also asked a question about how the pandemic affected education. This question was asked to households with children under the age of 13, and respondents could select more than one option, as follows:
In the core questionnaire [@lapop-svy], respondents were also asked a question about how the pandemic affected education. This question was asked to households with children under the age of 13, and respondents could select more than one option, as follows:

> Question text: "Did any of these children have their school education affected due to the pandemic?"
> "Did any of these children have their school education affected due to the pandemic?"
>
> | - No, because they are not yet school age or because they do not attend school for another reason
> | - No, their classes continued normally
> | - Yes, they went to virtual or remote classes
> | - Yes, they switched to a combination of virtual and in-person classes
> | - Yes, they cut all ties with the school
>
> Source: [@lapop-svy]
Working with multiple-choice questions can be both challenging and interesting. Let's walk through how to analyze this question. If we are interested in the impact on education, we should focus on the data of those whose children are attending school. This means we need to exclude those who selected the first response option: "No, because they are not yet school age or because they do not attend school for another reason." To do this, we use the `Educ_NotInSchool` variable in the dataset, which has values of `0` and `1`. A value of `1` indicates that the respondent chose the first response option (none of the children are in school), and a value of `0` means that at least one of their children is in school. By filtering the data to those with a value of `0` (they have at least one child in school), we can consider only respondents with at least one child attending school.

Expand Down

0 comments on commit 0358918

Please sign in to comment.