| Title: | Sleep Quality and Anxiety in Confinement |
|---|---|
| Description: | Data from the anxiety and confinement study from Alvarado-Aravena et al. (2022) <doi:10.3390/bs12100398>. |
| Authors: | Caren Alvarado-Aravena [aut] (ORCID: <https://orcid.org/0000-0002-1851-2499>), Matías Castillo-Aguilar [aut, cre] (ORCID: <https://orcid.org/0000-0001-7291-247X>), Cristian Núñez-Espinosa [aut] (ORCID: <https://orcid.org/0000-0002-9896-7062>) |
| Maintainer: | Matías Castillo-Aguilar <[email protected]> |
| License: | CC BY 4.0 |
| Version: | 0.0.1 |
| Built: | 2026-06-01 09:36:15 UTC |
| Source: | https://github.com/nim-ach/anxietysleep |
This dataset contains the variables used in the anxiety and confinement study carried out by Alvarado-Aravena et al. 2022.
anxietyanxiety
A data frame with 617 rows y 7 variables:
id: Factor. An identification code for each subject.
sex: Factor w/ 2 levels "Female", "Male". Sex of participants.
zone: Factor w/ 2 levels "CZ", "PZ". Zone in which the subject were by the time he was answering the questionnaire, either CZ (Confinement Zone) or PZ (Partial confinement Zone).
beck_global: Integer. Global score of Beck Anxiety Inventory.
pits_global: Integer. Global score of Pittsburgh Sleep Quality Index.
age: Integer. Age of the subjects in years.
cat_age: Factor w/ 4 levels "18-25", "26-40", "41-50", ">50". Age of the subjects in years.
Alvarado-Aravena, C., Arriaza, K., Castillo-Aguilar, M., Flores, K., Dagnino-Subiabre, A., Estrada-Goic, C., & Núñez-Espinosa, C. (2022). Effect of Confinement on Anxiety Symptoms and Sleep Quality during the COVID-19 Pandemic. Behavioral Sciences, 12(10), 398.
# Mean age grouped by sex and zone using `data.table` syntax anxiety[, # No filtering (i) list(mean_age = mean(age)), # Action to do (j) list(sex, zone)] # Grouping vars (by) # Mean PSQI score grouped by sex and zone, for those with # an age greater than 18 AND a Beck score greater than 10. anxiety[age > 18 & beck_global > 10, list(mean_psqi = mean(pits_global)), list(sex, zone)]# Mean age grouped by sex and zone using `data.table` syntax anxiety[, # No filtering (i) list(mean_age = mean(age)), # Action to do (j) list(sex, zone)] # Grouping vars (by) # Mean PSQI score grouped by sex and zone, for those with # an age greater than 18 AND a Beck score greater than 10. anxiety[age > 18 & beck_global > 10, list(mean_psqi = mean(pits_global)), list(sex, zone)]