From 1c6a4384b1b60e99a12a06ea778d4bd021fc7617 Mon Sep 17 00:00:00 2001 From: Daniel Vartanian Date: Thu, 12 Dec 2024 00:37:46 -0300 Subject: [PATCH] Fix `_results.yml` variables --- R/_pre-render-begin.R | 2 +- R/_pre-render-vars.R | 13 +- _quarto-html.yml | 27 +- _results.yml | 2320 +----------------------------- _variables.yml | 4 +- qmd/chapter-1.qmd | 2 +- qmd/chapter-2.qmd | 2 +- qmd/chapter-5.qmd | 21 +- qmd/chapter-6.qmd | 2 +- qmd/foreign-abstract.qmd | 2 +- qmd/supplementary-material-2.qmd | 32 +- qmd/vernacular-abstract.qmd | 2 +- references.bib | 16 + scss/web.scss | 26 +- 14 files changed, 87 insertions(+), 2384 deletions(-) diff --git a/R/_pre-render-begin.R b/R/_pre-render-begin.R index 33ed255..47d225f 100644 --- a/R/_pre-render-begin.R +++ b/R/_pre-render-begin.R @@ -101,7 +101,7 @@ for (i in var_files){ env_vars |> yaml::write_yaml(env_vars_file_path) -# Create result variables ----- +# Create `_results.yml` variables ----- source(here::here("R", "_pre-render-vars.R")) diff --git a/R/_pre-render-vars.R b/R/_pre-render-vars.R index c46b9bc..84a5977 100644 --- a/R/_pre-render-vars.R +++ b/R/_pre-render-vars.R @@ -12,9 +12,15 @@ raw_data <- targets::tar_read( store = here::here("_targets") ) +weighted_data <- targets::tar_read( + "weighted_data", + store = here::here("_targets") +) + # Chapter 6 ----- -analysis_data_per_nrow_2017_10_15 <- weighted_data |> +analysis_sample_per_nrow_2017_10_15 <- + weighted_data |> dplyr::filter(lubridate::date(timestamp) == as.Date("2017-10-15")) |> nrow() |> magrittr::divide_by(weighted_data |> nrow()) |> @@ -45,15 +51,14 @@ analysis_data_per_nrow_2017_10_15 <- weighted_data |> write_in_results_yml( list( pr_raw_data_nrow = raw_data |> nrow(), - pr_analysis_sample_per_nrow_2017_10_15 = analysis_data_per_nrow_2017_10_15 + pr_analysis_sample_per_nrow_2017_10_15 = analysis_sample_per_nrow_2017_10_15 ) ) rm( raw_data, - anonymized_data, weighted_data, - pr_analysis_data_per_nrow_2017_10_15 + analysis_data_per_nrow_2017_10_15 ) results_vars <- yaml::read_yaml(here::here("_results.yml")) diff --git a/_quarto-html.yml b/_quarto-html.yml index 19f5c49..930f153 100644 --- a/_quarto-html.yml +++ b/_quarto-html.yml @@ -31,17 +31,17 @@ book: - qmd/chapter-5.qmd - qmd/chapter-6.qmd - qmd/references.qmd - # appendices: - # - qmd/supplementary-material-1.qmd - # - qmd/supplementary-material-2.qmd - # - qmd/supplementary-material-3.qmd - # - qmd/supplementary-material-4.qmd - # - qmd/supplementary-material-5.qmd - # - qmd/supplementary-material-6.qmd - # - qmd/supplementary-material-7.qmd - # - qmd/supplementary-material-8.qmd - # - qmd/supplementary-material-9.qmd - # - qmd/supplementary-material-10.qmd + appendices: + - qmd/supplementary-material-1.qmd + - qmd/supplementary-material-2.qmd + - qmd/supplementary-material-3.qmd + - qmd/supplementary-material-4.qmd + - qmd/supplementary-material-5.qmd + - qmd/supplementary-material-6.qmd + - qmd/supplementary-material-7.qmd + - qmd/supplementary-material-8.qmd + - qmd/supplementary-material-9.qmd + - qmd/supplementary-material-10.qmd comments: hypothesis: theme: clean @@ -73,7 +73,4 @@ format: repo-actions: true link-external-icon: false link-external-newwindow: false - theme: - - cosmo - - scss/web.scss - - brand + theme: [cosmo, brand, scss/web.scss] diff --git a/_results.yml b/_results.yml index 496fdec..745eb2d 100644 --- a/_results.yml +++ b/_results.yml @@ -1,2315 +1,5 @@ -analysis_data_nrow: 65824.0 -analysis_data_per_nrow_2017_10_15: 80.15314 -full_data_nrow: 1.15166e+05 -raw_data_nrow: 1.20265e+05 -ea_brazil_pop_2017: 2.07661e+08 -ea_full_sample_lat_lon: - name: - - min - - max - - range - latitude: - - -33.68713 - - 4.47957 - - 38.1667 - longitude: - - -72.90298 - - -34.81247 - - 38.09051 -ea_analysis_sample_lat_lon: - name: - - min - - max - - range - latitude: - - -33.52156 - - 0.32869 - - 33.85026 - longitude: - - -57.5531 - - -34.81247 - - 22.74063 -ea_full_data_non_brazilians_n: 729.0 -ea_full_data_brazilians_n: 1.14144e+05 -ea_brazil_age_stats: - 'n': 2.06172e+08 - n_rm_na: 2.06172e+08 - n_na: 0.0 - mean: 33.53848 - var: 425.13547 - sd: 20.61881 - min: 2.0 - q_1: 16.5 - median: 34.5 - q_3: 44.5 - max: 72.5 - iqr: 28.0 - range: 70.5 - skewness: 0.29582 - kurtosis: 2.13266 -ea_brazil_age_stats_by_sex: - sex: - - Female - - Male - 'n': - - 1.05313e+08 - - 1.00859e+08 - n_rm_na: - - 1.05313e+08 - - 1.00859e+08 - n_na: - - 0.0 - - 0.0 - mean: - - 34.40329 - - 32.63548 - var: - - 434.99931 - - 413.24389 - sd: - - 20.85664 - - 20.3284 - min: - - 2.0 - - 2.0 - q_1: - - 16.5 - - 16.5 - median: - - 34.5 - - 34.5 - q_3: - - 54.5 - - 44.5 - max: - - 72.5 - - 72.5 - iqr: - - 38.0 - - 28.0 - range: - - 70.5 - - 70.5 - skewness: - - 0.25803 - - 0.33302 - kurtosis: - - 2.08754 - - 2.18466 -ea_brazil_age_stats_by_state: - state: - - Acre - - Alagoas - - Amapá - - Amazonas - - Bahia - - Ceará - - Distrito Federal - - Espírito Santo - - Goiás - - Maranhão - - Mato Grosso - - Mato Grosso do Sul - - Minas Gerais - - Paraná - - Paraíba - - Pará - - Pernambuco - - Piauí - - Rio Grande do Norte - - Rio Grande do Sul - - Rio de Janeiro - - Rondônia - - Roraima - - Santa Catarina - - Sergipe - - São Paulo - - Tocantins - 'n': - - 8.4e+05 - - 3.301e+06 - - 8.07e+05 - - 3.861e+06 - - 1.473e+07 - - 9.015e+06 - - 2.93e+06 - - 3.924e+06 - - 6.825e+06 - - 6.959e+06 - - 3.347e+06 - - 2.65e+06 - - 2.09e+07 - - 1.1248e+07 - - 3.954e+06 - - 8.38e+06 - - 9.378e+06 - - 3.253e+06 - - 3.449e+06 - - 1.1262e+07 - - 1.705e+07 - - 1.724e+06 - - 4.85e+05 - - 6.973e+06 - - 2.258e+06 - - 4.5144e+07 - - 1.525e+06 - n_rm_na: - - 8.4e+05 - - 3.301e+06 - - 8.07e+05 - - 3.861e+06 - - 1.473e+07 - - 9.015e+06 - - 2.93e+06 - - 3.924e+06 - - 6.825e+06 - - 6.959e+06 - - 3.347e+06 - - 2.65e+06 - - 2.09e+07 - - 1.1248e+07 - - 3.954e+06 - - 8.38e+06 - - 9.378e+06 - - 3.253e+06 - - 3.449e+06 - - 1.1262e+07 - - 1.705e+07 - - 1.724e+06 - - 4.85e+05 - - 6.973e+06 - - 2.258e+06 - - 4.5144e+07 - - 1.525e+06 - n_na: - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - mean: - - 28.1625 - - 32.00197 - - 27.66605 - - 28.72054 - - 32.48364 - - 32.48064 - - 32.80717 - - 33.30938 - - 32.80542 - - 30.02163 - - 31.74604 - - 32.35962 - - 34.11751 - - 33.9724 - - 33.04565 - - 29.52715 - - 33.26685 - - 32.51306 - - 33.12873 - - 36.20107 - - 36.6437 - - 30.99188 - - 28.24021 - - 34.57751 - - 31.94553 - - 34.61338 - - 31.81934 - var: - - 373.90235 - - 423.00962 - - 347.61321 - - 374.86372 - - 415.34497 - - 424.19063 - - 384.26222 - - 416.83493 - - 405.12729 - - 409.23512 - - 393.47583 - - 425.99331 - - 426.35039 - - 428.12912 - - 440.36745 - - 379.65277 - - 429.25535 - - 435.64812 - - 418.38815 - - 452.92815 - - 442.20538 - - 389.34352 - - 364.03774 - - 417.89936 - - 403.14369 - - 425.52284 - - 415.29461 - sd: - - 19.33655 - - 20.5672 - - 18.64439 - - 19.3614 - - 20.38001 - - 20.59589 - - 19.60261 - - 20.41654 - - 20.12777 - - 20.22956 - - 19.83623 - - 20.63961 - - 20.64825 - - 20.69128 - - 20.98493 - - 19.48468 - - 20.71848 - - 20.87219 - - 20.45454 - - 21.28211 - - 21.02868 - - 19.73179 - - 19.07977 - - 20.44259 - - 20.07844 - - 20.6282 - - 20.37878 - min: - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - - 2.0 - q_1: - - 11.5 - - 14.5 - - 11.5 - - 11.5 - - 16.5 - - 16.5 - - 16.5 - - 16.5 - - 16.5 - - 11.5 - - 14.5 - - 14.5 - - 16.5 - - 16.5 - - 16.5 - - 14.5 - - 16.5 - - 14.5 - - 16.5 - - 18.5 - - 22.0 - - 14.5 - - 11.5 - - 18.5 - - 16.5 - - 18.5 - - 14.5 - median: - - 27.0 - - 27.0 - - 27.0 - - 27.0 - - 34.5 - - 34.5 - - 34.5 - - 34.5 - - 34.5 - - 27.0 - - 34.5 - - 34.5 - - 34.5 - - 34.5 - - 34.5 - - 27.0 - - 34.5 - - 34.5 - - 34.5 - - 34.5 - - 34.5 - - 27.0 - - 27.0 - - 34.5 - - 34.5 - - 34.5 - - 34.5 - q_3: - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 44.5 - - 54.5 - - 54.5 - - 44.5 - - 44.5 - - 54.5 - - 44.5 - - 54.5 - - 44.5 - max: - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - - 72.5 - iqr: - - 33.0 - - 30.0 - - 33.0 - - 33.0 - - 28.0 - - 28.0 - - 28.0 - - 28.0 - - 28.0 - - 33.0 - - 30.0 - - 30.0 - - 28.0 - - 28.0 - - 28.0 - - 30.0 - - 28.0 - - 30.0 - - 28.0 - - 36.0 - - 32.5 - - 30.0 - - 33.0 - - 36.0 - - 28.0 - - 36.0 - - 30.0 - range: - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - - 70.5 - skewness: - - 0.60311 - - 0.4049 - - 0.56628 - - 0.53174 - - 0.36338 - - 0.40277 - - 0.33626 - - 0.28115 - - 0.32007 - - 0.52154 - - 0.34749 - - 0.331 - - 0.27325 - - 0.26422 - - 0.34864 - - 0.50764 - - 0.34397 - - 0.36766 - - 0.34546 - - 0.14729 - - 0.13361 - - 0.40182 - - 0.5329 - - 0.22264 - - 0.38514 - - 0.21543 - - 0.40433 - kurtosis: - - 2.54242 - - 2.19972 - - 2.58885 - - 2.46237 - - 2.21382 - - 2.23226 - - 2.28964 - - 2.1594 - - 2.21895 - - 2.34692 - - 2.26327 - - 2.16067 - - 2.11633 - - 2.10458 - - 2.13207 - - 2.41913 - - 2.14567 - - 2.15312 - - 2.18489 - - 1.98432 - - 2.00935 - - 2.30525 - - 2.49154 - - 2.12675 - - 2.26641 - - 2.09566 - - 2.23134 -ea_full_sample_age_stats: - 'n': 1.14144e+05 - n_rm_na: 1.03202e+05 - n_na: 10942.0 - mean: 30.94448 - var: 119.27984 - sd: 10.92153 - min: 12.0 - q_1: 22.65556 - median: 29.48056 - q_3: 37.32778 - max: 79.475 - iqr: 14.67222 - range: 67.475 - skewness: 0.72979 - kurtosis: 3.30993 -ea_full_sample_age_stats_by_sex: - sex: - - Female - - Male - 'n': - - 75775.0 - - 38279.0 - n_rm_na: - - 68750.0 - - 34379.0 - n_na: - - 7025.0 - - 3900.0 - mean: - - 30.75949 - - 31.30532 - var: - - 120.26101 - - 116.89921 - sd: - - 10.96636 - - 10.81199 - min: - - 12.0 - - 12.00556 - q_1: - - 22.35833 - - 23.37222 - median: - - 29.15833 - - 30.08889 - q_3: - - 37.16111 - - 37.58056 - max: - - 79.475 - - 78.26111 - iqr: - - 14.80278 - - 14.20833 - range: - - 67.475 - - 66.25556 - skewness: - - 0.75355 - - 0.68441 - kurtosis: - - 3.28028 - - 3.38872 -ea_full_sample_age_stats_by_state: - state: - - Acre - - Alagoas - - Amapá - - Amazonas - - Bahia - - Ceará - - Distrito Federal - - Espírito Santo - - Goiás - - Maranhão - - Mato Grosso - - Mato Grosso do Sul - - Minas Gerais - - Paraná - - Paraíba - - Pará - - Pernambuco - - Piauí - - Rio Grande do Norte - - Rio Grande do Sul - - Rio de Janeiro - - Rondônia - - Roraima - - Santa Catarina - - Sergipe - - São Paulo - - Tocantins - 'n': - - 146.0 - - 656.0 - - 138.0 - - 1056.0 - - 2775.0 - - 1701.0 - - 2089.0 - - 2570.0 - - 2864.0 - - 841.0 - - 872.0 - - 1132.0 - - 11215.0 - - 7103.0 - - 976.0 - - 1136.0 - - 1947.0 - - 518.0 - - 985.0 - - 4748.0 - - 11466.0 - - 490.0 - - 140.0 - - 4651.0 - - 648.0 - - 32639.0 - - 322.0 - n_rm_na: - - 134.0 - - 591.0 - - 119.0 - - 942.0 - - 2512.0 - - 1564.0 - - 1886.0 - - 2338.0 - - 2607.0 - - 764.0 - - 783.0 - - 1016.0 - - 10176.0 - - 6389.0 - - 895.0 - - 1042.0 - - 1758.0 - - 471.0 - - 885.0 - - 4312.0 - - 10467.0 - - 441.0 - - 127.0 - - 4221.0 - - 585.0 - - 29818.0 - - 290.0 - n_na: - - 12.0 - - 65.0 - - 19.0 - - 114.0 - - 263.0 - - 137.0 - - 203.0 - - 232.0 - - 257.0 - - 77.0 - - 89.0 - - 116.0 - - 1039.0 - - 714.0 - - 81.0 - - 94.0 - - 189.0 - - 47.0 - - 100.0 - - 436.0 - - 999.0 - - 49.0 - - 13.0 - - 430.0 - - 63.0 - - 2821.0 - - 32.0 - mean: - - 30.08151 - - 29.35159 - - 31.02544 - - 29.61333 - - 29.97362 - - 28.58171 - - 31.18929 - - 30.72727 - - 29.63428 - - 28.67767 - - 29.96583 - - 30.70725 - - 30.46656 - - 30.53027 - - 28.76019 - - 29.34523 - - 29.31232 - - 28.18582 - - 29.29 - - 30.7998 - - 32.83224 - - 29.41686 - - 29.57021 - - 30.78839 - - 28.47735 - - 32.19766 - - 29.3701 - var: - - 84.69217 - - 102.98493 - - 120.22034 - - 87.24705 - - 109.54744 - - 95.66889 - - 109.05262 - - 111.90014 - - 102.51621 - - 94.80833 - - 99.97018 - - 113.01403 - - 111.8331 - - 112.74338 - - 88.7253 - - 105.08108 - - 107.78153 - - 93.42207 - - 98.30491 - - 123.26746 - - 134.04333 - - 92.26539 - - 92.92238 - - 108.3605 - - 77.91569 - - 122.91769 - - 98.43188 - sd: - - 9.20283 - - 10.14815 - - 10.9645 - - 9.34061 - - 10.46649 - - 9.78105 - - 10.44283 - - 10.57829 - - 10.12503 - - 9.73696 - - 9.99851 - - 10.63081 - - 10.57512 - - 10.61807 - - 9.41941 - - 10.25091 - - 10.38179 - - 9.66551 - - 9.91488 - - 11.10259 - - 11.57771 - - 9.60549 - - 9.63963 - - 10.40963 - - 8.82699 - - 11.08683 - - 9.92128 - min: - - 13.79444 - - 12.12778 - - 13.75556 - - 12.16944 - - 12.01667 - - 12.24167 - - 12.1 - - 12.05 - - 12.13611 - - 12.13889 - - 12.11667 - - 12.08889 - - 12.01389 - - 12.00556 - - 12.00556 - - 12.08056 - - 12.00833 - - 12.21111 - - 12.06389 - - 12.025 - - 12.02778 - - 12.83333 - - 13.09722 - - 12.075 - - 12.58056 - - 12.00278 - - 12.47222 - q_1: - - 22.52014 - - 21.8375 - - 22.93472 - - 22.26875 - - 21.86528 - - 20.93542 - - 23.45069 - - 22.78403 - - 21.8125 - - 20.87014 - - 22.88611 - - 22.4125 - - 22.54514 - - 22.68056 - - 21.88056 - - 21.4375 - - 21.20556 - - 21.43333 - - 21.83333 - - 22.33611 - - 24.06111 - - 22.95278 - - 22.82361 - - 23.17778 - - 21.96389 - - 23.82292 - - 21.68819 - median: - - 29.50278 - - 27.24167 - - 28.26389 - - 28.74861 - - 28.75139 - - 27.49028 - - 30.07361 - - 29.30694 - - 28.13611 - - 27.56389 - - 28.59167 - - 29.16944 - - 28.81389 - - 28.84722 - - 27.37222 - - 27.77778 - - 27.72083 - - 26.53611 - - 27.875 - - 28.9375 - - 31.39444 - - 28.06944 - - 27.55 - - 29.27778 - - 27.53333 - - 30.95694 - - 28.24722 - q_3: - - 35.76042 - - 35.46806 - - 37.27222 - - 35.51667 - - 35.97569 - - 34.27292 - - 37.31667 - - 36.87778 - - 35.74861 - - 34.82361 - - 35.28472 - - 37.24375 - - 36.53889 - - 36.77222 - - 33.91667 - - 35.32847 - - 35.56458 - - 32.71944 - - 34.68056 - - 37.15069 - - 39.51111 - - 33.86389 - - 34.89306 - - 36.68611 - - 33.59444 - - 38.74722 - - 35.42639 - max: - - 57.925 - - 65.16667 - - 61.52778 - - 70.58611 - - 70.20556 - - 73.25278 - - 73.91111 - - 70.77778 - - 71.00278 - - 70.86389 - - 75.33333 - - 72.5 - - 77.58056 - - 77.74167 - - 66.47222 - - 74.65833 - - 78.59167 - - 66.83333 - - 64.50833 - - 75.18889 - - 78.26111 - - 63.46667 - - 65.31111 - - 75.48889 - - 65.63333 - - 79.475 - - 62.65556 - iqr: - - 13.24028 - - 13.63056 - - 14.3375 - - 13.24792 - - 14.11042 - - 13.3375 - - 13.86597 - - 14.09375 - - 13.93611 - - 13.95347 - - 12.39861 - - 14.83125 - - 13.99375 - - 14.09167 - - 12.03611 - - 13.89097 - - 14.35903 - - 11.28611 - - 12.84722 - - 14.81458 - - 15.45 - - 10.91111 - - 12.06944 - - 13.50833 - - 11.63056 - - 14.92431 - - 13.73819 - range: - - 44.13056 - - 53.03889 - - 47.77222 - - 58.41667 - - 58.18889 - - 61.01111 - - 61.81111 - - 58.72778 - - 58.86667 - - 58.725 - - 63.21667 - - 60.41111 - - 65.56667 - - 65.73611 - - 54.46667 - - 62.57778 - - 66.58333 - - 54.62222 - - 52.44444 - - 63.16389 - - 66.23333 - - 50.63333 - - 52.21389 - - 63.41389 - - 53.05278 - - 67.47222 - - 50.18333 - skewness: - - 0.68196 - - 0.90947 - - 0.80807 - - 0.60524 - - 0.72204 - - 0.85713 - - 0.65821 - - 0.68653 - - 0.75341 - - 0.6672 - - 0.79738 - - 0.75532 - - 0.80618 - - 0.73729 - - 0.91975 - - 0.91795 - - 0.83918 - - 1.06555 - - 0.83471 - - 0.81955 - - 0.68969 - - 0.94172 - - 0.91582 - - 0.72617 - - 0.8332 - - 0.63289 - - 0.69597 - kurtosis: - - 3.28118 - - 3.67882 - - 3.03593 - - 3.3099 - - 3.30868 - - 3.78093 - - 3.22084 - - 3.11954 - - 3.23782 - - 3.16076 - - 3.7995 - - 3.44615 - - 3.5204 - - 3.31903 - - 4.0092 - - 3.85925 - - 3.57492 - - 4.21467 - - 3.56512 - - 3.367 - - 3.14647 - - 3.92739 - - 3.90408 - - 3.31383 - - 4.07614 - - 3.15375 - - 3.07877 -ea_analysis_sample_age_stats: - 'n': 65824.0 - n_rm_na: 65824.0 - n_na: 0.0 - mean: 32.10927 - var: 85.70147 - sd: 9.25751 - min: 18.0 - q_1: 24.83056 - median: 30.70278 - q_3: 37.74444 - max: 58.95 - iqr: 12.91389 - range: 40.95 - skewness: 0.65703 - kurtosis: 2.81411 -ea_analysis_sample_age_stats_by_sex: - sex: - - Female - - Male - 'n': - - 43729.0 - - 22095.0 - n_rm_na: - - 43729.0 - - 22095.0 - n_na: - - 0.0 - - 0.0 - mean: - - 31.89481 - - 32.53372 - var: - - 87.6635 - - 81.55094 - sd: - - 9.36288 - - 9.03056 - min: - - 18.0 - - 18.0 - q_1: - - 24.44444 - - 25.65278 - median: - - 30.35556 - - 31.38889 - q_3: - - 37.58333 - - 38.02083 - max: - - 58.94722 - - 58.95 - iqr: - - 13.13889 - - 12.36806 - range: - - 40.94722 - - 40.95 - skewness: - - 0.68325 - - 0.61214 - kurtosis: - - 2.81127 - - 2.83738 -ea_analysis_sample_age_stats_by_state: - state: - - Alagoas - - Amapá - - Bahia - - Ceará - - Distrito Federal - - Espírito Santo - - Goiás - - Maranhão - - Minas Gerais - - Paraná - - Paraíba - - Pará - - Pernambuco - - Piauí - - Rio Grande do Norte - - Rio Grande do Sul - - Rio de Janeiro - - Santa Catarina - - Sergipe - - São Paulo - - Tocantins - 'n': - - 444.0 - - 88.0 - - 1923.0 - - 1170.0 - - 1545.0 - - 1847.0 - - 2025.0 - - 569.0 - - 8051.0 - - 4999.0 - - 682.0 - - 804.0 - - 1337.0 - - 338.0 - - 678.0 - - 3390.0 - - 8493.0 - - 3342.0 - - 471.0 - - 23414.0 - - 214.0 - n_rm_na: - - 444.0 - - 88.0 - - 1923.0 - - 1170.0 - - 1545.0 - - 1847.0 - - 2025.0 - - 569.0 - - 8051.0 - - 4999.0 - - 682.0 - - 804.0 - - 1337.0 - - 338.0 - - 678.0 - - 3390.0 - - 8493.0 - - 3342.0 - - 471.0 - - 23414.0 - - 214.0 - n_na: - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - - 0.0 - mean: - - 30.33752 - - 31.51111 - - 31.09095 - - 30.07188 - - 32.09068 - - 31.6367 - - 30.74926 - - 30.0189 - - 31.26153 - - 31.66009 - - 29.81403 - - 30.58927 - - 30.46869 - - 29.40681 - - 30.36118 - - 31.75788 - - 33.08467 - - 31.66326 - - 29.49937 - - 33.05504 - - 30.51637 - var: - - 79.36041 - - 83.10669 - - 79.52911 - - 71.99523 - - 79.55241 - - 83.23324 - - 79.18059 - - 70.59067 - - 80.75495 - - 83.59945 - - 66.75177 - - 76.87196 - - 81.79738 - - 71.4822 - - 74.42283 - - 91.59405 - - 92.91557 - - 80.64677 - - 60.50798 - - 87.32864 - - 70.05064 - sd: - - 8.90845 - - 9.11629 - - 8.91791 - - 8.485 - - 8.91922 - - 9.12323 - - 8.89835 - - 8.40183 - - 8.98638 - - 9.14327 - - 8.17018 - - 8.76767 - - 9.04419 - - 8.45471 - - 8.62687 - - 9.57048 - - 9.63927 - - 8.98035 - - 7.77869 - - 9.34498 - - 8.36963 - min: - - 18.02778 - - 18.28056 - - 18.00556 - - 18.01667 - - 18.02222 - - 18.0 - - 18.00278 - - 18.02778 - - 18.0 - - 18.01111 - - 18.04167 - - 18.0 - - 18.00556 - - 18.025 - - 18.06667 - - 18.00278 - - 18.0 - - 18.02222 - - 18.08056 - - 18.0 - - 18.20833 - q_1: - - 23.27083 - - 24.77431 - - 23.80139 - - 23.22292 - - 25.20556 - - 24.44444 - - 23.56667 - - 23.24722 - - 24.27083 - - 24.50556 - - 23.36458 - - 23.65069 - - 22.97778 - - 23.02569 - - 23.45069 - - 24.04653 - - 25.525 - - 24.82014 - - 23.13194 - - 25.81389 - - 23.92222 - median: - - 28.20417 - - 30.61389 - - 29.88611 - - 28.87917 - - 30.91667 - - 30.25 - - 28.98611 - - 28.74722 - - 29.65 - - 29.95833 - - 28.25278 - - 29.075 - - 28.81111 - - 27.29306 - - 28.75417 - - 30.07083 - - 31.85556 - - 29.94167 - - 28.61944 - - 31.90556 - - 28.98194 - q_3: - - 35.77847 - - 36.66042 - - 36.14583 - - 34.94722 - - 37.35 - - 37.03333 - - 36.38889 - - 35.3 - - 36.64167 - - 37.21806 - - 34.65625 - - 35.75625 - - 36.08889 - - 33.87778 - - 35.16042 - - 37.55972 - - 39.07222 - - 36.84236 - - 34.09167 - - 38.85 - - 35.95278 - max: - - 58.95 - - 55.54444 - - 58.93889 - - 58.825 - - 58.94722 - - 58.66389 - - 58.43611 - - 57.025 - - 58.88333 - - 58.94444 - - 57.19722 - - 57.675 - - 58.50833 - - 57.225 - - 58.09722 - - 58.84444 - - 58.94722 - - 58.875 - - 56.89167 - - 58.94444 - - 55.57778 - iqr: - - 12.50764 - - 11.88611 - - 12.34444 - - 11.72431 - - 12.14444 - - 12.58889 - - 12.82222 - - 12.05278 - - 12.37083 - - 12.7125 - - 11.29167 - - 12.10556 - - 13.11111 - - 10.85208 - - 11.70972 - - 13.51319 - - 13.54722 - - 12.02222 - - 10.95972 - - 13.03611 - - 12.03056 - range: - - 40.92222 - - 37.26389 - - 40.93333 - - 40.80833 - - 40.925 - - 40.66389 - - 40.43333 - - 38.99722 - - 40.88333 - - 40.93333 - - 39.15556 - - 39.675 - - 40.50278 - - 39.2 - - 40.03056 - - 40.84167 - - 40.94722 - - 40.85278 - - 38.81111 - - 40.94444 - - 37.36944 - skewness: - - 0.95909 - - 0.74349 - - 0.72029 - - 0.81453 - - 0.68767 - - 0.71702 - - 0.75707 - - 0.71655 - - 0.75629 - - 0.72352 - - 0.90163 - - 0.80155 - - 0.72998 - - 1.13178 - - 0.85367 - - 0.72118 - - 0.55518 - - 0.74586 - - 0.8126 - - 0.55652 - - 0.78779 - kurtosis: - - 3.508 - - 2.89593 - - 2.97853 - - 3.34388 - - 3.04632 - - 2.94461 - - 2.95399 - - 3.02014 - - 3.01293 - - 2.8831 - - 3.52938 - - 3.21097 - - 2.88942 - - 4.01795 - - 3.23389 - - 2.80274 - - 2.603 - - 2.99638 - - 3.59621 - - 2.68402 - - 3.14864 -ea_full_sampe_chronotype_cutoffs: - interval: - - 21:45:21-02:47:30 - - 02:47:30-03:20:43 - - 03:20:43-03:46:47 - - 03:46:47-05:05:43 - - 05:05:43-05:40:00 - - 05:40:00-06:30:00 - - 06:30:00-11:50:00 - freq: - - 11.16565 - - 11.16953 - - 11.03566 - - 33.35047 - - 11.15207 - - 11.28012 - - 10.84649 - order: - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - label: - - Extremely early - - Moderately early - - Slightly early - - Intermediate - - Slightly late - - Moderately late - - Extremely late -ea_analysis_sample_chronotype_cutoffs: - interval: - - 00:25:43-02:47:30 - - 02:47:30-03:20:00 - - 03:20:00-03:45:21 - - 03:45:21-05:02:09 - - 05:02:09-05:35:00 - - 05:35:00-06:20:21 - - 06:20:21-08:29:39 - freq: - - 11.16462 - - 11.24514 - - 10.93826 - - 33.39815 - - 11.29071 - - 10.85926 - - 11.10385 - order: - - 1 - - 2 - - 3 - - 4 - - 5 - - 6 - - 7 - label: - - Extremely early - - Moderately early - - Slightly early - - Intermediate - - Slightly late - - Moderately late - - Extremely late -ea_analysis_sample_msf_sc_stats: - 'n': 65824 - n_rm_na: 65824 - n_na: 0 - mean: 16121.0 - var: 2.67579e+07 - sd: 5173.0 - min: 1543.0 - q_1: 12429.0 - median: 15686.0 - q_3: 19564.0 - max: 30579.0 - iqr: 7136.0 - range: 29036.0 - skewness: 0.27331 - kurtosis: 2.74709 -ea_analysis_sample_msf_sc_stats_by_category: - msf_sc_category: - - Extremely early - - Moderately early - - Slightly early - - Intermediate - - Slightly late - - Moderately late - - Extremely late - 'n': - - 7349 - - 7402 - - 7134 - - 21860 - - 7432 - - 7148 - - 7309 - n_rm_na: - - 7349 - - 7402 - - 7134 - - 21860 - - 7432 - - 7148 - - 7309 - n_na: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - mean: - - 8017.0 - - 11107.0 - - 12808.0 - - 15739.0 - - 19102.0 - - 21400.0 - - 25521.0 - var: - - 3.02027e+06 - - 3.12033e+05 - - 1.82579e+05 - - 1.70819e+06 - - 3.37766e+05 - - 6.12848e+05 - - 3.96572e+06 - sd: - - 1738.0 - - 559.0 - - 427.0 - - 1307.0 - - 581.0 - - 783.0 - - 1991.0 - min: - - 1543.0 - - 10071.0 - - 12021.0 - - 13543.0 - - 18150.0 - - 20121.0 - - 22843.0 - q_1: - - 7179.0 - - 10650.0 - - 12450.0 - - 14593.0 - - 18600.0 - - 20700.0 - - 23850.0 - median: - - 8443.0 - - 11100.0 - - 12814.0 - - 15686.0 - - 19071.0 - - 21364.0 - - 25200.0 - q_3: - - 9386.0 - - 11614.0 - - 13200.0 - - 16843.0 - - 19629.0 - - 22050.0 - - 27000.0 - max: - - 10050.0 - - 12000.0 - - 13500.0 - - 18107.0 - - 20100.0 - - 22821.0 - - 30579.0 - iqr: - - 2207.0 - - 964.0 - - 750.0 - - 2250.0 - - 1029.0 - - 1350.0 - - 3150.0 - range: - - 8507.0 - - 1929.0 - - 1479.0 - - 4564.0 - - 1950.0 - - 2700.0 - - 7736.0 - skewness: - - -1.16928 - - -0.11608 - - -0.07224 - - 0.08321 - - 0.0775 - - 0.11798 - - 0.65745 - kurtosis: - - 4.0132 - - 1.84327 - - 1.86169 - - 1.82745 - - 1.786 - - 1.80761 - - 2.4279 -ea_analysis_sample_msf_sc_stats_by_sex: - sex: - - Female - - Male - 'n': - - 43729 - - 22095 - n_rm_na: - - 43729 - - 22095 - n_na: - - 0 - - 0 - mean: - - 15976.0 - - 16408.0 - var: - - 2.62182e+07 - - 2.77035e+07 - sd: - - 5120.0 - - 5263.0 - min: - - 1543.0 - - 1586.0 - q_1: - - 12300.0 - - 12664.0 - median: - - 15579.0 - - 15986.0 - q_3: - - 19350.0 - - 19950.0 - max: - - 30579.0 - - 30579.0 - iqr: - - 7050.0 - - 7286.0 - range: - - 29036.0 - - 28993.0 - skewness: - - 0.28369 - - 0.24713 - kurtosis: - - 2.78653 - - 2.67237 -ea_analysis_sample_msf_sc_stats_by_age_group: - age_group: - - 18-19 - - 20-24 - - 25-29 - - 30-39 - - 40-49 - - 50-59 - 'n': - - 2222 - - 9880 - - 11309 - - 20484 - - 8791 - - 3447 - n_rm_na: - - 2222 - - 9880 - - 11309 - - 20484 - - 8791 - - 3447 - n_na: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - mean: - - 18619.0 - - 17709.0 - - 16584.0 - - 15534.0 - - 14637.0 - - 14335.0 - var: - - 2.94506e+07 - - 2.88145e+07 - - 2.46148e+07 - - 2.39289e+07 - - 2.38542e+07 - - 2.44038e+07 - sd: - - 5427.0 - - 5368.0 - - 4961.0 - - 4892.0 - - 4884.0 - - 4940.0 - min: - - 2314.0 - - 1629.0 - - 1800.0 - - 1543.0 - - 1586.0 - - 1800.0 - q_1: - - 14850.0 - - 13821.0 - - 13114.0 - - 12107.0 - - 11100.0 - - 10811.0 - median: - - 18579.0 - - 17550.0 - - 16243.0 - - 15086.0 - - 14143.0 - - 13800.0 - q_3: - - 22500.0 - - 21600.0 - - 19800.0 - - 18600.0 - - 17743.0 - - 17379.0 - max: - - 30579.0 - - 30557.0 - - 30557.0 - - 30536.0 - - 30471.0 - - 30514.0 - iqr: - - 7650.0 - - 7779.0 - - 6686.0 - - 6493.0 - - 6643.0 - - 6568.0 - range: - - 28264.0 - - 28929.0 - - 28757.0 - - 28993.0 - - 28886.0 - - 28714.0 - skewness: - - -0.08303 - - 0.03975 - - 0.23378 - - 0.33214 - - 0.40198 - - 0.47664 - kurtosis: - - 2.61414 - - 2.55567 - - 2.81033 - - 2.93746 - - 2.985 - - 3.1184 -ea_analysis_sample_msf_sc_stats_by_region: - region: - - Central-West - - North - - Northeast - - South - - Southeast - 'n': - - 3570 - - 1106 - - 7612 - - 11731 - - 41805 - n_rm_na: - - 3570 - - 1106 - - 7612 - - 11731 - - 41805 - n_na: - - 0 - - 0 - - 0 - - 0 - - 0 - mean: - - 16013.0 - - 16349.0 - - 15350.0 - - 16668.0 - - 16111.0 - var: - - 2.54421e+07 - - 2.8323e+07 - - 2.88857e+07 - - 2.52696e+07 - - 2.66668e+07 - sd: - - 5044.0 - - 5322.0 - - 5375.0 - - 5027.0 - - 5164.0 - min: - - 1929.0 - - 1993.0 - - 1543.0 - - 1693.0 - - 1543.0 - q_1: - - 12343.0 - - 12541.0 - - 11443.0 - - 13050.0 - - 12429.0 - median: - - 15600.0 - - 16168.0 - - 14850.0 - - 16200.0 - - 15686.0 - q_3: - - 19350.0 - - 19929.0 - - 18964.0 - - 19982.0 - - 19521.0 - max: - - 30557.0 - - 30514.0 - - 30557.0 - - 30579.0 - - 30536.0 - iqr: - - 7007.0 - - 7388.0 - - 7521.0 - - 6932.0 - - 7093.0 - range: - - 28629.0 - - 28521.0 - - 29014.0 - - 28886.0 - - 28993.0 - skewness: - - 0.29542 - - 0.16078 - - 0.27929 - - 0.30605 - - 0.27914 - kurtosis: - - 2.79132 - - 2.65567 - - 2.68633 - - 2.75568 - - 2.75 -ea_analysis_sample_msf_sc_stats_by_state: - state: - - Alagoas - - Amapá - - Bahia - - Ceará - - Distrito Federal - - Espírito Santo - - Goiás - - Maranhão - - Minas Gerais - - Paraná - - Paraíba - - Pará - - Pernambuco - - Piauí - - Rio Grande do Norte - - Rio Grande do Sul - - Rio de Janeiro - - Santa Catarina - - Sergipe - - São Paulo - - Tocantins - 'n': - - 444 - - 88 - - 1923 - - 1170 - - 1545 - - 1847 - - 2025 - - 569 - - 8051 - - 4999 - - 682 - - 804 - - 1337 - - 338 - - 678 - - 3390 - - 8493 - - 3342 - - 471 - - 23414 - - 214 - n_rm_na: - - 444 - - 88 - - 1923 - - 1170 - - 1545 - - 1847 - - 2025 - - 569 - - 8051 - - 4999 - - 682 - - 804 - - 1337 - - 338 - - 678 - - 3390 - - 8493 - - 3342 - - 471 - - 23414 - - 214 - n_na: - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - mean: - - 15317.0 - - 17132.0 - - 14938.0 - - 15280.0 - - 16403.0 - - 15130.0 - - 15715.0 - - 15528.0 - - 15738.0 - - 16618.0 - - 15620.0 - - 16349.0 - - 15728.0 - - 16309.0 - - 15263.0 - - 17203.0 - - 16428.0 - - 16200.0 - - 14989.0 - - 16202.0 - - 16026.0 - var: - - 3.04025e+07 - - 2.7269e+07 - - 2.71622e+07 - - 2.86945e+07 - - 2.67571e+07 - - 2.56358e+07 - - 2.42465e+07 - - 2.6002e+07 - - 2.61074e+07 - - 2.49082e+07 - - 2.58872e+07 - - 2.84708e+07 - - 3.24195e+07 - - 3.1541e+07 - - 2.83117e+07 - - 2.58256e+07 - - 2.70998e+07 - - 2.47482e+07 - - 3.01181e+07 - - 2.66184e+07 - - 2.81046e+07 - sd: - - 5514.0 - - 5222.0 - - 5212.0 - - 5357.0 - - 5173.0 - - 5063.0 - - 4924.0 - - 5099.0 - - 5110.0 - - 4991.0 - - 5088.0 - - 5336.0 - - 5694.0 - - 5616.0 - - 5321.0 - - 5082.0 - - 5206.0 - - 4975.0 - - 5488.0 - - 5159.0 - - 5301.0 - min: - - 3750.0 - - 5700.0 - - 1800.0 - - 1543.0 - - 1929.0 - - 2571.0 - - 2079.0 - - 2400.0 - - 1907.0 - - 2014.0 - - 3643.0 - - 2700.0 - - 1714.0 - - 2314.0 - - 3600.0 - - 1693.0 - - 1800.0 - - 2571.0 - - 1800.0 - - 1543.0 - - 1993.0 - q_1: - - 10993.0 - - 12712.0 - - 11229.0 - - 11571.0 - - 12557.0 - - 11475.0 - - 12214.0 - - 11743.0 - - 12107.0 - - 13039.0 - - 12000.0 - - 12589.0 - - 11400.0 - - 12471.0 - - 11534.0 - - 13457.0 - - 12750.0 - - 12750.0 - - 11282.0 - - 12514.0 - - 12396.0 - median: - - 15043.0 - - 17818.0 - - 14486.0 - - 14743.0 - - 16029.0 - - 14571.0 - - 15300.0 - - 15300.0 - - 15300.0 - - 16114.0 - - 15075.0 - - 16125.0 - - 15300.0 - - 15761.0 - - 14625.0 - - 16886.0 - - 16071.0 - - 15750.0 - - 14529.0 - - 15814.0 - - 15729.0 - q_3: - - 19184.0 - - 20764.0 - - 18450.0 - - 18991.0 - - 19886.0 - - 18257.0 - - 18836.0 - - 19050.0 - - 19050.0 - - 19950.0 - - 19012.0 - - 19934.0 - - 19671.0 - - 19896.0 - - 18959.0 - - 20464.0 - - 19929.0 - - 19479.0 - - 18536.0 - - 19671.0 - - 19312.0 - max: - - 29957.0 - - 27900.0 - - 30321.0 - - 30000.0 - - 30343.0 - - 30321.0 - - 30557.0 - - 30300.0 - - 30536.0 - - 30579.0 - - 30300.0 - - 30386.0 - - 30514.0 - - 30557.0 - - 29400.0 - - 30579.0 - - 30536.0 - - 30514.0 - - 29700.0 - - 30536.0 - - 30514.0 - iqr: - - 8191.0 - - 8052.0 - - 7221.0 - - 7420.0 - - 7329.0 - - 6782.0 - - 6621.0 - - 7307.0 - - 6943.0 - - 6911.0 - - 7012.0 - - 7345.0 - - 8271.0 - - 7425.0 - - 7425.0 - - 7007.0 - - 7179.0 - - 6729.0 - - 7254.0 - - 7157.0 - - 6916.0 - range: - - 26207.0 - - 22200.0 - - 28521.0 - - 28457.0 - - 28414.0 - - 27750.0 - - 28479.0 - - 27900.0 - - 28629.0 - - 28564.0 - - 26657.0 - - 27686.0 - - 28800.0 - - 28243.0 - - 25800.0 - - 28886.0 - - 28736.0 - - 27943.0 - - 27900.0 - - 28993.0 - - 28521.0 - skewness: - - 0.24889 - - -0.08838 - - 0.32002 - - 0.28061 - - 0.22674 - - 0.4638 - - 0.34058 - - 0.26596 - - 0.33674 - - 0.31787 - - 0.33394 - - 0.18498 - - 0.21107 - - 0.1908 - - 0.30432 - - 0.25581 - - 0.23984 - - 0.33762 - - 0.2655 - - 0.25966 - - 0.17304 - kurtosis: - - 2.44503 - - 2.17946 - - 2.82402 - - 2.71588 - - 2.7295 - - 2.99774 - - 2.85034 - - 2.7649 - - 2.83932 - - 2.76096 - - 2.72538 - - 2.58147 - - 2.54021 - - 2.67583 - - 2.57088 - - 2.6802 - - 2.68511 - - 2.84388 - - 2.70032 - - 2.7418 - - 3.1788 -ea_brazil_lat_lon: - name: - - min - - max - - range - latitude: - - -33.75115 - - 5.27184 - - 39.02299 - longitude: - - -73.99045 - - -28.83594 - - 45.15451 +ea_brazil_pop_2017_n: 2.07661e+08 +ea_full_sample_n: 115166 +ea_analysis_sample_n: 65824 +pr_raw_data_nrow: 120265.0 +pr_analysis_sample_per_nrow_2017_10_15: 80.1531356 diff --git a/_variables.yml b/_variables.yml index e244d70..2d054cd 100644 --- a/_variables.yml +++ b/_variables.yml @@ -18,10 +18,10 @@ school: School of Arts, Sciences and Humanities supervisor: Camilo Rodrigues Neto type-of-work: Thesis university: University of São Paulo -version-note: Original version +version-note: Corrected version url: https://danielvartan.github.io/mastersthesis/ language: en-us title: Is Latitude Associated with Chronotype? -date: '2024-12-09' +date: '2024-12-10' year: '2024' format: html diff --git a/qmd/chapter-1.qmd b/qmd/chapter-1.qmd index f180522..8e54173 100644 --- a/qmd/chapter-1.qmd +++ b/qmd/chapter-1.qmd @@ -15,7 +15,7 @@ The central hypothesis is that *latitude is associated with human chronotype dis This study emerged from an insightful debate with my former supervisor, sparked by results published in 2017 in *Nature Scientific Reports* [@leocadio-miguel2017]. In this paper, the authors conclude, as the theory suggests, that there is a significant association between latitude and chronotype in the Brazilian population. However, the results were not as clear-cut as suggested, and the methodology used to test the hypothesis was not optimal. This thesis revisits the hypothesis using an improved statistical approach, aiming to provide a more accurate and reliable answer to the research question. -In the following chapters, the latitude hypothesis is explored using Popper's hypothetical-deductive method [@popper1979] and an enhanced approach to Null Hypothesis Significance Testing (NHST), rooted in the original Neyman-Pearson framework for data testing [@neyman1928; @neyman1928a; @perezgonzalez2015]. This exploration involves a series of analyses conducted on a large dataset comprising `{r} results_vars$analysis_data_nrow |> format_to_md_latex()` individuals, collected from the Brazilian population in 2017. The dataset is based on the Munich Chronotype Questionnaire (MCTQ) [@roenneberg2003; @roenneberg2012a], and includes data on sleep habits and demographic characteristics from all of Brazil's states. +In the following chapters, the latitude hypothesis is explored using Popper's hypothetical-deductive method [@popper1979] and an enhanced approach to Null Hypothesis Significance Testing (NHST), rooted in the original Neyman-Pearson framework for data testing [@neyman1928; @neyman1928a; @perezgonzalez2015]. This exploration involves a series of analyses conducted on a large dataset comprising `{r} results_vars$ea_analysis_sample_n |> format_to_md_latex()` individuals, collected from the Brazilian population in 2017. The dataset is based on the Munich Chronotype Questionnaire (MCTQ) [@roenneberg2003; @roenneberg2012a], and includes data on sleep habits and demographic characteristics from all of Brazil's states. It is important to emphasize that this thesis does not aim to propose or discuss the mechanisms underlying the latitude-chronotype relationship. Instead, it focuses solely on the statistical association between them. If a cause-effect relationship exists, it must be preceded by, at the very least, an association — something this thesis aims to uncover. diff --git a/qmd/chapter-2.qmd b/qmd/chapter-2.qmd index b2ac8ad..e6b5e0e 100644 --- a/qmd/chapter-2.qmd +++ b/qmd/chapter-2.qmd @@ -57,4 +57,4 @@ Building on this idea, @roenneberg2003 developed the Munich Chronotype Questionn Variables of the Munich ChronoType Questionnaire scale (a sleep log). In its standard version, these variables are collected in the context of workdays and work-free days. BT = Local time of going to bed. SPrep = Local time of preparing to sleep. SLat = Sleep latency *or* time to fall asleep after preparing to sleep. SO = Local time of sleep onset. SD = Sleep duration. **MS** = Local time of mid-sleep. SE = Local time of sleep. Alarm = A logical value indicating if the respondent uses an alarm clock to wake up. SE = Local time of sleep end. SI = "Sleep inertia" (despite the name, this variable represents the time the respondent takes to get up after sleep end). GU = Local time of getting out of bed. TBT = Total time in bed. ::: -For this thesis, the MCTQ serves as the instrument for measuring subjects' chronotypes (circadian phenotypes). The study uses a dataset of `{r} results_vars$analysis_data_nrow |> format_to_md_latex()` Brazilian respondents from an online survey conducted by the author in 2017, which includes geographical data such as postal codes. This data enables the examination of the potential association between chronotype and geographic factors, particularly latitude and longitude. The research ultimately seeks to determine whether latitude plays a role in shaping chronotype, contributing to our understanding of circadian rhythms in relation to geographic variables. +For this thesis, the MCTQ serves as the instrument for measuring subjects' chronotypes (circadian phenotypes). The study uses a dataset of `{r} results_vars$ea_analysis_sample_n |> format_to_md_latex()` Brazilian respondents from an online survey conducted by the author in 2017, which includes geographical data such as postal codes. This data enables the examination of the potential association between chronotype and geographic factors, particularly latitude and longitude. The research ultimately seeks to determine whether latitude plays a role in shaping chronotype, contributing to our understanding of circadian rhythms in relation to geographic variables. diff --git a/qmd/chapter-5.qmd b/qmd/chapter-5.qmd index 3bea0c8..856bff5 100644 --- a/qmd/chapter-5.qmd +++ b/qmd/chapter-5.qmd @@ -29,12 +29,23 @@ library(targets) ``` ```{r} +#| include: false + source(here::here("R", "plot_brazil.R")) source(here::here("R", "plot_chronotype.R")) source(here::here("R", "plot_latitude_series.R")) source(here::here("R", "utils.R")) ``` +```{r} +#| include: false + +weighted_data <- targets::tar_read( + "weighted_data", + store = here::here("_targets") +) +``` + :::: {.content-visible when-format="html"} ::: {.callout-note} The following study was designed for publication in the journal [*Scientific Reports*](https://www.nature.com/srep/) ([IF 2023: 3.8/JCR](https://jcr.clarivate.com/jcr) | [CAPES: A1/2017–2020](https://sucupira-legado.capes.gov.br/sucupira/)) and structured in accordance with the journal's [submission guidelines](https://www.nature.com/srep/author-instructions/submission-guidelines). @@ -45,7 +56,7 @@ The following study was designed for publication in the journal [*Scientific Rep ## Abstract -\noindent __Chronotypes are temporal phenotypes that reflect our internal temporal organization, a product of evolutionary pressures enabling organisms to anticipate events. These intrinsic rhythms are modulated by zeitgebers — environmental stimuli that entrain these biological oscillations, with light exposure being the primary mechanism. Given light's role in these systems, previous research hypothesized that latitude might significantly influence chronotypes, suggesting that populations near the equator would exhibit more morning-leaning characteristics due to more consistent light-dark cycles, while populations near the poles might display more evening-leaning tendencies with a potentially freer expression of intrinsic rhythms. To test this hypothesis, we analyzed chronotype data from a large sample of `{r} results_vars$analysis_data_nrow |> format_to_md_latex()` subjects across diverse latitudes in Brazil. Our results revealed that latitude show only negligible effect sizes on chronotype, indicating that the entrainment phenomenon is far more complex than previously conceived. These findings challenge simplified environmental models of biological timing and underscore the need for more nuanced investigations into the mechanisms underlying temporal phenotypes, opening new avenues for understanding the intricate relationship between environmental cues and individual circadian rhythms.__ +\noindent __Chronotypes are temporal phenotypes that reflect our internal temporal organization, a product of evolutionary pressures enabling organisms to anticipate events. These intrinsic rhythms are modulated by zeitgebers — environmental stimuli that entrain these biological oscillations, with light exposure being the primary mechanism. Given light's role in these systems, previous research hypothesized that latitude might significantly influence chronotypes, suggesting that populations near the equator would exhibit more morning-leaning characteristics due to more consistent light-dark cycles, while populations near the poles might display more evening-leaning tendencies with a potentially freer expression of intrinsic rhythms. To test this hypothesis, we analyzed chronotype data from a large sample of `{r} results_vars$ea_analysis_sample_n |> format_to_md_latex()` subjects across diverse latitudes in Brazil. Our results revealed that latitude show only negligible effect sizes on chronotype, indicating that the entrainment phenomenon is far more complex than previously conceived. These findings challenge simplified environmental models of biological timing and underscore the need for more nuanced investigations into the mechanisms underlying temporal phenotypes, opening new avenues for understanding the intricate relationship between environmental cues and individual circadian rhythms.__ ## Introduction @@ -59,7 +70,7 @@ The primary zeitgeber influencing biological rhythms is light, particularly sunl Recent efforts to test the latitude hypothesis in humans have largely been unsuccessful in identifying a significant effect related to latitude. Many of these studies used secondary data or small sample sizes. A notable attempt was made by Leocadio-Miguel et al. [-@leocadio-miguel2017], who measured the chronotype of $12,884$ Brazilian subjects across a wide latitudinal range using the Morningness–Eveningness Questionnaire (MEQ). Their findings showed a negligible effect size. One possible explanation is that the MEQ measures psychological traits rather than the biological states of circadian rhythms themselves [@roenneberg2019], meaning it might not be the most suitable tool for testing the hypothesis [@leocadio-miguel2014]. -This study presents a novel attempt to test the latitude hypothesis, using a biological approach through the Munich ChronoType Questionnaire (MCTQ) [@roenneberg2003]. In addition, it utilizes the largest dataset on chronotype in a single country, as far as the existing literature suggests, comprising `{r} results_vars$analysis_data_nrow |> format_to_md_latex()` respondents, all living within the same timezone in Brazil and completing the survey within a one-week window (@fig-chapter-5-sample-geographical-distribution). +This study presents a novel attempt to test the latitude hypothesis, using a biological approach through the Munich ChronoType Questionnaire (MCTQ) [@roenneberg2003]. In addition, it utilizes the largest dataset on chronotype in a single country, as far as the existing literature suggests, comprising `{r} results_vars$ea_analysis_sample_n |> format_to_md_latex()` respondents, all living within the same timezone in Brazil and completing the survey within a one-week window (@fig-chapter-5-sample-geographical-distribution). ::: {#fig-chapter-5-sample-geographical-distribution} ```{r} @@ -82,7 +93,7 @@ plot_analysis_3 <- [Source: Created by the author.]{.legend} -Geographical distribution of the sample used in the analysis: ($`{r} weighted_data |> nrow() |> format_to_md_latex(before = "n = ") |> I()`$). Each point represents a municipality, with its size proportional to the number of participants and its color indicating participant density. The sample includes Brazilian individuals aged 18 or older, residing in the UTC-3 timezone, who completed the survey between October 15 and 21, 2017. The size and color scale are logarithmic ($\log_{10}$). +Geographical distribution of the sample used in the analysis: ($`{r} results_vars$ea_analysis_sample_n |> format_to_md_latex(before = "n = ") |> I()`$). Each point represents a municipality, with its size proportional to the number of participants and its color indicating participant density. The sample includes Brazilian individuals aged 18 or older, residing in the UTC-3 timezone, who completed the survey between October 15 and 21, 2017. The size and color scale are logarithmic ($\log_{10}$). ::: ## Results @@ -196,9 +207,9 @@ Participants completed an online questionnaire, which included the sleep log as ### Sample -The dataset used for analysis was made up of `{r} results_vars$analysis_data_nrow |> format_to_md_latex()` Brazilian individuals aged 18 or older, residing in the UTC-3 timezone, who completed the survey between October 15 and 21, 2017. +The dataset used for analysis was made up of `{r} results_vars$ea_analysis_sample_n |> format_to_md_latex()` Brazilian individuals aged 18 or older, residing in the UTC-3 timezone, who completed the survey between October 15 and 21, 2017. -The unfiltered valid sample comprises `{r} results_vars$full_data_nrow |> format_to_md_latex()` participants from all Brazilian states, while the raw sample is composed of $120,265$ individuals. The majority of the sample data was obtained in 2017 from October 15th to 21st by [a broadcast](https://globoplay.globo.com/v/6219513/) of the online questionnaire on a popular Brazil's Sunday TV show with national reach [@redeglobo2017]. This amount of data collected in such a short time gave the sample a population cross-sectional characteristic. +The unfiltered valid sample comprises `{r} results_vars$ea_full_sample_n |> format_to_md_latex()` participants from all Brazilian states, while the raw sample is composed of $120,265$ individuals. The majority of the sample data was obtained in 2017 from October 15th to 21st by [a broadcast](https://globoplay.globo.com/v/6219513/) of the online questionnaire on a popular Brazil's Sunday TV show with national reach [@redeglobo2017]. This amount of data collected in such a short time gave the sample a population cross-sectional characteristic. ```{r} #| include: false diff --git a/qmd/chapter-6.qmd b/qmd/chapter-6.qmd index ebdd5f7..edec2c0 100644 --- a/qmd/chapter-6.qmd +++ b/qmd/chapter-6.qmd @@ -23,7 +23,7 @@ While this study provides valuable insights, it is essential to acknowledge cert Additionally, the use of the Munich Chronotype Questionnaire (MCTQ), while a validated instrument, introduces the potential for recall and social desirability biases inherent to self-reported measures. However, the large sample size likely mitigates these biases, as predicted by the law of large numbers [@degroot2012, p. 352]. Furthermore, at the time of data collection, the MCTQ had not yet been officially validated in Portuguese (this was only introduced in 2020 by @reis2020a), which may have introduced minor inconsistencies, though its nature as a sleep log suggests this impact was minimal. -Another factor to consider is the timing of data collection relative to the start of Daylight Saving Time (DST) in Brazil. On the day data collection commenced (October 15th, 2017 – `{r} analysis_data_per_nrow_2017_10_15 |> format_to_md_latex()` $80.153\%$ of the data used in this analysis were collected on this day), a significant portion of respondents adjusted their clocks forward by one hour. While this could theoretically influence their responses, the questions were specifically designed to capture daily routines, which were not affected by the DST adjustment at that moment. Furthermore, any potential effect of DST would likely strengthen the latitude hypothesis; however, this was not supported by the data. +Another factor to consider is the timing of data collection relative to the start of Daylight Saving Time (DST) in Brazil. On the day data collection commenced (October 15th, 2017 – `{r} results_vars$pr_analysis_sample_per_nrow_2017_10_15 |> format_to_md_latex()` $80.153\%$ of the data used in this analysis were collected on this day), a significant portion of respondents adjusted their clocks forward by one hour. While this could theoretically influence their responses, the questions were specifically designed to capture daily routines, which were not affected by the DST adjustment at that moment. Furthermore, any potential effect of DST would likely strengthen the latitude hypothesis; however, this was not supported by the data. These limitations, while noteworthy, do not undermine the study's findings but rather highlight areas for refinement in future research. diff --git a/qmd/foreign-abstract.qmd b/qmd/foreign-abstract.qmd index 9c11130..73a2a1a 100644 --- a/qmd/foreign-abstract.qmd +++ b/qmd/foreign-abstract.qmd @@ -24,7 +24,7 @@ Vartanian, D. ({\imprimirdata}). \textit{A latitude está associada ao cronotipo ::: -As teorias sobre ritmos circadianos estão bem estabelecidas na ciência, mas ainda há a necessidade de testá-las em amostras mais amplas para compreender melhor a expressão dos fenótipos temporais. Esta dissertação investiga a hipótese de que a latitude influencia a expressão dos cronotipos, baseada na ideia de que regiões próximas aos polos recebem menos luz solar ao longo do ano do que as regiões equatoriais. Esse diferencial sugere que áreas equatoriais possuem um *zeitgeber* solar mais forte, o que poderia levar a uma maior sincronização dos ritmos circadianos com o ciclo claro-escuro, reduzindo a amplitude e a diversidade de fenótipos circadianos, resultando em uma propensão maior ao cronotipo matutino. Para testar essa hipótese, foram analisados dados de `{r} results_vars$analysis_data_nrow |> format_to_md_latex(decimal_mark = ",", big_mark = ".")` indivíduos de todas as regiões do Brasil, coletados em 2017 com base no Munich ChronoType Questionnaire (MCTQ). A análise, utilizando modelos de regressão linear aninhados, revelou um efeito negligenciável da latitude na variação da expressão dos cronotipos ($f^2$ de Cohen $= 0.012137120$), em contraste com estudos recentes. Embora a hipótese faça sentido e esteja alinhada com teorias evolutivas dos sistemas biológicos temporais, os resultados sugerem que o fenômeno de *entraiment* é mais complexo do que se imagina. +As teorias sobre ritmos circadianos estão bem estabelecidas na ciência, mas ainda há a necessidade de testá-las em amostras mais amplas para compreender melhor a expressão dos fenótipos temporais. Esta dissertação investiga a hipótese de que a latitude influencia a expressão dos cronotipos, baseada na ideia de que regiões próximas aos polos recebem menos luz solar ao longo do ano do que as regiões equatoriais. Esse diferencial sugere que áreas equatoriais possuem um *zeitgeber* solar mais forte, o que poderia levar a uma maior sincronização dos ritmos circadianos com o ciclo claro-escuro, reduzindo a amplitude e a diversidade de fenótipos circadianos, resultando em uma propensão maior ao cronotipo matutino. Para testar essa hipótese, foram analisados dados de `{r} results_vars$ea_analysis_sample_n |> format_to_md_latex(decimal_mark = ",", big_mark = ".")` indivíduos de todas as regiões do Brasil, coletados em 2017 com base no Munich ChronoType Questionnaire (MCTQ). A análise, utilizando modelos de regressão linear aninhados, revelou um efeito negligenciável da latitude na variação da expressão dos cronotipos ($f^2$ de Cohen $= 0.012137120$), em contraste com estudos recentes. Embora a hipótese faça sentido e esteja alinhada com teorias evolutivas dos sistemas biológicos temporais, os resultados sugerem que o fenômeno de *entraiment* é mais complexo do que se imagina. __Palavras-chave__: Ciência da complexidade. Sistemas complexos. Cronobiologia. Ritmos biológicos. Cronotipos. Fenótipos circadianos. Sono. Entrainment. Latitude. MCTQ. diff --git a/qmd/supplementary-material-2.qmd b/qmd/supplementary-material-2.qmd index 07f6d7e..11c6819 100644 --- a/qmd/supplementary-material-2.qmd +++ b/qmd/supplementary-material-2.qmd @@ -13,6 +13,9 @@ source(here::here("R", "_setup.R")) #| include: false library(magrittr) +library(tidyr) +library(patchwork) +library(targets) ``` ```{r} @@ -21,31 +24,6 @@ library(magrittr) source(here::here("R", "utils.R")) ``` -```{r} -#| eval: false -#| include: false - -targets::tar_make(script = here::here("_targets.R")) -``` - -```{r} -#| include: false - -anonymized_data <- targets::tar_read( - "anonymized_data", - store = here::here("_targets") -) -``` - -```{r} -#| include: false - -weighted_data <- targets::tar_read( - "weighted_data", - store = here::here("_targets") -) -``` - ## Overview This document focuses on providing a detailed explanation of the methods and steps involved in building the models and testing the thesis hypothesis. @@ -72,9 +50,9 @@ Variables of the Munich ChronoType Questionnaire scale (A sleep log). In its sta ## Sample -The dataset used for analysis is made up of `{r} results_vars$analysis_data_nrow |> format_to_md_latex()` Brazilian individuals aged 18 or older, residing in the UTC-3 timezone, who completed the survey between October 15 and 21, 2017. +The dataset used for analysis is made up of `{r} results_vars$ea_analysis_sample_n |> format_to_md_latex()` Brazilian individuals aged 18 or older, residing in the UTC-3 timezone, who completed the survey between October 15 and 21, 2017. -The unfiltered valid sample comprises `{r} results_vars$full_data_nrow |> format_to_md_latex()` participants from all Brazilian states, while the raw sample is composed of `{r} results_vars$raw_data_nrow |> format_to_md_latex()` individuals. The majority of the sample data was obtained in 2017 from October 15th to 21st by [a broadcast](https://globoplay.globo.com/v/6219513/) of the online questionnaire on a popular Brazil's Sunday TV show with national reach [@redeglobo2017]. This amount of data collected in such a short time gave the sample a population cross-sectional characteristic. +The unfiltered valid sample comprises `{r} results_vars$ea_full_sample_n |> format_to_md_latex()` participants from all Brazilian states, while the raw sample is composed of `{r} results_vars$raw_data_nrow |> format_to_md_latex()` individuals. The majority of the sample data was obtained in 2017 from October 15th to 21st by [a broadcast](https://globoplay.globo.com/v/6219513/) of the online questionnaire on a popular Brazil's Sunday TV show with national reach [@redeglobo2017]. This amount of data collected in such a short time gave the sample a population cross-sectional characteristic. ::: {#fig-appendice-1-age-sex-chronotype-series} ![](images/globo-2017-figure-1.png) diff --git a/qmd/vernacular-abstract.qmd b/qmd/vernacular-abstract.qmd index 55e7dba..27ccae7 100644 --- a/qmd/vernacular-abstract.qmd +++ b/qmd/vernacular-abstract.qmd @@ -18,7 +18,7 @@ Vartanian, D. ({\imprimirdata}). \textit{\imprimirtitulo} [{\imprimirtipodetitul ::: -Theories on circadian rhythms are well-established in science, but there is still a need to test them in larger samples to gain a better understanding of the expression of temporal phenotypes. This thesis investigates the hypothesis that latitude influences chronotype expression, based on the idea that regions closer to the poles receive less sunlight over the year than equatorial regions. This difference suggests that equatorial areas have a stronger solar zeitgeber, which could lead to greater synchronization of circadian rhythms with the light-dark cycle, reducing the amplitude and diversity of circadian phenotypes, resulting in a higher propensity for morningness in those populations. To test this hypothesis, data from `{r} results_vars$analysis_data_nrow |> format_to_md_latex()` individuals from all regions of Brazil were analyzed, collected in 2017 based on the Munich ChronoType Questionnaire (MCTQ). The analysis, using nested linear regression models, revealed a negligible effect of latitude on the variation in chronotype expression (Cohen’s $f^2 = 0.012137120$), contrasting with recent studies. Although the hypothesis is reasonable and aligns with evolutionary theories of temporal biological systems, the results suggest that the phenomenon of entrainment is more complex than previously thought. +Theories on circadian rhythms are well-established in science, but there is still a need to test them in larger samples to gain a better understanding of the expression of temporal phenotypes. This thesis investigates the hypothesis that latitude influences chronotype expression, based on the idea that regions closer to the poles receive less sunlight over the year than equatorial regions. This difference suggests that equatorial areas have a stronger solar zeitgeber, which could lead to greater synchronization of circadian rhythms with the light-dark cycle, reducing the amplitude and diversity of circadian phenotypes, resulting in a higher propensity for morningness in those populations. To test this hypothesis, data from `{r} results_vars$ea_analysis_sample_n|> format_to_md_latex()` individuals from all regions of Brazil were analyzed, collected in 2017 based on the Munich ChronoType Questionnaire (MCTQ). The analysis, using nested linear regression models, revealed a negligible effect of latitude on the variation in chronotype expression (Cohen’s $f^2 = 0.012137120$), contrasting with recent studies. Although the hypothesis is reasonable and aligns with evolutionary theories of temporal biological systems, the results suggest that the phenomenon of entrainment is more complex than previously thought. __Keywords__: {{< var keyword >}} diff --git a/references.bib b/references.bib index 0d51a58..a4244f6 100644 --- a/references.bib +++ b/references.bib @@ -819,6 +819,22 @@ @book{fox2016 file = {G:\Meu Drive\Zotero\files\Fox - 2016 - Applied regression analysis and generalized linear models.pdf} } +@book{frey2022, + title = {The {{SAGE}} encyclopedia of research design}, + editor = {Frey, Bruce B.}, + date = {2022}, + edition = {2}, + publisher = {SAGE Publications}, + location = {Thousand Oaks,~CA}, + doi = {10.4135/9781071812082}, + url = {https://sk.sagepub.com/reference/the-sage-encyclopedia-of-research-design-2e}, + urldate = {2023-09-11}, + isbn = {978-1-0718-1212-9 978-1-0718-1208-2}, + langid = {english}, + keywords = {science,scientific methodology}, + file = {G:\Meu Drive\Zotero\files\Frey - 2022 - The SAGE encyclopedia of research design.pdf} +} + @book{frommlet2016, title = {Phenotype and genotype: the search for influential genes}, shorttitle = {Phenotypes and {{Genotypes}}}, diff --git a/scss/web.scss b/scss/web.scss index 7fdc87f..04377a6 100644 --- a/scss/web.scss +++ b/scss/web.scss @@ -3,21 +3,20 @@ // See: . // See: . -$body-color: $secondary; - $content-padding-top: 1.25rem; -$callout-color-note: $primary; -$callout-color-tip: $primary; -$callout-color-caution: $primary; -$callout-color-warning: $primary; -$callout-color-important: $primary; +$callout-color-note: #EA7701; +$callout-color-tip: #EA7701; +$callout-color-caution: #EA7701; +$callout-color-warning: #EA7701; +$callout-color-important: #EA7701; /*-- scss:rules --*/ -.center-x { - display: inline-block; - text-align: center; +/* Body ----- */ + +body { + color: $brand-gray; } /* Navigation ----- */ @@ -130,3 +129,10 @@ code a:any-link { .quarto-float-caption-top { margin-bottom: 2em; } + +/* Others ----- */ + +.center-x { + display: inline-block; + text-align: center; +}