# load libraries 
library("knitr")  
library("ggplot2")
library("ggpubr")
library("tidyverse")
## ── Attaching packages ────────────── tidyverse 1.3.0 ──
## ✓ tibble  3.0.3     ✓ dplyr   1.0.1
## ✓ tidyr   1.1.1     ✓ stringr 1.4.0
## ✓ readr   1.3.1     ✓ forcats 0.5.0
## ✓ purrr   0.3.4
## ── Conflicts ───────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library("ggstatsplot")
## Registered S3 method overwritten by 'broom.mixed':
##   method      from 
##   tidy.gamlss broom
## Registered S3 methods overwritten by 'lme4':
##   method                          from
##   cooks.distance.influence.merMod car 
##   influence.merMod                car 
##   dfbeta.influence.merMod         car 
##   dfbetas.influence.merMod        car
## In case you would like cite this package, cite it as:
##      Patil, I. (2018). ggstatsplot: "ggplot2" Based Plots with Statistical Details. CRAN.
##      Retrieved from https://cran.r-project.org/web/packages/ggstatsplot/index.html
library("psych")
## 
## Attaching package: 'psych'
## The following objects are masked from 'package:ggplot2':
## 
##     %+%, alpha
library("ggthemes")
library("summarytools")
## Registered S3 method overwritten by 'pryr':
##   method      from
##   print.bytes Rcpp
## For best results, restart R session and update pander using devtools:: or remotes::install_github('rapporter/pander')
## 
## Attaching package: 'summarytools'
## The following object is masked from 'package:tibble':
## 
##     view
library("Hmisc")
## Loading required package: lattice
## Loading required package: survival
## Loading required package: Formula
## 
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:summarytools':
## 
##     label, label<-
## The following object is masked from 'package:psych':
## 
##     describe
## The following objects are masked from 'package:dplyr':
## 
##     src, summarize
## The following objects are masked from 'package:base':
## 
##     format.pval, units
library("corrr")
library("sjstats")
## 
## Attaching package: 'sjstats'
## The following object is masked from 'package:psych':
## 
##     phi
library("psych")
library("ggcorrplot")
library("sjmisc")
## 
## Attaching package: 'sjmisc'
## The following object is masked from 'package:Hmisc':
## 
##     %nin%
## The following object is masked from 'package:summarytools':
## 
##     descr
## The following object is masked from 'package:purrr':
## 
##     is_empty
## The following object is masked from 'package:tidyr':
## 
##     replace_na
## The following object is masked from 'package:tibble':
## 
##     add_case
library("lubridate")
## 
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
## 
##     date, intersect, setdiff, union
library("dplyr")
# data file
covid = read.csv("/Volumes/group/users/borchersLR/COVID/github/covid.csv")
# excluding participants with no cesdc
covid = covid %>% 
    filter(!is.na(CESDC_total.TC))
# N = 109
head(covid)
##   ELS_ID Child_Sex.T1 Parent_Income.T1 KSADS_Child_Race_by_P.T1 Age_S1.T1
## 1      5            2               NA                        1     11.14
## 2      6            2               NA                        3     13.46
## 3     14            2               10                        1     10.65
## 4     16            2                8                        1     10.08
## 5     17            2                2                        5     10.86
## 6     19            2               NA                        1     11.06
##   cdi_TOTAL.T1 sumsev_type_t1 Child_Age.TC PSS_total.TC CESDC_total.TC
## 1           10           11.5        17.68           18             12
## 2            0           14.5        19.98           25             38
## 3            3           11.5        17.05           34             51
## 4            0            2.5        16.42           33             50
## 5            1            5.0        17.11           23             18
## 6            4            8.5        17.30           29             41
##   Covid_child_fever.TC Covid_child_cough.TC Covid_child_short_breath.TC
## 1                    0                    0                           0
## 2                    0                    0                           0
## 3                    1                    0                           0
## 4                    0                    0                           0
## 5                    0                    0                           0
## 6                    0                    0                           0
##   Covid_child_sore_throat.TC Covid_child_fatigue.TC
## 1                          0                      0
## 2                          0                      0
## 3                          0                      1
## 4                          1                      1
## 5                          0                      0
## 6                          0                      1
##   Covid_child_loss_taste_smell.TC Covid_child_other_symptom.TC
## 1                               0                            0
## 2                               0                            0
## 3                               0                            0
## 4                               0                            0
## 5                               0                            0
## 6                               0                            0
##   Worry_self_infected.TC Worry_fam_infected.TC Self_phys_health_influence.TC
## 1                      2                     3                             2
## 2                      4                     4                             4
## 3                      4                     4                             2
## 4                      1                     1                             1
## 5                      3                     5                             3
## 6                      3                     4                             3
##   Self_mental_health_influence.TC Read_talk_virus.TC Covid_positive_changes.TC
## 1                               3                  4                         2
## 2                               4                  3                         2
## 3                               5                  5                         1
## 4                               4                  4                         1
## 5                               4                  4                         1
## 6                               4                  5                         2
##   Stress_of_restrictions.TC Contacts_outside_change.TC
## 1                         3                          1
## 2                         2                          2
## 3                         5                          4
## 4                         5                          5
## 5                         4                          4
## 6                         4                          5
##   Diff_following_contact_rules.TC Quality_relations_family_change.TC
## 1                               2                                  2
## 2                               2                                  4
## 3                               5                                  2
## 4                               2                                  2
## 5                               1                                  3
## 6                               3                                  2
##   Stress_relations_family_change.TC Quality_relations_friends_change.TC
## 1                                 3                                   3
## 2                                 4                                   3
## 3                                 5                                   4
## 4                                 4                                   2
## 5                                 1                                   3
## 6                                 3                                   4
##   Stress_relations_friends_change.TC Cancelling_events_difficulty.TC
## 1                                  3                               4
## 2                                  3                               4
## 3                                  2                               4
## 4                                  4                               4
## 5                                  1                               2
## 6                                  3                               3
##   Family_financial_problems.TC Worry_living_stability.TC Hope_crisis_end.TC
## 1                            3                         2                  3
## 2                            2                         2                  2
## 3                            3                         2                  2
## 4                            2                         3                  2
## 5                            2                         1                  5
## 6                            3                         2                  2
##   Worried_2weeks.TC Happy_sad_2weeks.TC Relaxed_anxious_2weeks.TC
## 1                 3                   4                         3
## 2                 4                   1                         4
## 3                 4                   1                         5
## 4                 3                   1                         5
## 5                 2                   3                         3
## 6                 4                   2                         5
##   Fatigued_tired_2weeks.TC Loneliness_2weeks.TC Concentration_2weeks.TC
## 1                        3                    2                       3
## 2                        3                    4                       4
## 3                        4                    5                       5
## 4                        2                    4                       5
## 5                        3                    1                       2
## 6                        3                    5                       4
##   Neg_thoughts_2weeks.TC Irritability_2weeks.TC Mental_health_rating.TC
## 1                      2                      2                       2
## 2                      4                      3                       4
## 3                      5                      5                       4
## 4                      4                      4                       5
## 5                      1                      1                       3
## 6                      5                      3                       4
##   Worry_no_food.TC Anhedonia_2weeks.TC Physical_health_rating.TC
## 1                0                   2                         2
## 2                0                   2                         3
## 3                1                   1                         3
## 4                1                   2                         3
## 5                1                   1                         3
## 6                0                   3                         2
##   Fidgety_restless_2weeks.TC income_3levels
## 1                          3             NA
## 2                          1             NA
## 3                          5              3
## 4                          5              2
## 5                          3              1
## 6                          4             NA
### key
# tc = covid-19 assessment time point
## sex
# 1 is male; 2 is female
## race
# 1 is white; 2 is black/african american; 3 is hispanic/latin-x; 4 is asian/asian american; 5 is biracial; 6 is other race
# els = early life stress
# abstract
# number of male and female participants in the sample
# 1 is male; 2 is female
covid %>% 
      group_by(Child_Sex.T1) %>%
      summarise(n=n())
## `summarise()` ungrouping output (override with `.groups` argument)
## # A tibble: 2 x 2
##   Child_Sex.T1     n
##          <int> <int>
## 1            1    43
## 2            2    66
# age range of participants
min(covid$Child_Age.TC)
## [1] 12.82
max(covid$Child_Age.TC)
## [1] 19.98
# years between baseline and tc assessment
covid$years <- covid$Child_Age.TC-covid$Age_S1.T1
summary(covid$years)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   3.020   4.510   5.070   5.064   5.810   6.540
mean(covid$years)
## [1] 5.064312
sd(covid$years)
## [1] 0.8592346
# correlation between els and depression 
cor.test(covid$sumsev_type_t1, covid$CESDC_total.TC)
## 
##  Pearson's product-moment correlation
## 
## data:  covid$sumsev_type_t1 and covid$CESDC_total.TC
## t = 2.8112, df = 107, p-value = 0.005871
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.07800399 0.42918713
## sample estimates:
##       cor 
## 0.2622577
# sex differences in depression
t.test(CESDC_total.TC ~ Child_Sex.T1, data = covid, rm.na=TRUE,  var.equal=T)
## 
##  Two Sample t-test
## 
## data:  CESDC_total.TC by Child_Sex.T1
## t = -3.5573, df = 107, p-value = 0.0005598
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -11.569219  -3.289132
## sample estimates:
## mean in group 1 mean in group 2 
##        16.11628        23.54545
## methods
# dates not publicly available; identifying information
# dates <- read.csv('/Volumes/group/users/borchersLR/COVID/github/tc_dates.csv',sep=",",header=T)
# dates_sample <-left_join(covid, dates, by="ELS_ID")
# time between
# dates_sample$background_timestamp<-as.Date(dates_sample$background_timestamp, format = "%m/%d/%y")
# summary(dates_sample$background_timestamp)
# days between shelter in place March 17
# shelter<-as.Date(as.character("03/17/2020"), format="%m/%d/%y")
# dates_sample$date_diff <- dates_sample$background_timestamp- shelter
# summary(as.integer(dates_sample$date_diff))
# mean(as.integer(dates_sample$date_diff), na.rm=T)
# sd(as.integer(dates_sample$date_diff), na.rm=T)
# percent of participants who completed the covid-19 (TC) assessment 
109/221
## [1] 0.4932127
# age of participants
min(covid$Child_Age.TC)
## [1] 12.82
max(covid$Child_Age.TC)
## [1] 19.98
mean(covid$Child_Age.TC)
## [1] 16.29789
sd(covid$Child_Age.TC)
## [1] 1.473223
# figure 1
# dates not publicly available; identifying information
cdate<-read.table('/Volumes/group/users/borchersLR/COVID/github/Bay_Area_Cases_Summed_Over_Time.csv',sep=",",header=T)  
cdate$Date<-na.omit(cdate$Date)
cdate$Date<-as.Date(cdate$Date, format = "%m/%d/%y")
p<-ggplot(cdate, aes(x=Date, y=Bay_Area_Case_Count))+geom_line(size=2, linetype="solid")
tiff('Data_Collection_COVID_Cases.tiff', units="in", width=5, height=5, res=300)
p+labs(title="", x="Date", y="Bay Area COVID-19 Case Count")+
  theme_classic()+
  theme(axis.title.x=element_text(family="Arial",colour="Black", size=16),
        axis.text.x=element_text(family="Arial",size=12, colour="black", angle=45, hjust=1))+
  theme(axis.title.y=element_text(family="Arial",colour="Black", size=16),
        axis.text.y=element_text(family="Arial", vjust=.5,size=12, colour="black"))+
  theme(legend.text=element_text(family="Arial",size=12)) +
  guides(colour = guide_legend(override.aes = list(size=8))) +
  theme(legend.title=element_text(family="Arial", size=12))+
  theme(legend.position = "none")+annotate("rect", xmin = as.Date("2020-04-03"), xmax = as.Date("2020-04-23"), ymin = 0, ymax = 8000, alpha = .2)+annotate("text", x = as.Date("2020-04-13"), y = 2000, label = "Data Collection Period", family="Arial") +
  scale_x_date(name="Date", date_breaks="5 day", date_labels = "%b %d") 
## Warning: Removed 218 row(s) containing missing values (geom_path).
# cdi
# one participant did not complete the cdi at baseline
min(covid$cdi_TOTAL.T1, na.rm = TRUE)
## [1] 0
max(covid$cdi_TOTAL.T1, na.rm = TRUE)
## [1] 10
mean(covid$cdi_TOTAL.T1, na.rm = TRUE)
## [1] 1.768519
sd(covid$cdi_TOTAL.T1, na.rm = TRUE)
## [1] 2.048964
# crobach's alpha for cdi at baseline
cdi_t1 = read.csv("/Volumes/group/users/borchersLR/COVID/github/cdi_t1.csv")
cdi_t1 = cdi_t1 %>% 
   filter(!is.na(cdi_1.T1)) 
cdi_t1 %>% 
  select(
    cdi_1.T1, 
    cdi_2_R.T1, 
    cdi_3.T1, 
    cdi_4_R.T1, 
    cdi_5_R.T1, 
    cdi_6_R.T1,
    cdi_7.T1,
    cdi_8.T1,
    cdi_9.T1,
    cdi_10_R.T1
  ) %>% 
  alpha()
## 
## Reliability analysis   
## Call: alpha(x = .)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
##       0.75      0.77    0.77      0.26 3.4 0.025 0.22 0.24     0.24
## 
##  lower alpha upper     95% confidence boundaries
## 0.7 0.75 0.8 
## 
##  Reliability if an item is dropped:
##             raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
## cdi_1.T1         0.72      0.75    0.74      0.25 2.9    0.027 0.0082  0.24
## cdi_2_R.T1       0.74      0.76    0.76      0.26 3.2    0.026 0.0090  0.24
## cdi_3.T1         0.75      0.78    0.78      0.28 3.5    0.025 0.0071  0.28
## cdi_4_R.T1       0.73      0.74    0.74      0.24 2.9    0.027 0.0081  0.24
## cdi_5_R.T1       0.73      0.75    0.75      0.25 3.0    0.027 0.0083  0.24
## cdi_6_R.T1       0.74      0.76    0.76      0.26 3.2    0.026 0.0101  0.25
## cdi_7.T1         0.74      0.76    0.76      0.26 3.2    0.026 0.0102  0.27
## cdi_8.T1         0.71      0.74    0.74      0.24 2.9    0.029 0.0083  0.24
## cdi_9.T1         0.74      0.76    0.76      0.26 3.2    0.026 0.0094  0.26
## cdi_10_R.T1      0.72      0.74    0.73      0.24 2.8    0.028 0.0085  0.23
## 
##  Item statistics 
##               n raw.r std.r r.cor r.drop  mean   sd
## cdi_1.T1    211  0.60  0.63  0.58   0.48 0.185 0.39
## cdi_2_R.T1  211  0.57  0.54  0.46   0.40 0.332 0.50
## cdi_3.T1    211  0.35  0.41  0.29   0.25 0.071 0.26
## cdi_4_R.T1  211  0.60  0.64  0.60   0.51 0.095 0.29
## cdi_5_R.T1  210  0.58  0.60  0.54   0.47 0.114 0.35
## cdi_6_R.T1  211  0.61  0.54  0.46   0.41 0.488 0.63
## cdi_7.T1    211  0.55  0.52  0.43   0.37 0.346 0.52
## cdi_8.T1    211  0.67  0.66  0.62   0.53 0.223 0.48
## cdi_9.T1    211  0.54  0.53  0.45   0.38 0.242 0.44
## cdi_10_R.T1 211  0.63  0.67  0.64   0.55 0.090 0.29
## 
## Non missing response frequency for each item
##                0    1    2 miss
## cdi_1.T1    0.82 0.18 0.00    0
## cdi_2_R.T1  0.68 0.30 0.01    0
## cdi_3.T1    0.93 0.07 0.00    0
## cdi_4_R.T1  0.91 0.09 0.00    0
## cdi_5_R.T1  0.90 0.10 0.01    0
## cdi_6_R.T1  0.58 0.35 0.07    0
## cdi_7.T1    0.68 0.30 0.02    0
## cdi_8.T1    0.81 0.17 0.03    0
## cdi_9.T1    0.76 0.23 0.00    0
## cdi_10_R.T1 0.91 0.09 0.00    0
# cesdc
# internal consistency 
# df with all cesdc and pss items at tc
items = read.csv("/Volumes/group/users/borchersLR/COVID/github/pss_cesd_items.csv")
# pss
# one participant did not complete the pss at tc
# reverse code 4, 5, 7, 8, then sum
items <-
  items %>%
  mutate_at(
    vars(
      covid_pss_c_4, covid_pss_c_5, covid_pss_c_7, covid_pss_c_8
    ),
    funs(
      . %>%
        dplyr::recode(
          "0" = 4,
          "1" = 3,
          "2" = 2,
          "3" = 1,
          "4" = 0
        )
    )
  )
## Warning: `funs()` is deprecated as of dplyr 0.8.0.
## Please use a list of either functions or lambdas: 
## 
##   # Simple named list: 
##   list(mean = mean, median = median)
## 
##   # Auto named with `tibble::lst()`: 
##   tibble::lst(mean, median)
## 
##   # Using lambdas
##   list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.
items %>% 
  select(
    covid_pss_c_1, 
    covid_pss_c_2, 
    covid_pss_c_3, 
    covid_pss_c_4, 
    covid_pss_c_5, 
    covid_pss_c_6,
    covid_pss_c_7,
    covid_pss_c_8,
    covid_pss_c_9,
    covid_pss_c_10
  ) %>% 
  alpha()
## 
## Reliability analysis   
## Call: alpha(x = .)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
##       0.84      0.84    0.87      0.35 5.3 0.016  1.8 0.66     0.33
## 
##  lower alpha upper     95% confidence boundaries
## 0.81 0.84 0.87 
## 
##  Reliability if an item is dropped:
##                raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## covid_pss_c_1       0.82      0.82    0.85      0.34 4.6    0.019 0.022  0.32
## covid_pss_c_2       0.83      0.83    0.86      0.35 4.9    0.018 0.021  0.32
## covid_pss_c_3       0.82      0.82    0.84      0.34 4.6    0.019 0.019  0.32
## covid_pss_c_4       0.83      0.83    0.86      0.36 5.1    0.017 0.020  0.34
## covid_pss_c_5       0.83      0.83    0.85      0.35 4.8    0.018 0.023  0.32
## covid_pss_c_6       0.83      0.83    0.86      0.35 4.9    0.018 0.023  0.34
## covid_pss_c_7       0.84      0.84    0.86      0.36 5.1    0.017 0.024  0.34
## covid_pss_c_8       0.83      0.82    0.85      0.34 4.7    0.018 0.021  0.32
## covid_pss_c_9       0.83      0.83    0.85      0.35 4.8    0.018 0.021  0.33
## covid_pss_c_10      0.81      0.81    0.83      0.32 4.2    0.020 0.020  0.29
## 
##  Item statistics 
##                  n raw.r std.r r.cor r.drop mean   sd
## covid_pss_c_1  108  0.69  0.69  0.65   0.60  1.8 0.97
## covid_pss_c_2  108  0.61  0.60  0.54   0.49  2.1 1.12
## covid_pss_c_3  108  0.70  0.68  0.65   0.60  2.1 1.08
## covid_pss_c_4  108  0.54  0.57  0.51   0.44  1.5 0.91
## covid_pss_c_5  108  0.60  0.62  0.58   0.50  2.0 0.91
## covid_pss_c_6  108  0.63  0.61  0.56   0.51  1.7 1.20
## covid_pss_c_7  108  0.54  0.56  0.48   0.43  1.8 0.90
## covid_pss_c_8  108  0.65  0.66  0.64   0.54  1.9 1.00
## covid_pss_c_9  108  0.64  0.63  0.58   0.52  1.9 1.11
## covid_pss_c_10 108  0.80  0.79  0.79   0.73  1.7 1.08
## 
## Non missing response frequency for each item
##                   0    1    2    3    4 miss
## covid_pss_c_1  0.09 0.25 0.44 0.19 0.04 0.48
## covid_pss_c_2  0.09 0.19 0.38 0.22 0.12 0.48
## covid_pss_c_3  0.06 0.21 0.35 0.26 0.11 0.48
## covid_pss_c_4  0.10 0.43 0.36 0.07 0.04 0.48
## covid_pss_c_5  0.04 0.28 0.40 0.25 0.04 0.48
## covid_pss_c_6  0.16 0.36 0.22 0.17 0.09 0.48
## covid_pss_c_7  0.06 0.32 0.42 0.17 0.03 0.48
## covid_pss_c_8  0.07 0.26 0.40 0.21 0.06 0.48
## covid_pss_c_9  0.16 0.18 0.35 0.28 0.04 0.48
## covid_pss_c_10 0.14 0.31 0.32 0.17 0.06 0.48
# cesdc
# reverse code 4, 8, 12, 16, then sum
items <-
  items %>%
  mutate_at(
    vars(
      covid_cesd_c_4, covid_cesd_c_8, covid_cesd_c_12, covid_cesd_c_16
    ),
    funs(
      . %>%
        dplyr::recode(
          "0" = 3,
          "1" = 2,
          "2" = 1,
          "3" = 0
        )
    )
  )
items %>% 
  select(
    covid_cesd_c_1, 
    covid_cesd_c_2, 
    covid_cesd_c_3, 
    covid_cesd_c_4, 
    covid_cesd_c_5, 
    covid_cesd_c_6,
    covid_cesd_c_7,
    covid_cesd_c_8,
    covid_cesd_c_9,
    covid_cesd_c_10,
    covid_cesd_c_11,
    covid_cesd_c_12,
    covid_cesd_c_13,
    covid_cesd_c_14,
    covid_cesd_c_15,
    covid_cesd_c_16,
    covid_cesd_c_17,
    covid_cesd_c_18,
    covid_cesd_c_19,
    covid_cesd_c_20
  ) %>% 
  alpha()
## 
## Reliability analysis   
## Call: alpha(x = .)
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean   sd median_r
##       0.91      0.91    0.94      0.34  10 0.0091    1 0.56     0.34
## 
##  lower alpha upper     95% confidence boundaries
## 0.89 0.91 0.93 
## 
##  Reliability if an item is dropped:
##                 raw_alpha std.alpha G6(smc) average_r  S/N alpha se var.r med.r
## covid_cesd_c_1       0.91      0.91    0.94      0.34 10.0   0.0094 0.021  0.35
## covid_cesd_c_2       0.91      0.91    0.94      0.35 10.0   0.0093 0.021  0.35
## covid_cesd_c_3       0.90      0.90    0.94      0.33  9.5   0.0097 0.021  0.33
## covid_cesd_c_4       0.91      0.91    0.94      0.35 10.1   0.0092 0.021  0.35
## covid_cesd_c_5       0.91      0.91    0.94      0.34  9.9   0.0094 0.021  0.35
## covid_cesd_c_6       0.90      0.90    0.93      0.33  9.4   0.0098 0.019  0.33
## covid_cesd_c_7       0.90      0.91    0.94      0.34  9.6   0.0097 0.022  0.33
## covid_cesd_c_8       0.91      0.91    0.94      0.35 10.0   0.0094 0.021  0.35
## covid_cesd_c_9       0.91      0.91    0.94      0.35 10.0   0.0093 0.021  0.34
## covid_cesd_c_10      0.91      0.91    0.94      0.35 10.2   0.0093 0.020  0.35
## covid_cesd_c_11      0.91      0.91    0.94      0.35 10.4   0.0090 0.019  0.35
## covid_cesd_c_12      0.90      0.91    0.94      0.33  9.5   0.0097 0.021  0.33
## covid_cesd_c_13      0.91      0.91    0.94      0.34  9.8   0.0095 0.021  0.33
## covid_cesd_c_14      0.90      0.91    0.94      0.34  9.6   0.0097 0.019  0.34
## covid_cesd_c_15      0.91      0.91    0.94      0.34  9.9   0.0094 0.018  0.34
## covid_cesd_c_16      0.90      0.91    0.94      0.33  9.5   0.0097 0.021  0.33
## covid_cesd_c_17      0.90      0.90    0.93      0.33  9.3   0.0100 0.020  0.33
## covid_cesd_c_18      0.90      0.90    0.93      0.33  9.3   0.0099 0.019  0.33
## covid_cesd_c_19      0.90      0.91    0.93      0.33  9.6   0.0097 0.019  0.33
## covid_cesd_c_20      0.90      0.90    0.94      0.33  9.4   0.0100 0.021  0.33
## 
##  Item statistics 
##                   n raw.r std.r r.cor r.drop mean   sd
## covid_cesd_c_1  109  0.55  0.55  0.52   0.49 0.99 0.98
## covid_cesd_c_2  109  0.54  0.52  0.49   0.47 0.91 1.02
## covid_cesd_c_3  109  0.69  0.70  0.68   0.65 0.54 0.76
## covid_cesd_c_4  109  0.51  0.51  0.48   0.43 1.27 1.03
## covid_cesd_c_5  109  0.56  0.55  0.52   0.50 1.61 0.97
## covid_cesd_c_6  109  0.72  0.74  0.74   0.69 1.02 0.83
## covid_cesd_c_7  109  0.66  0.65  0.63   0.60 1.16 0.97
## covid_cesd_c_8  109  0.52  0.52  0.49   0.46 1.85 0.85
## covid_cesd_c_9  109  0.52  0.52  0.48   0.46 0.93 0.90
## covid_cesd_c_10 109  0.45  0.46  0.43   0.40 0.70 0.71
## covid_cesd_c_11 109  0.42  0.41  0.37   0.34 0.74 1.01
## covid_cesd_c_12 109  0.67  0.68  0.66   0.62 0.95 0.79
## covid_cesd_c_13 109  0.60  0.59  0.57   0.54 1.06 1.00
## covid_cesd_c_14 109  0.66  0.67  0.66   0.61 0.88 1.04
## covid_cesd_c_15 109  0.56  0.56  0.55   0.50 0.52 0.87
## covid_cesd_c_16 109  0.67  0.68  0.67   0.63 1.18 0.82
## covid_cesd_c_17 109  0.75  0.75  0.75   0.71 0.97 0.98
## covid_cesd_c_18 109  0.74  0.75  0.75   0.70 1.10 0.83
## covid_cesd_c_19 109  0.67  0.67  0.68   0.62 0.68 0.99
## covid_cesd_c_20 109  0.73  0.73  0.72   0.68 1.56 1.06
## 
## Non missing response frequency for each item
##                    0    1    2    3 miss
## covid_cesd_c_1  0.39 0.33 0.19 0.09 0.48
## covid_cesd_c_2  0.48 0.23 0.20 0.09 0.48
## covid_cesd_c_3  0.60 0.29 0.08 0.03 0.48
## covid_cesd_c_4  0.27 0.37 0.20 0.17 0.48
## covid_cesd_c_5  0.17 0.25 0.40 0.18 0.48
## covid_cesd_c_6  0.29 0.43 0.24 0.04 0.48
## covid_cesd_c_7  0.29 0.37 0.23 0.11 0.48
## covid_cesd_c_8  0.06 0.25 0.46 0.23 0.48
## covid_cesd_c_9  0.39 0.36 0.20 0.06 0.48
## covid_cesd_c_10 0.43 0.46 0.09 0.02 0.48
## covid_cesd_c_11 0.56 0.25 0.08 0.11 0.48
## covid_cesd_c_12 0.31 0.44 0.23 0.02 0.48
## covid_cesd_c_13 0.35 0.37 0.17 0.12 0.48
## covid_cesd_c_14 0.50 0.24 0.16 0.11 0.48
## covid_cesd_c_15 0.67 0.19 0.08 0.06 0.48
## covid_cesd_c_16 0.23 0.39 0.36 0.03 0.48
## covid_cesd_c_17 0.41 0.28 0.24 0.07 0.48
## covid_cesd_c_18 0.23 0.50 0.20 0.06 0.48
## covid_cesd_c_19 0.61 0.20 0.10 0.09 0.48
## covid_cesd_c_20 0.18 0.32 0.25 0.25 0.48
# calculating self-report covid symptoms
covid$covid_physs <-covid$Covid_child_fever.TC + covid$Covid_child_cough.TC + covid$Covid_child_short_breath.TC + covid$Covid_child_sore_throat.TC + covid$Covid_child_fatigue.TC + covid$Covid_child_loss_taste_smell.TC + covid$Covid_child_other_symptom.TC
### table 1
## age baseline
t.test(Age_S1.T1 ~ Child_Sex.T1, data = covid, var.equal = T)
## 
##  Two Sample t-test
## 
## data:  Age_S1.T1 by Child_Sex.T1
## t = 3.9542, df = 107, p-value = 0.0001382
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  0.355392 1.069992
## sample estimates:
## mean in group 1 mean in group 2 
##        11.66512        10.95242
# 1 is male; 2 is female
covid %>%
   group_by(Child_Sex.T1) %>%
   summarise(sd = sd(Age_S1.T1))
## `summarise()` ungrouping output (override with `.groups` argument)
## # A tibble: 2 x 2
##   Child_Sex.T1    sd
##          <int> <dbl>
## 1            1 0.914
## 2            2 0.923
## els severity baseline
t.test(sumsev_type_t1 ~ Child_Sex.T1, data = covid, var.equal = T)
## 
##  Two Sample t-test
## 
## data:  sumsev_type_t1 by Child_Sex.T1
## t = -0.28764, df = 107, p-value = 0.7742
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -1.999400  1.492705
## sample estimates:
## mean in group 1 mean in group 2 
##        5.686047        5.939394
# 1 is male; 2 is female
covid %>%
   group_by(Child_Sex.T1) %>%
   summarise(sd = sd(sumsev_type_t1))
## `summarise()` ungrouping output (override with `.groups` argument)
## # A tibble: 2 x 2
##   Child_Sex.T1    sd
##          <int> <dbl>
## 1            1  4.50
## 2            2  4.49
## cdi baseline
# one male participant missing cdi at baseline
t.test(cdi_TOTAL.T1 ~ Child_Sex.T1, data = covid, rm.na = TRUE, var.equal = T)
## 
##  Two Sample t-test
## 
## data:  cdi_TOTAL.T1 by Child_Sex.T1
## t = -2.1506, df = 106, p-value = 0.03378
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -1.63721329 -0.06654342
## sample estimates:
## mean in group 1 mean in group 2 
##        1.255814        2.107692
# 1 is male; 2 is female
covid %>%
   group_by(Child_Sex.T1) %>%
   summarise(sd = sd(cdi_TOTAL.T1, na.rm = TRUE))
## `summarise()` ungrouping output (override with `.groups` argument)
## # A tibble: 2 x 2
##   Child_Sex.T1    sd
##          <int> <dbl>
## 1            1  1.22
## 2            2  2.40
## race
# 1 is white; 2 is black/african american; 3 is hispanic/latin-x; 4 is asian/asian american; 5 is biracial; 6 is other race
race <- data.frame(covid$Child_Sex.T1, covid$KSADS_Child_Race_by_P.T1)
race = table(covid$Child_Sex.T1, covid$KSADS_Child_Race_by_P.T1)
print(race)
##    
##      1  2  3  4  5  6
##   1 20  3  3  7  7  3
##   2 26  1  7 13 15  4
print(chisq.test(race))
## Warning in chisq.test(race): Chi-squared approximation may be incorrect
## 
##  Pearson's Chi-squared test
## 
## data:  race
## X-squared = 3.5389, df = 5, p-value = 0.6175
covid %>% 
  count(KSADS_Child_Race_by_P.T1, Child_Sex.T1, sort = TRUE) %>% 
  arrange(KSADS_Child_Race_by_P.T1, Child_Sex.T1)
##    KSADS_Child_Race_by_P.T1 Child_Sex.T1  n
## 1                         1            1 20
## 2                         1            2 26
## 3                         2            1  3
## 4                         2            2  1
## 5                         3            1  3
## 6                         3            2  7
## 7                         4            1  7
## 8                         4            2 13
## 9                         5            1  7
## 10                        5            2 15
## 11                        6            1  3
## 12                        6            2  4
## parental income
covid_income <-
  covid %>%
  mutate_at(
    vars(Parent_Income.T1
    ),
    funs(
      . %>%
        dplyr::recode(
          "10" = 3,
          "9" = 2,
          "8" = 2,
          "7" = 2,
          "6" = 2,
          "5" = 1,
          "4" = 1,
          "3" = 1,
          "2" = 1,
          "1" = 1,
        )
    )
  )
covid_income <- covid_income %>%
    mutate(Parent_Income.T1 = if_else(is.na(Parent_Income.T1), 0, Parent_Income.T1))
income = table(covid_income$Child_Sex.T1, covid_income$Parent_Income.T1)
print(income)
##    
##      0  1  2  3
##   1  3  1 19 20
##   2  5  3 31 27
print(chisq.test(income))
## Warning in chisq.test(income): Chi-squared approximation may be incorrect
## 
##  Pearson's Chi-squared test
## 
## data:  income
## X-squared = 0.59587, df = 3, p-value = 0.8974
 covid_income %>% 
  count(Parent_Income.T1, Child_Sex.T1, sort = TRUE) %>% 
  arrange(Parent_Income.T1, Child_Sex.T1)
##   Parent_Income.T1 Child_Sex.T1  n
## 1                0            1  3
## 2                0            2  5
## 3                1            1  1
## 4                1            2  3
## 5                2            1 19
## 6                2            2 31
## 7                3            1 20
## 8                3            2 27
## age tc
t.test(Child_Age.TC ~ Child_Sex.T1, data = covid, var.equal = T)
## 
##  Two Sample t-test
## 
## data:  Child_Age.TC by Child_Sex.T1
## t = 3.1595, df = 107, p-value = 0.002055
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  0.3265441 1.4264228
## sample estimates:
## mean in group 1 mean in group 2 
##        16.82860        15.95212
# 1 is male; 2 is female
covid %>%
   group_by(Child_Sex.T1) %>%
   summarise(sd = sd(Child_Age.TC))
## `summarise()` ungrouping output (override with `.groups` argument)
## # A tibble: 2 x 2
##   Child_Sex.T1    sd
##          <int> <dbl>
## 1            1  1.22
## 2            2  1.53
## pss tc
# one participant missing pss at tc
t.test(PSS_total.TC ~ Child_Sex.T1, data = covid, var.equal = T)
## 
##  Two Sample t-test
## 
## data:  PSS_total.TC by Child_Sex.T1
## t = -3.7252, df = 106, p-value = 0.0003148
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -7.047525 -2.151610
## sample estimates:
## mean in group 1 mean in group 2 
##        15.64286        20.24242
# 1 is male; 2 is female
covid %>%
   group_by(Child_Sex.T1) %>%
   summarise(sd = sd(PSS_total.TC, na.rm = TRUE))
## `summarise()` ungrouping output (override with `.groups` argument)
## # A tibble: 2 x 2
##   Child_Sex.T1    sd
##          <int> <dbl>
## 1            1  6.14
## 2            2  6.33
## cesdc tc
# one participant missing pss at tc
t.test(CESDC_total.TC ~ Child_Sex.T1, data = covid, var.equal = T)
## 
##  Two Sample t-test
## 
## data:  CESDC_total.TC by Child_Sex.T1
## t = -3.5573, df = 107, p-value = 0.0005598
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -11.569219  -3.289132
## sample estimates:
## mean in group 1 mean in group 2 
##        16.11628        23.54545
# 1 is male; 2 is female
covid %>%
   group_by(Child_Sex.T1) %>%
   summarise(sd = sd(CESDC_total.TC))
## `summarise()` ungrouping output (override with `.groups` argument)
## # A tibble: 2 x 2
##   Child_Sex.T1    sd
##          <int> <dbl>
## 1            1  9.24
## 2            2 11.5
### sample characteristics 
## race
# 1 is white; 2 is black/african american; 3 is hispanic/latin-x; 4 is asian/asian american; 5 is biracial; 6 is other race
# binarizing race
# covid <-
  covid %>%
  mutate_at(
    vars(KSADS_Child_Race_by_P.T1
    ),
    funs(
      . %>%
        dplyr::recode(
          "1" = 1,
          "2" = 0,
          "3" = 0,
          "4" = 0,
          "5" = 0,
          "6" = 0
        )
    )
  )
##     ELS_ID Child_Sex.T1 Parent_Income.T1 KSADS_Child_Race_by_P.T1 Age_S1.T1
## 1        5            2               NA                        1     11.14
## 2        6            2               NA                        0     13.46
## 3       14            2               10                        1     10.65
## 4       16            2                8                        1     10.08
## 5       17            2                2                        0     10.86
## 6       19            2               NA                        1     11.06
## 7       20            1                6                        0     10.63
## 8       22            1                9                        1     11.18
## 9       23            2                8                        0     11.88
## 10      25            1                6                        0     11.59
## 11      26            2               NA                        1     11.61
## 12      31            2                6                        0     10.49
## 13      33            2               NA                        0     11.49
## 14      34            2                9                        0     11.45
## 15      35            1               10                        0     11.69
## 16      36            2                7                        1     11.15
## 17      37            1               10                        1     13.24
## 18      40            2                7                        0     12.39
## 19      42            1               10                        1     11.83
## 20      43            2               10                        0     11.64
## 21      47            1                9                        1     12.10
## 22      48            1                8                        1     11.23
## 23      53            1                9                        1     10.32
## 24      54            1               10                        0     11.75
## 25      55            2               10                        1     10.73
## 26      58            1               NA                        1     12.08
## 27      59            2                9                        0     10.89
## 28      61            1               10                        0     12.54
## 29      65            2                9                        0     11.70
## 30      67            2               10                        0     10.83
## 31      68            1                7                        1     13.06
## 32      69            2               10                        1     10.47
## 33      72            2                9                        1     10.35
## 34      74            2               10                        0     10.26
## 35      75            2                7                        1     11.36
## 36      77            2               10                        1     13.39
## 37      78            1               NA                        0     10.87
## 38      79            2               10                        1     11.84
## 39      81            1               10                        0     11.20
## 40      84            2                5                        0     10.20
## 41      85            1                9                        0     11.81
## 42      86            2               10                        1     12.41
## 43      87            1                9                        1     11.05
## 44      88            2               10                        1     12.01
## 45      96            1               10                        0     13.65
## 46      99            2               10                        1     11.32
## 47     100            2               10                        0     12.14
## 48     101            1               10                        0     11.66
## 49     102            1               10                        1     13.08
## 50     103            2                9                        1     12.48
## 51     106            2                9                        1     11.20
## 52     108            1                5                        0     11.52
## 53     109            1               10                        0     12.53
## 54     111            1               10                        0     10.60
## 55     112            1               NA                        0     11.23
## 56     121            2               10                        0     11.58
## 57     123            1                9                        1     11.08
## 58     124            2                9                        1     10.11
## 59     125            2               10                        0     10.23
## 60     127            2                4                        0     11.27
## 61     128            1               10                        1     11.89
## 62     132            2                9                        0     10.76
## 63     134            1                9                        0     12.01
## 64     136            1               10                        1     11.00
## 65     139            1               10                        0     11.56
## 66     140            1               10                        0     12.38
## 67     142            1               10                        1     10.23
## 68     143            1                9                        0     11.15
## 69     144            2                9                        1     10.01
## 70     145            2                9                        0      9.58
## 71     147            2                9                        1     10.15
## 72     152            2                8                        0      9.47
## 73     153            2               10                        0      9.97
## 74     155            1               10                        1     11.13
## 75     157            1                8                        0     11.91
## 76     159            2               10                        1      9.50
## 77     162            2               10                        1      9.11
## 78     163            2                9                        0     10.93
## 79     164            2                8                        0     10.07
## 80     166            1                9                        0     11.14
## 81     168            2                9                        0     10.38
## 82     169            2                9                        0     10.90
## 83     170            2               10                        1     11.70
## 84     172            2               10                        0     10.43
## 85     173            1                9                        0     12.18
## 86     178            1                9                        1     12.76
## 87     179            1               10                        1     12.77
## 88     180            2                9                        1     10.60
## 89     182            1               10                        1     11.01
## 90     183            2               10                        0     10.07
## 91     186            1                9                        1     13.72
## 92     187            2               10                        0     12.70
## 93     188            2               10                        0     11.23
## 94     189            1                8                        1     10.96
## 95     196            2                9                        0     10.48
## 96     199            2                8                        0     10.72
## 97     202            2                8                        0     10.54
## 98     206            1                7                        0     10.18
## 99     207            2                6                        0     11.90
## 100    208            2               10                        0     11.49
## 101    215            1               10                        0     10.10
## 102    300            2                6                        0      9.44
## 103    302            2                9                        0     11.53
## 104    305            2               10                        0     11.11
## 105    307            2               10                        0     10.15
## 106    312            2                9                        1     10.04
## 107    314            2                8                        0      9.79
## 108    315            2               10                        1     11.39
## 109    318            2               10                        0     10.60
##     cdi_TOTAL.T1 sumsev_type_t1 Child_Age.TC PSS_total.TC CESDC_total.TC
## 1             10           11.5        17.68           18             12
## 2              0           14.5        19.98           25             38
## 3              3           11.5        17.05           34             51
## 4              0            2.5        16.42           33             50
## 5              1            5.0        17.11           23             18
## 6              4            8.5        17.30           29             41
## 7              1            8.0        16.88           32             34
## 8              0            4.0        17.39           13             10
## 9              1            1.0        18.08           23             34
## 10             0           16.5        17.79           25             25
## 11             0            6.5        17.72           20             13
## 12             1            6.0        16.67           21             41
## 13             2            3.0        17.43            1              4
## 14             2            4.5        17.55           24             29
## 15             2            1.5        17.76           11             14
## 16             2            4.5        17.23           26             33
## 17             2            4.5        19.34           16             18
## 18             1           19.0        18.39           28             33
## 19             2            6.5        17.81           10              5
## 20             5           20.0        17.64           19             28
## 21             0            1.0        18.03           18             16
## 22             1            2.0        17.14           NA             25
## 23             3            5.0        16.21           14             11
## 24             0            7.5        17.63           11             10
## 25             0            1.0        16.62           13             18
## 26             1            0.5        17.93           17             21
## 27             0            2.5        16.73           25             13
## 28             1            5.5        18.35           18             30
## 29             2           12.0        17.50           24             27
## 30             3            7.5        16.62           30             45
## 31             2           15.5        18.84           17             24
## 32             0            0.0        16.21           12              8
## 33             0            1.5        16.03           25             22
## 34             1            2.0        15.94           20             22
## 35             2            2.0        17.02           13             12
## 36             1            8.5        19.03           20             13
## 37             2            2.5        16.51           20             32
## 38             0            3.0        17.46           19             19
## 39             1            3.0        16.77           17             18
## 40             4            8.0        15.75           20             37
## 41             4            4.5        17.35           23             26
## 42            NA            8.0        17.93           22             17
## 43             5            3.5        16.55           14             15
## 44             3            2.0        17.53           24             43
## 45             2            7.5        19.05           12             13
## 46             0           11.0        16.66           27             38
## 47             1            0.5        17.47           10             19
## 48             0            3.0        16.93           14              5
## 49             3            7.0        18.35           20             29
## 50             1            6.0        17.72           23             25
## 51             5           10.5        16.33           24             26
## 52             0            8.5        16.65           17              9
## 53             1            1.5        17.63           19             36
## 54             0            6.5        15.69            9              7
## 55             0            1.0        16.30            7              5
## 56             5            9.0        16.57           32             41
## 57             1            1.0        15.91            7              9
## 58             1            3.5        15.04           11             10
## 59             3            6.0        15.12           22             25
## 60             0            2.0        16.10           12             12
## 61             3            3.0        16.75           21             27
## 62            10            5.5        15.50           24             37
## 63             2           13.5        16.73           14             19
## 64             1            6.5        15.76           17             12
## 65             0            6.0        16.26            8             13
## 66             2            4.0        17.08           16             16
## 67             0            9.0        14.93           15             21
## 68             1            4.5        15.83           12             12
## 69             2            1.5        14.70           23             30
## 70             2            6.0        14.25           19             27
## 71             2            2.0        14.82           20             32
## 72             1            4.0        14.14           26             14
## 73             1            3.0        14.61           18             23
## 74             0            1.0        15.75           13             12
## 75             1            6.5        16.54           25             24
## 76             2            6.0        14.09           25             22
## 77             3           12.0        13.67           22             33
## 78             0            0.0        15.50           10              7
## 79             2            5.0        14.67           11             10
## 80             1            2.0        15.68           13              3
## 81             3            1.5        14.89           20             22
## 82             1            3.5        15.43           21             42
## 83             9            5.0        16.21           24             25
## 84             0            8.0        14.92           26             29
## 85             2            5.5        16.65           17              5
## 86             0            5.5        17.17            6              5
## 87             3            8.5        17.16           18             12
## 88             1            3.5        15.00           18             16
## 89             1            2.0        15.41            9              9
## 90             1            4.0        14.44           19             20
## 91             0           15.5        18.05           23             18
## 92             1            7.5        17.02           23             17
## 93             0            1.5        15.54           14              7
## 94             1            1.5        15.26           16              0
## 95             1            9.5        14.62           18             19
## 96             2           13.0        14.75           14             10
## 97             9           12.0        14.41           16             10
## 98             2           19.0        14.01           30             29
## 99             5            8.5        15.69           23             16
## 100            1            2.0        15.31           17             18
## 101            0            3.5        13.82            3              9
## 102            1           10.0        13.28           16             17
## 103            1            2.5        15.25           23             23
## 104            0            0.0        14.60            9             12
## 105            2            1.0        13.60           25             22
## 106            1           10.5        13.37           17             25
## 107            5            8.0        12.82           10             24
## 108            4            9.0        14.49           22             23
## 109            0            2.0        13.62           11              5
##     Covid_child_fever.TC Covid_child_cough.TC Covid_child_short_breath.TC
## 1                      0                    0                           0
## 2                      0                    0                           0
## 3                      1                    0                           0
## 4                      0                    0                           0
## 5                      0                    0                           0
## 6                      0                    0                           0
## 7                      0                    0                           0
## 8                      0                    0                           0
## 9                      0                    0                           0
## 10                     0                    0                           0
## 11                     0                    0                           0
## 12                     0                    0                           0
## 13                     0                    0                           0
## 14                     0                    0                           0
## 15                     0                    0                           0
## 16                     0                    0                           0
## 17                     0                    0                           0
## 18                     0                    0                           0
## 19                     0                    0                           0
## 20                     0                    0                           0
## 21                     0                    0                           0
## 22                     0                    0                           0
## 23                     0                    0                           0
## 24                     0                    0                           0
## 25                     0                    0                           0
## 26                     0                    0                           0
## 27                     0                    0                           0
## 28                     0                    0                           0
## 29                     1                    1                           0
## 30                     0                    0                           0
## 31                     0                    0                           0
## 32                     0                    0                           0
## 33                     0                    1                           1
## 34                     0                    0                           0
## 35                     0                    0                           0
## 36                     0                    0                           0
## 37                     0                    0                           0
## 38                     0                    0                           0
## 39                     0                    0                           0
## 40                     0                    0                           0
## 41                     0                    0                           0
## 42                     0                    0                           0
## 43                     0                    1                           0
## 44                     0                    0                           0
## 45                     0                    0                           0
## 46                     0                    1                           0
## 47                     0                    0                           0
## 48                     0                    0                           0
## 49                     1                    0                           0
## 50                     0                    0                           0
## 51                     0                    0                           0
## 52                     0                    0                           0
## 53                     0                    0                           0
## 54                     0                    0                           0
## 55                     0                    0                           0
## 56                     0                    0                           0
## 57                     0                    0                           0
## 58                     0                    0                           0
## 59                     0                    0                           1
## 60                     0                    0                           0
## 61                     0                    1                           0
## 62                     0                    1                           0
## 63                     0                    0                           0
## 64                     0                    0                           0
## 65                     0                    0                           0
## 66                     0                    0                           0
## 67                     0                    0                           0
## 68                     0                    0                           0
## 69                     0                    0                           0
## 70                     0                    0                           0
## 71                     0                    0                           0
## 72                     0                    0                           0
## 73                     0                    0                           0
## 74                     0                    0                           0
## 75                     0                    0                           0
## 76                     0                    1                           0
## 77                     0                    0                           0
## 78                     0                    0                           0
## 79                     0                    0                           0
## 80                     0                    0                           0
## 81                     0                    0                           0
## 82                     0                    0                           0
## 83                     0                    0                           0
## 84                     1                    1                           1
## 85                     0                    0                           0
## 86                     0                    0                           0
## 87                     0                    0                           0
## 88                     0                    0                           0
## 89                     0                    0                           0
## 90                     0                    0                           0
## 91                     0                    0                           0
## 92                     0                    0                           0
## 93                     0                    0                           0
## 94                     0                    0                           0
## 95                     0                    0                           0
## 96                     0                    0                           0
## 97                     0                    0                           0
## 98                     0                    0                           0
## 99                     0                    0                           0
## 100                    0                    1                           0
## 101                    0                    0                           0
## 102                    0                    0                           0
## 103                    0                    0                           0
## 104                    0                    0                           0
## 105                    0                    0                           0
## 106                    0                    0                           0
## 107                    0                    0                           0
## 108                    0                    1                           0
## 109                    0                    0                           0
##     Covid_child_sore_throat.TC Covid_child_fatigue.TC
## 1                            0                      0
## 2                            0                      0
## 3                            0                      1
## 4                            1                      1
## 5                            0                      0
## 6                            0                      1
## 7                            0                      0
## 8                            0                      0
## 9                            0                      1
## 10                           0                      0
## 11                           0                      0
## 12                           0                      0
## 13                           0                      0
## 14                           0                      0
## 15                           0                      0
## 16                           0                      1
## 17                           0                      0
## 18                           0                      0
## 19                           0                      0
## 20                           0                      0
## 21                           0                      0
## 22                           0                      0
## 23                           0                      1
## 24                           0                      0
## 25                           0                      0
## 26                           0                      0
## 27                           0                      0
## 28                           0                      0
## 29                           1                      1
## 30                           0                      0
## 31                           0                      0
## 32                           0                      0
## 33                           1                      0
## 34                           0                      0
## 35                           0                      0
## 36                           0                      0
## 37                           0                      0
## 38                           0                      0
## 39                           0                      0
## 40                           0                      0
## 41                           0                      0
## 42                           1                      0
## 43                           0                      0
## 44                           0                      1
## 45                           0                      0
## 46                           1                      1
## 47                           0                      0
## 48                           0                      0
## 49                           0                      0
## 50                           1                      0
## 51                           0                      0
## 52                           0                      0
## 53                           0                      0
## 54                           0                      0
## 55                           0                      0
## 56                           0                      1
## 57                           0                      0
## 58                           0                      0
## 59                           0                      0
## 60                           0                      0
## 61                           0                      1
## 62                           0                      0
## 63                           0                      0
## 64                           0                      0
## 65                           0                      1
## 66                           0                      0
## 67                           0                      0
## 68                           0                      0
## 69                           0                      1
## 70                           0                      0
## 71                           0                      1
## 72                           0                      0
## 73                           0                      0
## 74                           0                      0
## 75                           0                      0
## 76                           0                      1
## 77                           1                      0
## 78                           0                      0
## 79                           0                      0
## 80                           0                      0
## 81                           0                      0
## 82                           0                      0
## 83                           0                      0
## 84                           0                      1
## 85                           0                      0
## 86                           0                      0
## 87                           1                      0
## 88                           0                      0
## 89                           0                      0
## 90                           1                      1
## 91                           0                      0
## 92                           0                      0
## 93                           0                      0
## 94                           0                      0
## 95                           0                      0
## 96                           0                      0
## 97                           0                      0
## 98                           0                      0
## 99                           0                      0
## 100                          0                      1
## 101                          0                      0
## 102                          0                      0
## 103                          0                      0
## 104                          0                      0
## 105                          0                      1
## 106                          0                      0
## 107                          0                      0
## 108                          0                      0
## 109                          0                      0
##     Covid_child_loss_taste_smell.TC Covid_child_other_symptom.TC
## 1                                 0                            0
## 2                                 0                            0
## 3                                 0                            0
## 4                                 0                            0
## 5                                 0                            0
## 6                                 0                            0
## 7                                 0                            0
## 8                                 0                            0
## 9                                 0                            0
## 10                                0                            0
## 11                                0                            0
## 12                                0                            0
## 13                                0                            0
## 14                                0                            0
## 15                                0                            0
## 16                                0                            0
## 17                                0                            0
## 18                                0                            0
## 19                                0                            0
## 20                                0                            0
## 21                                0                            0
## 22                                0                            0
## 23                                0                            0
## 24                                0                            0
## 25                                0                            0
## 26                                0                            0
## 27                                0                            0
## 28                                0                            0
## 29                                0                            0
## 30                                0                            0
## 31                                0                            0
## 32                                0                            0
## 33                                0                            0
## 34                                0                            0
## 35                                0                            0
## 36                                0                            0
## 37                                0                            0
## 38                                0                            0
## 39                                0                            0
## 40                                0                            0
## 41                                0                            0
## 42                                0                            0
## 43                                0                            0
## 44                                0                            0
## 45                                0                            0
## 46                                0                            0
## 47                                0                            0
## 48                                0                            0
## 49                                0                            0
## 50                                0                            0
## 51                                0                            0
## 52                                0                            0
## 53                                0                            0
## 54                                0                            0
## 55                                0                            0
## 56                                0                            0
## 57                                0                            0
## 58                                0                            0
## 59                                0                            0
## 60                                0                            0
## 61                                0                            0
## 62                                0                            0
## 63                                0                            0
## 64                                0                            0
## 65                                0                            0
## 66                                0                            0
## 67                                1                            0
## 68                                0                            0
## 69                                0                            0
## 70                                0                            0
## 71                                0                            0
## 72                                0                            0
## 73                                0                            0
## 74                                0                            0
## 75                                0                            0
## 76                                0                            0
## 77                                0                            0
## 78                                0                            0
## 79                                0                            0
## 80                                0                            0
## 81                                0                            0
## 82                                0                            0
## 83                                0                            0
## 84                                0                            0
## 85                                0                            0
## 86                                0                            0
## 87                                0                            0
## 88                                0                            0
## 89                                0                            0
## 90                                0                            0
## 91                                0                            0
## 92                                0                            0
## 93                                0                            0
## 94                                0                            0
## 95                                0                            0
## 96                                0                            0
## 97                                0                            0
## 98                                0                            0
## 99                                0                            0
## 100                               0                            0
## 101                               0                            0
## 102                               0                            0
## 103                               0                            0
## 104                               0                            0
## 105                               0                            0
## 106                               0                            0
## 107                               0                            0
## 108                               0                            0
## 109                               0                            0
##     Worry_self_infected.TC Worry_fam_infected.TC Self_phys_health_influence.TC
## 1                        2                     3                             2
## 2                        4                     4                             4
## 3                        4                     4                             2
## 4                        1                     1                             1
## 5                        3                     5                             3
## 6                        3                     4                             3
## 7                        1                     2                             3
## 8                        2                     2                             2
## 9                        4                     1                             2
## 10                       4                     4                             3
## 11                       3                     2                             3
## 12                       2                     3                             2
## 13                       2                     2                             2
## 14                       2                     3                             3
## 15                       2                     3                             1
## 16                       1                     2                             1
## 17                       3                     5                             3
## 18                       3                     4                             3
## 19                       2                     1                             4
## 20                       2                     2                             1
## 21                       2                     4                             2
## 22                       2                     2                             3
## 23                       2                     3                             1
## 24                       2                     3                             3
## 25                       3                     2                             3
## 26                       3                     3                             3
## 27                       1                     2                             1
## 28                       2                     2                             2
## 29                       4                     4                             4
## 30                       3                     2                             1
## 31                       1                     3                             1
## 32                       2                     2                             1
## 33                       3                     4                             3
## 34                       1                     2                             1
## 35                       1                     1                             1
## 36                       2                     3                             2
## 37                       2                     3                             2
## 38                       1                     3                             1
## 39                       3                     2                             2
## 40                       2                     2                             3
## 41                       3                     4                             3
## 42                       2                     1                             4
## 43                       3                     3                             2
## 44                       2                     3                             2
## 45                       1                     1                             1
## 46                       1                     1                             1
## 47                       2                     3                             2
## 48                       1                     1                             1
## 49                       4                     4                             1
## 50                       2                     3                             1
## 51                       2                     3                             2
## 52                       1                     1                             1
## 53                       2                     2                             2
## 54                       1                     2                             2
## 55                       1                     1                             1
## 56                       4                     5                             3
## 57                       2                     3                             2
## 58                       1                     2                             2
## 59                       2                     2                             3
## 60                       2                     4                             4
## 61                       2                     2                             3
## 62                       2                     2                             2
## 63                       1                     2                             2
## 64                       2                     3                             2
## 65                       3                     4                             4
## 66                       2                     2                             2
## 67                       2                     5                             3
## 68                       3                     3                             2
## 69                       3                     3                             4
## 70                       2                     3                             2
## 71                       3                     3                             2
## 72                       1                     2                             1
## 73                       3                     3                             1
## 74                       1                     1                             1
## 75                       1                     2                             1
## 76                       4                     4                             2
## 77                       2                     3                             3
## 78                       3                     2                             1
## 79                       4                     4                             3
## 80                       3                     3                             2
## 81                       2                     4                             2
## 82                       1                     3                             1
## 83                       1                     2                             5
## 84                       3                     5                             5
## 85                       2                     3                             2
## 86                       2                     2                             1
## 87                       2                     3                             3
## 88                       1                     3                             3
## 89                       3                     3                             3
## 90                       3                     4                             2
## 91                       1                     1                             1
## 92                       2                     3                             2
## 93                       1                     1                             1
## 94                       1                     1                             1
## 95                       2                     1                             2
## 96                       1                     1                             1
## 97                       2                     3                             2
## 98                       2                     3                             1
## 99                       4                     5                             1
## 100                      3                     4                             1
## 101                      1                     2                             1
## 102                      4                     4                             4
## 103                      3                     4                             5
## 104                      2                     3                             1
## 105                      2                     2                             4
## 106                      1                     1                             3
## 107                      2                     5                             1
## 108                      2                     2                             3
## 109                      2                     2                             1
##     Self_mental_health_influence.TC Read_talk_virus.TC
## 1                                 3                  4
## 2                                 4                  3
## 3                                 5                  5
## 4                                 4                  4
## 5                                 4                  4
## 6                                 4                  5
## 7                                 4                  2
## 8                                 1                  4
## 9                                 4                  4
## 10                                5                  5
## 11                                3                  3
## 12                                4                  3
## 13                                1                  2
## 14                                2                  4
## 15                                2                  4
## 16                                3                  2
## 17                                3                  3
## 18                                5                  3
## 19                                1                  3
## 20                                1                  3
## 21                                4                  5
## 22                                3                  3
## 23                                1                  2
## 24                                2                  4
## 25                                3                  4
## 26                                4                  5
## 27                                1                  3
## 28                                3                  4
## 29                                3                  4
## 30                                5                  4
## 31                                1                  4
## 32                                1                  3
## 33                                3                  4
## 34                                2                  3
## 35                                1                  3
## 36                                2                  4
## 37                                3                  2
## 38                                3                  4
## 39                                3                  3
## 40                                3                  2
## 41                                3                  5
## 42                                2                  4
## 43                                1                  4
## 44                                4                  3
## 45                                1                  1
## 46                                5                  4
## 47                                3                  4
## 48                                1                  3
## 49                                1                  4
## 50                                3                  4
## 51                                3                  3
## 52                                1                  3
## 53                                2                  2
## 54                                3                  4
## 55                                1                  3
## 56                                5                  5
## 57                                1                  2
## 58                                2                  3
## 59                                3                  3
## 60                                3                  4
## 61                                4                  4
## 62                                4                  3
## 63                                2                  2
## 64                                1                  3
## 65                                3                  4
## 66                                2                  4
## 67                                4                  3
## 68                                1                  4
## 69                                4                  4
## 70                                3                  3
## 71                                3                  4
## 72                                2                  2
## 73                                3                  3
## 74                                2                  4
## 75                                3                  3
## 76                                3                  3
## 77                                3                  2
## 78                                1                  3
## 79                                3                  3
## 80                                2                  4
## 81                                3                  3
## 82                                3                  3
## 83                                2                  3
## 84                                2                  2
## 85                                2                  2
## 86                                2                  4
## 87                                1                  3
## 88                                1                  3
## 89                                3                  4
## 90                                4                  3
## 91                                1                  3
## 92                                2                  2
## 93                                1                  5
## 94                                1                  3
## 95                                1                  3
## 96                                1                  2
## 97                                1                  2
## 98                                1                  3
## 99                                1                  4
## 100                               3                  4
## 101                               1                  3
## 102                               3                  2
## 103                               3                  3
## 104                               2                  3
## 105                               4                  4
## 106                               3                  4
## 107                               2                  4
## 108                               4                  4
## 109                               2                  4
##     Covid_positive_changes.TC Stress_of_restrictions.TC
## 1                           2                         3
## 2                           2                         2
## 3                           1                         5
## 4                           1                         5
## 5                           1                         4
## 6                           2                         4
## 7                           1                         4
## 8                           3                         3
## 9                           3                         4
## 10                          3                         5
## 11                          2                         2
## 12                          1                         3
## 13                          3                         1
## 14                          2                         1
## 15                          2                         3
## 16                          3                         3
## 17                          3                         2
## 18                          1                         3
## 19                          3                         2
## 20                          1                         1
## 21                          2                         3
## 22                          2                         4
## 23                          2                         1
## 24                          3                         1
## 25                          2                         3
## 26                          2                         4
## 27                          1                         3
## 28                          1                         5
## 29                          2                         5
## 30                          2                         4
## 31                          2                         3
## 32                          3                         3
## 33                          2                         3
## 34                          3                         2
## 35                          1                         2
## 36                          2                         2
## 37                          3                         1
## 38                          2                         2
## 39                          2                         4
## 40                          1                         3
## 41                          3                         3
## 42                          3                         3
## 43                          2                         3
## 44                          2                         3
## 45                          1                         2
## 46                          1                         4
## 47                          2                         2
## 48                          3                         1
## 49                          2                         3
## 50                          1                         3
## 51                          2                         4
## 52                          3                         1
## 53                          1                         2
## 54                          2                         2
## 55                          1                         1
## 56                          2                         5
## 57                          1                         2
## 58                          1                         3
## 59                          3                         3
## 60                          3                         2
## 61                          2                         3
## 62                          2                         4
## 63                          1                         2
## 64                          3                         2
## 65                          2                         2
## 66                          2                         2
## 67                          3                         3
## 68                          3                         3
## 69                          2                         3
## 70                          3                         3
## 71                          1                         4
## 72                          1                         2
## 73                          2                         2
## 74                          2                         1
## 75                          2                         3
## 76                          1                         5
## 77                          1                         3
## 78                          3                         2
## 79                          2                         2
## 80                          3                         2
## 81                          2                         2
## 82                          2                         1
## 83                          1                         3
## 84                          2                         4
## 85                          3                         2
## 86                          2                         2
## 87                          2                         2
## 88                          3                         1
## 89                          3                         1
## 90                          2                         4
## 91                          1                         1
## 92                          2                         2
## 93                          3                         2
## 94                          1                         1
## 95                          1                         3
## 96                          2                         2
## 97                          2                         1
## 98                          2                         4
## 99                          2                         1
## 100                         3                         3
## 101                         2                         2
## 102                         3                         2
## 103                         2                         3
## 104                         2                         2
## 105                         2                         3
## 106                         1                         2
## 107                         2                         2
## 108                         2                         3
## 109                         2                         3
##     Contacts_outside_change.TC Diff_following_contact_rules.TC
## 1                            1                               2
## 2                            2                               2
## 3                            4                               5
## 4                            5                               2
## 5                            4                               1
## 6                            5                               3
## 7                            4                               2
## 8                            2                               4
## 9                            5                               3
## 10                           2                               4
## 11                           1                               3
## 12                           1                               2
## 13                           3                               1
## 14                           2                               1
## 15                           1                               2
## 16                           5                               2
## 17                           4                               2
## 18                           4                               3
## 19                           1                               2
## 20                           3                               3
## 21                           1                               1
## 22                           1                               2
## 23                           3                               1
## 24                           2                               2
## 25                           5                               2
## 26                           1                               1
## 27                           1                               2
## 28                           1                               2
## 29                           1                               2
## 30                           1                               3
## 31                           1                               4
## 32                           2                               2
## 33                           4                               2
## 34                           3                               3
## 35                           1                               2
## 36                           1                               1
## 37                           2                               1
## 38                           2                               2
## 39                           1                               3
## 40                           1                               1
## 41                           3                               4
## 42                           1                               4
## 43                           1                               2
## 44                           1                               1
## 45                           3                               2
## 46                           3                               1
## 47                           1                               3
## 48                           3                               1
## 49                           1                               1
## 50                           2                               2
## 51                           5                               4
## 52                           3                               1
## 53                           3                               4
## 54                           3                               3
## 55                           3                               1
## 56                           1                               4
## 57                           4                               1
## 58                           4                               3
## 59                           1                               2
## 60                           1                               2
## 61                           1                               2
## 62                           2                               2
## 63                           2                               1
## 64                           2                               2
## 65                           5                               1
## 66                           3                               2
## 67                           3                               2
## 68                           5                               2
## 69                           2                               2
## 70                           5                               1
## 71                           2                               5
## 72                           5                               2
## 73                           1                               2
## 74                           1                               2
## 75                           4                               2
## 76                           5                               4
## 77                           5                               2
## 78                           3                               3
## 79                           3                               2
## 80                           1                               1
## 81                           4                               2
## 82                           5                               3
## 83                           2                               2
## 84                           3                               4
## 85                           4                               1
## 86                           3                               4
## 87                           2                               1
## 88                           4                               1
## 89                           1                               2
## 90                           4                               2
## 91                           1                               4
## 92                           2                               3
## 93                           5                               3
## 94                           3                               1
## 95                           1                               4
## 96                           4                               4
## 97                           3                               1
## 98                           2                               2
## 99                           2                               1
## 100                          2                               1
## 101                          1                               2
## 102                          3                               1
## 103                          5                               3
## 104                          2                               1
## 105                          1                               2
## 106                          5                               2
## 107                          4                               2
## 108                          4                               1
## 109                          1                               1
##     Quality_relations_family_change.TC Stress_relations_family_change.TC
## 1                                    2                                 3
## 2                                    4                                 4
## 3                                    2                                 5
## 4                                    2                                 4
## 5                                    3                                 1
## 6                                    2                                 3
## 7                                    2                                 4
## 8                                    3                                 1
## 9                                    4                                 1
## 10                                   4                                 1
## 11                                   2                                 4
## 12                                   3                                 2
## 13                                   3                                 1
## 14                                   3                                 2
## 15                                   3                                 1
## 16                                   3                                 3
## 17                                   5                                 1
## 18                                   4                                 3
## 19                                   3                                 1
## 20                                   3                                 1
## 21                                   3                                 2
## 22                                   3                                 4
## 23                                   4                                 3
## 24                                   2                                 2
## 25                                   3                                 2
## 26                                   3                                 2
## 27                                   3                                 2
## 28                                   2                                 4
## 29                                   2                                 3
## 30                                   3                                 3
## 31                                   3                                 1
## 32                                   4                                 1
## 33                                   3                                 2
## 34                                   2                                 3
## 35                                   3                                 1
## 36                                   4                                 2
## 37                                   2                                 3
## 38                                   3                                 2
## 39                                   2                                 3
## 40                                   2                                 2
## 41                                   3                                 3
## 42                                   4                                 1
## 43                                   3                                 3
## 44                                   2                                 3
## 45                                   3                                 1
## 46                                   2                                 4
## 47                                   5                                 1
## 48                                   3                                 1
## 49                                   2                                 3
## 50                                   3                                 2
## 51                                   3                                 2
## 52                                   3                                 1
## 53                                   5                                 3
## 54                                   3                                 1
## 55                                   3                                 1
## 56                                   2                                 4
## 57                                   3                                 2
## 58                                   4                                 1
## 59                                   3                                 3
## 60                                   4                                 2
## 61                                   2                                 2
## 62                                   2                                 3
## 63                                   3                                 2
## 64                                   4                                 2
## 65                                   3                                 1
## 66                                   4                                 1
## 67                                   2                                 2
## 68                                   3                                 3
## 69                                   3                                 3
## 70                                   2                                 3
## 71                                   4                                 4
## 72                                   3                                 3
## 73                                   4                                 1
## 74                                   3                                 1
## 75                                   3                                 2
## 76                                   3                                 4
## 77                                   1                                 4
## 78                                   4                                 2
## 79                                   3                                 2
## 80                                   3                                 2
## 81                                   3                                 2
## 82                                   5                                 2
## 83                                   3                                 1
## 84                                   2                                 3
## 85                                   3                                 1
## 86                                   3                                 1
## 87                                   3                                 1
## 88                                   3                                 2
## 89                                   3                                 1
## 90                                   4                                 3
## 91                                   3                                 1
## 92                                   4                                 1
## 93                                   3                                 1
## 94                                   3                                 1
## 95                                   3                                 1
## 96                                   3                                 3
## 97                                   4                                 2
## 98                                   3                                 3
## 99                                   2                                 2
## 100                                  4                                 1
## 101                                  3                                 2
## 102                                  3                                 1
## 103                                  3                                 4
## 104                                  2                                 2
## 105                                  2                                 2
## 106                                  3                                 2
## 107                                  3                                 1
## 108                                  3                                 1
## 109                                  3                                 2
##     Quality_relations_friends_change.TC Stress_relations_friends_change.TC
## 1                                     3                                  3
## 2                                     3                                  3
## 3                                     4                                  2
## 4                                     2                                  4
## 5                                     3                                  1
## 6                                     4                                  3
## 7                                     3                                  5
## 8                                     3                                  3
## 9                                     1                                  5
## 10                                    2                                  4
## 11                                    3                                  2
## 12                                    2                                  4
## 13                                    2                                  1
## 14                                    2                                  2
## 15                                    2                                  2
## 16                                    4                                  3
## 17                                    4                                  2
## 18                                    2                                  4
## 19                                    2                                  2
## 20                                    3                                  1
## 21                                    3                                  4
## 22                                    2                                  4
## 23                                    3                                  2
## 24                                    4                                  1
## 25                                    3                                  2
## 26                                    2                                  4
## 27                                    3                                  2
## 28                                    3                                  3
## 29                                    2                                  4
## 30                                    3                                  4
## 31                                    2                                  2
## 32                                    3                                  1
## 33                                    4                                  1
## 34                                    3                                  2
## 35                                    3                                  1
## 36                                    4                                  2
## 37                                    3                                  3
## 38                                    3                                  3
## 39                                    2                                  4
## 40                                    1                                  3
## 41                                    3                                  3
## 42                                    2                                  3
## 43                                    3                                  2
## 44                                    2                                  2
## 45                                    3                                  2
## 46                                    3                                  4
## 47                                    2                                  3
## 48                                    3                                  1
## 49                                    2                                  4
## 50                                    3                                  2
## 51                                    3                                  4
## 52                                    3                                  1
## 53                                    2                                  4
## 54                                    3                                  2
## 55                                    3                                  1
## 56                                    2                                  4
## 57                                    4                                  1
## 58                                    3                                  3
## 59                                    4                                  3
## 60                                    2                                  3
## 61                                    3                                  1
## 62                                    3                                  2
## 63                                    3                                  1
## 64                                    4                                  2
## 65                                    3                                  2
## 66                                    3                                  2
## 67                                    2                                  4
## 68                                    2                                  3
## 69                                    2                                  4
## 70                                    2                                  4
## 71                                    3                                  5
## 72                                    3                                  3
## 73                                    3                                  1
## 74                                    2                                  2
## 75                                    2                                  3
## 76                                    3                                  4
## 77                                    3                                  2
## 78                                    4                                  3
## 79                                    2                                  2
## 80                                    3                                  2
## 81                                    2                                  2
## 82                                    2                                  2
## 83                                    3                                  2
## 84                                    2                                  4
## 85                                    3                                  2
## 86                                    3                                  2
## 87                                    3                                  3
## 88                                    4                                  4
## 89                                    2                                  2
## 90                                    3                                  3
## 91                                    2                                  5
## 92                                    3                                  3
## 93                                    3                                  1
## 94                                    3                                  1
## 95                                    2                                  3
## 96                                    3                                  3
## 97                                    3                                  1
## 98                                    3                                  4
## 99                                    5                                  1
## 100                                   3                                  4
## 101                                   3                                  2
## 102                                   2                                  3
## 103                                   2                                  4
## 104                                   3                                  1
## 105                                   1                                  3
## 106                                   3                                  3
## 107                                   1                                  3
## 108                                   3                                  2
## 109                                   3                                  3
##     Cancelling_events_difficulty.TC Family_financial_problems.TC
## 1                                 4                            3
## 2                                 4                            2
## 3                                 4                            3
## 4                                 4                            2
## 5                                 2                            2
## 6                                 3                            3
## 7                                 3                            4
## 8                                 4                            2
## 9                                 5                            4
## 10                                5                            2
## 11                                3                            1
## 12                                3                            1
## 13                                2                            1
## 14                                1                            2
## 15                                3                            2
## 16                                4                            2
## 17                                2                            1
## 18                                5                            4
## 19                                3                            1
## 20                                2                            3
## 21                                1                            1
## 22                                3                            2
## 23                                3                            1
## 24                                2                            1
## 25                                4                            1
## 26                                4                            1
## 27                                3                            1
## 28                                2                            2
## 29                                5                            5
## 30                                3                            2
## 31                                3                            1
## 32                                2                            1
## 33                                4                            3
## 34                                4                            2
## 35                                2                            1
## 36                                3                            1
## 37                                2                            1
## 38                                3                            1
## 39                                3                            1
## 40                                5                            1
## 41                                3                            3
## 42                                4                            2
## 43                                3                            2
## 44                                2                            1
## 45                                1                            3
## 46                                5                            2
## 47                                4                            2
## 48                                2                            1
## 49                                1                            3
## 50                                5                            2
## 51                                2                            2
## 52                                1                            2
## 53                                2                            4
## 54                                4                            1
## 55                                1                            1
## 56                                4                            2
## 57                                1                            2
## 58                                3                            2
## 59                                5                            1
## 60                                3                            4
## 61                                4                            2
## 62                                2                            1
## 63                                2                            1
## 64                                3                            1
## 65                                1                            1
## 66                                2                            1
## 67                                3                            1
## 68                                4                            4
## 69                                4                            1
## 70                                3                            3
## 71                                5                            3
## 72                                5                            3
## 73                                2                            1
## 74                                2                            1
## 75                                2                            1
## 76                                5                            1
## 77                                5                            2
## 78                                5                            3
## 79                                2                            1
## 80                                2                            1
## 81                                3                            1
## 82                                1                            3
## 83                                4                            3
## 84                                3                            3
## 85                                1                            1
## 86                                3                            2
## 87                                2                            1
## 88                                4                            1
## 89                                1                            2
## 90                                3                            1
## 91                                5                            3
## 92                                4                            1
## 93                                1                            3
## 94                                1                            1
## 95                                2                            2
## 96                                4                            1
## 97                                1                            1
## 98                                3                            1
## 99                                4                            4
## 100                               2                            2
## 101                               4                            1
## 102                               5                            1
## 103                               5                            1
## 104                               2                            1
## 105                               3                            1
## 106                               4                            1
## 107                               2                            2
## 108                               2                            1
## 109                               2                            1
##     Worry_living_stability.TC Hope_crisis_end.TC Worried_2weeks.TC
## 1                           2                  3                 3
## 2                           2                  2                 4
## 3                           2                  2                 4
## 4                           3                  2                 3
## 5                           1                  5                 2
## 6                           2                  2                 4
## 7                           5                  3                 4
## 8                           1                  4                 2
## 9                           4                  3                 4
## 10                          3                  3                 4
## 11                          1                  2                 3
## 12                          1                  4                 3
## 13                          1                  2                 2
## 14                          2                  3                 2
## 15                          2                  3                 3
## 16                          1                  3                 3
## 17                          1                  5                 3
## 18                          1                  5                 4
## 19                          1                  4                 1
## 20                          3                  2                 2
## 21                          1                  4                 3
## 22                          2                  4                 2
## 23                          2                  2                 3
## 24                          1                  3                 1
## 25                          1                  4                 3
## 26                          2                  3                 3
## 27                          1                  4                 3
## 28                          3                  2                 4
## 29                          5                  3                 4
## 30                          1                  2                 4
## 31                          1                  2                 2
## 32                          1                  2                 2
## 33                          1                  5                 3
## 34                          2                  4                 3
## 35                          1                  3                 2
## 36                          1                  2                 2
## 37                          3                  2                 1
## 38                          2                  4                 3
## 39                          1                  2                 2
## 40                          1                  1                 3
## 41                          1                  2                 3
## 42                          2                  1                 3
## 43                          1                  1                 2
## 44                          2                  1                 2
## 45                          1                  3                 1
## 46                          1                  1                 3
## 47                          1                  2                 2
## 48                          1                  2                 2
## 49                          1                  3                 1
## 50                          1                  1                 2
## 51                          2                  5                 2
## 52                          1                  3                 1
## 53                          5                  4                 3
## 54                          1                  2                 1
## 55                          1                  3                 1
## 56                          1                  3                 4
## 57                          1                  4                 1
## 58                          2                  3                 2
## 59                          1                  4                 3
## 60                          3                  3                 2
## 61                          1                  3                 3
## 62                          1                  3                 4
## 63                          2                  3                 2
## 64                          1                  2                 2
## 65                          2                  5                 3
## 66                          2                  3                 2
## 67                          1                  5                 2
## 68                          3                  3                 3
## 69                          2                  4                 2
## 70                          2                  2                 3
## 71                          1                  5                 2
## 72                          1                  3                 2
## 73                          1                  5                 2
## 74                          1                  3                 2
## 75                          2                  3                 2
## 76                          2                  2                 3
## 77                          1                  5                 2
## 78                          3                  3                 3
## 79                          1                  5                 2
## 80                          1                  2                 1
## 81                          2                  4                 2
## 82                          3                  5                 1
## 83                          1                  2                 3
## 84                          2                  5                 3
## 85                          1                  3                 2
## 86                          1                  3                 2
## 87                          1                  2                 3
## 88                          1                  4                 1
## 89                          1                  3                 2
## 90                          1                  4                 4
## 91                          2                  3                 2
## 92                          1                  5                 3
## 93                          1                  1                 1
## 94                          1                  3                 1
## 95                          3                  5                 2
## 96                          1                  5                 1
## 97                          1                  3                 2
## 98                          2                  4                 2
## 99                          1                  3                 1
## 100                         2                  1                 4
## 101                         1                  5                 3
## 102                         1                  3                 1
## 103                         1                  5                 3
## 104                         1                  2                 2
## 105                         1                  3                 2
## 106                         1                  4                 3
## 107                         2                  1                 2
## 108                         1                  3                 1
## 109                         1                  2                 2
##     Happy_sad_2weeks.TC Relaxed_anxious_2weeks.TC Fatigued_tired_2weeks.TC
## 1                     4                         3                        3
## 2                     1                         4                        3
## 3                     1                         5                        4
## 4                     1                         5                        2
## 5                     3                         3                        3
## 6                     2                         5                        3
## 7                     3                         4                        3
## 8                     4                         3                        2
## 9                     2                         3                        3
## 10                    3                         4                        1
## 11                    2                         4                        1
## 12                    2                         3                        2
## 13                    5                         1                        2
## 14                    2                         2                        2
## 15                    4                         3                        2
## 16                    2                         2                        3
## 17                    4                         4                        2
## 18                    1                         4                        3
## 19                    4                         2                        1
## 20                    3                         3                        2
## 21                    3                         3                        2
## 22                    2                         3                        2
## 23                    3                         2                        2
## 24                    5                         1                        2
## 25                    2                         3                        1
## 26                    2                         3                        1
## 27                    3                         4                        3
## 28                    2                         4                        3
## 29                    2                         5                        3
## 30                    2                         4                        5
## 31                    3                         2                        2
## 32                    4                         3                        1
## 33                    3                         4                        2
## 34                    2                         2                        2
## 35                    3                         3                        3
## 36                    4                         3                        1
## 37                    3                         3                        3
## 38                    3                         4                        3
## 39                    3                         3                        2
## 40                    1                         3                        2
## 41                    3                         3                        2
## 42                    3                         3                        2
## 43                    4                         3                        2
## 44                    2                         2                        4
## 45                    4                         2                        3
## 46                    4                         4                        5
## 47                    4                         2                        2
## 48                    4                         1                        1
## 49                    3                         3                        2
## 50                    3                         3                        3
## 51                    2                         3                        3
## 52                    3                         1                        2
## 53                    4                         3                        1
## 54                    4                         2                        2
## 55                    3                         3                        1
## 56                    1                         3                        3
## 57                    4                         2                        1
## 58                    4                         2                        2
## 59                    3                         2                        2
## 60                    3                         3                        2
## 61                    3                         4                        3
## 62                    2                         3                        2
## 63                    4                         3                        3
## 64                    4                         2                        1
## 65                    4                         2                        1
## 66                    3                         3                        2
## 67                    3                         2                        2
## 68                    3                         3                        2
## 69                    4                         3                        2
## 70                    3                         4                        3
## 71                    2                         3                        4
## 72                    3                         3                        3
## 73                    2                         2                        4
## 74                    3                         2                        3
## 75                    2                         1                        2
## 76                    3                         4                        3
## 77                    2                         4                        4
## 78                    3                         4                        2
## 79                    4                         1                        1
## 80                    5                         4                        1
## 81                    4                         3                        2
## 82                    2                         3                        5
## 83                    3                         4                        2
## 84                    3                         4                        3
## 85                    4                         2                        2
## 86                    4                         2                        1
## 87                    2                         4                        2
## 88                    3                         2                        1
## 89                    4                         2                        2
## 90                    2                         4                        4
## 91                    2                         4                        3
## 92                    3                         3                        2
## 93                    4                         1                        1
## 94                    5                         1                        1
## 95                    4                         2                        4
## 96                    5                         2                        1
## 97                    3                         2                        1
## 98                    3                         3                        4
## 99                    4                         1                        3
## 100                   3                         3                        2
## 101                   3                         2                        1
## 102                   1                         3                        1
## 103                   2                         3                        3
## 104                   3                         2                        2
## 105                   2                         3                        2
## 106                   3                         3                        2
## 107                   4                         2                        4
## 108                   3                         3                        3
## 109                   3                         3                        3
##     Loneliness_2weeks.TC Concentration_2weeks.TC Neg_thoughts_2weeks.TC
## 1                      2                       3                      2
## 2                      4                       4                      4
## 3                      5                       5                      5
## 4                      4                       5                      4
## 5                      1                       2                      1
## 6                      5                       4                      5
## 7                      3                       5                      3
## 8                      2                       2                      1
## 9                      5                       5                      4
## 10                     4                       3                      4
## 11                     2                       4                      2
## 12                     4                       4                      4
## 13                     1                       1                      2
## 14                     1                       2                      4
## 15                     2                       2                      1
## 16                     4                       3                      3
## 17                     3                       1                      3
## 18                     5                       5                      5
## 19                     1                       3                      1
## 20                     2                       3                      3
## 21                     2                       5                      2
## 22                     4                       4                      4
## 23                     1                       2                      2
## 24                     2                       2                      3
## 25                     3                       4                      2
## 26                     4                       4                      3
## 27                     3                       4                      2
## 28                     4                       5                      3
## 29                     4                       3                      4
## 30                     4                       5                      3
## 31                     3                       4                      2
## 32                     1                       3                      1
## 33                     4                       4                      3
## 34                     3                       5                      3
## 35                     1                       3                      2
## 36                     2                       2                      2
## 37                     3                       4                      3
## 38                     2                       4                      3
## 39                     3                       4                      3
## 40                     4                       5                      2
## 41                     3                       4                      4
## 42                     3                       3                      2
## 43                     2                       4                      2
## 44                     3                       5                      3
## 45                     2                       5                      1
## 46                     4                       5                      3
## 47                     3                       4                      2
## 48                     3                       1                      3
## 49                     3                       4                      3
## 50                     3                       4                      2
## 51                     3                       4                      3
## 52                     1                       3                      2
## 53                     2                       3                      2
## 54                     1                       3                      1
## 55                     1                       2                      1
## 56                     5                       4                      5
## 57                     2                       2                      1
## 58                     2                       2                      1
## 59                     2                       4                      3
## 60                     3                       3                      2
## 61                     4                       4                      3
## 62                     4                       3                      4
## 63                     2                       4                      2
## 64                     2                       4                      2
## 65                     1                       4                      2
## 66                     2                       3                      2
## 67                     4                       4                      3
## 68                     2                       2                      1
## 69                     3                       5                      3
## 70                     2                       4                      2
## 71                     5                       2                      3
## 72                     3                       4                      1
## 73                     3                       4                      3
## 74                     3                       3                      2
## 75                     3                       4                      2
## 76                     3                       3                      3
## 77                     4                       4                      3
## 78                     2                       4                      2
## 79                     1                       3                      1
## 80                     1                       1                      2
## 81                     2                       4                      3
## 82                     5                       5                      5
## 83                     3                       4                      4
## 84                     3                       3                      1
## 85                     1                       1                      1
## 86                     1                       1                      1
## 87                     1                       2                      1
## 88                     1                       1                      1
## 89                     1                       2                      2
## 90                     3                       3                      3
## 91                     4                       3                      3
## 92                     3                       4                      3
## 93                     2                       2                      1
## 94                     1                       1                      1
## 95                     3                       4                      2
## 96                     3                       4                      1
## 97                     2                       2                      1
## 98                     2                       4                      2
## 99                     1                       4                      1
## 100                    3                       2                      1
## 101                    2                       2                      1
## 102                    3                       3                      1
## 103                    4                       4                      3
## 104                    1                       4                      1
## 105                    4                       5                      3
## 106                    2                       3                      2
## 107                    2                       4                      2
## 108                    3                       4                      2
## 109                    2                       2                      2
##     Irritability_2weeks.TC Mental_health_rating.TC Worry_no_food.TC
## 1                        2                       2                0
## 2                        3                       4                0
## 3                        5                       4                1
## 4                        4                       5                1
## 5                        1                       3                1
## 6                        3                       4                0
## 7                        2                       4                0
## 8                        3                       2                0
## 9                        3                       4                0
## 10                       3                       4                0
## 11                       2                       2                0
## 12                       4                       2                0
## 13                       1                       1                0
## 14                       2                       4                0
## 15                       2                       1                0
## 16                       2                       3                0
## 17                       2                       3                0
## 18                       3                       3                0
## 19                       1                       2                0
## 20                       3                       4                1
## 21                       3                       1                0
## 22                       3                       2                0
## 23                       3                       2                0
## 24                       2                       3                0
## 25                       3                       1                0
## 26                       2                       3                0
## 27                       2                       1                0
## 28                       4                       2                0
## 29                       5                       4                1
## 30                       3                       4                0
## 31                       3                       4                0
## 32                       1                       2                0
## 33                       2                       2                0
## 34                       4                       2                0
## 35                       2                       1                0
## 36                       2                       2                0
## 37                       3                       4                0
## 38                       3                       3                0
## 39                       3                       2                0
## 40                       4                       2                0
## 41                       3                       3                0
## 42                       3                       3                0
## 43                       2                       2                0
## 44                       1                       4                0
## 45                       2                       1                0
## 46                       2                       5                0
## 47                       2                       3                0
## 48                       1                       1                0
## 49                       2                       4                0
## 50                       3                       4                0
## 51                       3                       4                0
## 52                       2                       2                0
## 53                       5                       4                0
## 54                       2                       2                0
## 55                       1                       1                0
## 56                       5                       5                0
## 57                       1                       2                0
## 58                       3                       1                0
## 59                       2                       3                0
## 60                       2                       2                0
## 61                       4                       3                0
## 62                       4                       4                0
## 63                       2                       1                0
## 64                       2                       3                0
## 65                       1                       2                0
## 66                       1                       1                0
## 67                       5                       4                0
## 68                       1                       2                0
## 69                       3                       4                0
## 70                       4                       3                0
## 71                       4                       2                0
## 72                       3                       3                0
## 73                       2                       3                0
## 74                       1                       2                0
## 75                       4                       3                0
## 76                       3                       2                0
## 77                       5                       3                0
## 78                       2                       2                0
## 79                       1                       3                1
## 80                       2                       3                0
## 81                       2                       2                0
## 82                       3                       5                0
## 83                       3                       3                0
## 84                       4                       2                0
## 85                       2                       1                0
## 86                       1                       2                0
## 87                       2                       1                0
## 88                       1                       2                0
## 89                       2                       3                0
## 90                       2                       3                0
## 91                       3                       2                0
## 92                       3                       2                0
## 93                       1                       1                0
## 94                       1                       1                0
## 95                       2                       2                0
## 96                       3                       3                0
## 97                       1                       2                0
## 98                       3                       2                0
## 99                       1                       4                1
## 100                      2                       2                0
## 101                      1                       1                0
## 102                      1                       2                0
## 103                      4                       2                0
## 104                      1                       3                0
## 105                      4                       4                0
## 106                      2                       2                0
## 107                      2                       4                0
## 108                      2                       2                0
## 109                      2                       2                0
##     Anhedonia_2weeks.TC Physical_health_rating.TC Fidgety_restless_2weeks.TC
## 1                     2                         2                          3
## 2                     2                         3                          1
## 3                     1                         3                          5
## 4                     2                         3                          5
## 5                     1                         3                          3
## 6                     3                         2                          4
## 7                     2                         3                          2
## 8                     3                         1                          1
## 9                     3                         3                          4
## 10                    3                         2                          2
## 11                    2                         1                          1
## 12                    1                         2                          2
## 13                    5                         2                          1
## 14                    2                         3                          1
## 15                    3                         2                          1
## 16                    3                         3                          3
## 17                    4                         4                          3
## 18                    2                         4                          3
## 19                    2                         1                          2
## 20                    1                         4                          2
## 21                    4                         1                          3
## 22                    3                         2                          4
## 23                    3                         4                          3
## 24                    3                         2                          2
## 25                    1                         1                          3
## 26                    2                         1                          1
## 27                    3                         1                          1
## 28                    2                         2                          4
## 29                    1                         2                          5
## 30                    2                         3                          4
## 31                    2                         3                          1
## 32                    2                         2                          1
## 33                    2                         2                          1
## 34                    2                         1                          4
## 35                    3                         2                          3
## 36                    4                         1                          1
## 37                    3                         2                          4
## 38                    3                         2                          2
## 39                    3                         1                          3
## 40                    2                         2                          4
## 41                    3                         3                          3
## 42                    4                         4                          4
## 43                    3                         3                          2
## 44                    2                         3                          2
## 45                    1                         1                          5
## 46                    3                         3                          5
## 47                    2                         1                          3
## 48                    5                         4                          1
## 49                    2                         3                          3
## 50                    1                         2                          3
## 51                    2                         2                          4
## 52                    3                         3                          1
## 53                    2                         2                          4
## 54                    3                         2                          2
## 55                    4                         1                          1
## 56                    3                         2                          4
## 57                    3                         2                          2
## 58                    2                         2                          3
## 59                    3                         3                          3
## 60                    2                         2                          1
## 61                    3                         2                          4
## 62                    3                         3                          3
## 63                    5                         1                          3
## 64                    4                         3                          1
## 65                    4                         1                          1
## 66                    3                         2                          2
## 67                    4                         4                          3
## 68                    1                         2                          2
## 69                    4                         3                          4
## 70                    1                         3                          4
## 71                    1                         2                          2
## 72                    1                         3                          2
## 73                    2                         3                          4
## 74                    3                         2                          3
## 75                    3                         3                          3
## 76                    2                         3                          2
## 77                    2                         2                          3
## 78                    4                         3                          3
## 79                    4                         2                          2
## 80                    4                         2                          3
## 81                    2                         2                          3
## 82                    2                         2                          1
## 83                    2                         3                          4
## 84                    2                         2                          4
## 85                    4                         2                          1
## 86                    3                         1                          1
## 87                    3                         1                          1
## 88                    1                         2                          2
## 89                    2                         2                          1
## 90                    2                         2                          3
## 91                    2                         2                          3
## 92                    3                         2                          3
## 93                    2                         1                          1
## 94                    1                         2                          1
## 95                    3                         2                          2
## 96                    4                         2                          1
## 97                    4                         2                          1
## 98                    2                         2                          4
## 99                    3                         2                          1
## 100                   3                         2                          2
## 101                   3                         1                          1
## 102                   3                         2                          1
## 103                   4                         1                          3
## 104                   3                         2                          1
## 105                   1                         3                          2
## 106                   2                         2                          3
## 107                   5                         3                          3
## 108                   3                         4                          4
## 109                   2                         2                          3
##     income_3levels years covid_physs
## 1               NA  6.54           0
## 2               NA  6.52           0
## 3                3  6.40           2
## 4                2  6.34           2
## 5                1  6.25           0
## 6               NA  6.24           1
## 7                2  6.25           0
## 8                2  6.21           0
## 9                2  6.20           1
## 10               2  6.20           0
## 11              NA  6.11           0
## 12               2  6.18           0
## 13              NA  5.94           0
## 14               2  6.10           0
## 15               3  6.07           0
## 16               2  6.08           1
## 17               3  6.10           0
## 18               2  6.00           0
## 19               3  5.98           0
## 20               3  6.00           0
## 21               2  5.93           0
## 22               2  5.91           0
## 23               2  5.89           1
## 24               3  5.88           0
## 25               3  5.89           0
## 26              NA  5.85           0
## 27               2  5.84           0
## 28               3  5.81           0
## 29               2  5.80           4
## 30               3  5.79           0
## 31               2  5.78           0
## 32               3  5.74           0
## 33               2  5.68           3
## 34               3  5.68           0
## 35               2  5.66           0
## 36               3  5.64           0
## 37              NA  5.64           0
## 38               3  5.62           0
## 39               3  5.57           0
## 40               1  5.55           0
## 41               2  5.54           0
## 42               3  5.52           1
## 43               2  5.50           1
## 44               3  5.52           1
## 45               3  5.40           0
## 46               3  5.34           3
## 47               3  5.33           0
## 48               3  5.27           0
## 49               3  5.27           1
## 50               2  5.24           1
## 51               2  5.13           0
## 52               1  5.13           0
## 53               3  5.10           0
## 54               3  5.09           0
## 55              NA  5.07           0
## 56               3  4.99           1
## 57               2  4.83           0
## 58               2  4.93           0
## 59               3  4.89           1
## 60               1  4.83           0
## 61               3  4.86           2
## 62               2  4.74           1
## 63               2  4.72           0
## 64               3  4.76           0
## 65               3  4.70           1
## 66               3  4.70           0
## 67               3  4.70           1
## 68               2  4.68           0
## 69               2  4.69           1
## 70               2  4.67           0
## 71               2  4.67           1
## 72               2  4.67           0
## 73               3  4.64           0
## 74               3  4.62           0
## 75               2  4.63           0
## 76               3  4.59           2
## 77               3  4.56           1
## 78               2  4.57           0
## 79               2  4.60           0
## 80               2  4.54           0
## 81               2  4.51           0
## 82               2  4.53           0
## 83               3  4.51           0
## 84               3  4.49           4
## 85               2  4.47           0
## 86               2  4.41           0
## 87               3  4.39           1
## 88               2  4.40           0
## 89               3  4.40           0
## 90               3  4.37           2
## 91               2  4.33           0
## 92               3  4.32           0
## 93               3  4.31           0
## 94               2  4.30           0
## 95               2  4.14           0
## 96               2  4.03           0
## 97               2  3.87           0
## 98               2  3.83           0
## 99               2  3.79           0
## 100              3  3.82           2
## 101              3  3.72           0
## 102              2  3.84           0
## 103              2  3.72           0
## 104              3  3.49           0
## 105              3  3.45           1
## 106              2  3.33           0
## 107              2  3.03           0
## 108              3  3.10           1
## 109              3  3.02           0
# covid %>%
#    group_by(KSADS_Child_Race_by_P.T1) %>%
#    summarise(n = n())
#calculation of non-white participants
63/109
## [1] 0.5779817
## income
# 2 is less than 10k; 10 is more than 150k
min(covid$Parent_Income.T1, na.rm = TRUE)
## [1] 2
max(covid$Parent_Income.T1, na.rm = TRUE)
## [1] 10
### sex differences crisis
x <- which(names(covid) == "Child_Sex.T1") # name of grouping variable
y <- which(names(covid) == "Mental_health_rating.TC" # names of variables to test
           | names(covid) == "Worry_self_infected.TC"
           | names(covid) == "Worry_fam_infected.TC"
           | names(covid) == "Self_phys_health_influence.TC"
           | names (covid) == "Self_mental_health_influence.TC"
           | names (covid) == "Read_talk_virus.TC"
           | names (covid) == "Covid_positive_changes.TC"
           | names (covid) == "Stress_of_restrictions.TC"
           | names (covid) == "Contacts_outside_change.TC"
           | names (covid) == "Diff_following_contact_rules.TC"
           | names (covid) == "Quality_relations_family_change.TC"
           | names (covid) == "Stress_relations_family_change.TC"
           | names (covid) == "Quality_relations_friends_change.TC"
           | names (covid) == "Stress_relations_friends_change.TC"
           | names (covid) == "Cancelling_events_difficulty.TC"
           | names (covid) == "Family_financial_problems.TC"
           | names (covid) == "Worry_living_stability.TC"
           | names (covid) == "Hope_crisis_end.TC"
           | names (covid) == "covid_physs")
method <- "t.test" # one of "wilcox.test" or "t.test"
paired <- FALSE 
for (i in y) {
  for (j in x) {
    ifelse(paired == TRUE,
           p <- ggpaired(covid,
                         x = colnames(covid[j]), y = colnames(covid[i]),
                         color = colnames(covid[j]), line.color = "gray", line.size = 0.4,
                         palette = "npg",
                         legend = "none",
                         xlab = colnames(covid[j]),
                         ylab = colnames(covid[i]),
                         add = "jitter"
           ),
           p <- ggboxplot(covid,
                          x = colnames(covid[j]), y = colnames(covid[i]),
                          color = colnames(covid[j]),
                          palette = "npg",
                          legend = "none",
                          add = "jitter"
           )
    )
    #  Add p-value
    print(p + stat_compare_means(aes(label = paste0(..method.., ", p-value = ", ..p.format..)),
                                 method = method,
                                 paired = paired,
                                 # group.by = NULL,
                                 ref.group = NULL
    ))
  }
}

# significant sex differences on the crisis
t.test(covid_physs ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  covid_physs by Child_Sex.T1
## t = -2.4475, df = 107, p-value = 0.01601
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.70536132 -0.07406081
## sample estimates:
## mean in group 1 mean in group 2 
##       0.1860465       0.5757576
t.test(Worried_2weeks.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Worried_2weeks.TC by Child_Sex.T1
## t = -2.2627, df = 107, p-value = 0.02568
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.74635316 -0.04927757
## sample estimates:
## mean in group 1 mean in group 2 
##        2.162791        2.560606
t.test(Happy_sad_2weeks.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Happy_sad_2weeks.TC by Child_Sex.T1
## t = 3.4525, df = 107, p-value = 0.0007966
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  0.2681199 0.9912177
## sample estimates:
## mean in group 1 mean in group 2 
##        3.372093        2.742424
t.test(Relaxed_anxious_2weeks.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Relaxed_anxious_2weeks.TC by Child_Sex.T1
## t = -2.075, df = 107, p-value = 0.04039
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.75720803 -0.01728105
## sample estimates:
## mean in group 1 mean in group 2 
##        2.627907        3.015152
t.test(Fatigued_tired_2weeks.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Fatigued_tired_2weeks.TC by Child_Sex.T1
## t = -3.4128, df = 107, p-value = 0.0009088
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.9965369 -0.2642101
## sample estimates:
## mean in group 1 mean in group 2 
##        1.930233        2.560606
t.test(Loneliness_2weeks.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Loneliness_2weeks.TC by Child_Sex.T1
## t = -2.8297, df = 107, p-value = 0.005566
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -1.0713971 -0.1886452
## sample estimates:
## mean in group 1 mean in group 2 
##        2.279070        2.909091
t.test(Concentration_2weeks.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Concentration_2weeks.TC by Child_Sex.T1
## t = -2.5794, df = 107, p-value = 0.01126
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -1.0039271 -0.1313795
## sample estimates:
## mean in group 1 mean in group 2 
##        3.023256        3.590909
t.test(Neg_thoughts_2weeks.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Neg_thoughts_2weeks.TC by Child_Sex.T1
## t = -2.0837, df = 107, p-value = 0.03957
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.86704455 -0.02160943
## sample estimates:
## mean in group 1 mean in group 2 
##        2.116279        2.560606
t.test(Self_mental_health_influence.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Self_mental_health_influence.TC by Child_Sex.T1
## t = -2.9393, df = 107, p-value = 0.004031
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -1.1245578 -0.2186416
## sample estimates:
## mean in group 1 mean in group 2 
##        2.116279        2.787879
t.test(Mental_health_rating.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Mental_health_rating.TC by Child_Sex.T1
## t = -2.5713, df = 107, p-value = 0.01151
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.9547513 -0.1234728
## sample estimates:
## mean in group 1 mean in group 2 
##        2.279070        2.818182
t.test(Cancelling_events_difficulty.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Cancelling_events_difficulty.TC by Child_Sex.T1
## t = -3.6008, df = 107, p-value = 0.0004826
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -1.3101518 -0.3797707
## sample estimates:
## mean in group 1 mean in group 2 
##        2.488372        3.333333
t.test(Worry_no_food.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Worry_no_food.TC by Child_Sex.T1
## t = -2.2379, df = 107, p-value = 0.0273
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.20001257 -0.01210864
## sample estimates:
## mean in group 1 mean in group 2 
##       0.0000000       0.1060606
t.test(Anhedonia_2weeks.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Anhedonia_2weeks.TC by Child_Sex.T1
## t = 2.5575, df = 107, p-value = 0.01194
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  0.1119646 0.8838071
## sample estimates:
## mean in group 1 mean in group 2 
##        2.906977        2.409091
# no sex differences 
t.test(Physical_health_rating.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Physical_health_rating.TC by Child_Sex.T1
## t = -1.382, df = 107, p-value = 0.1698
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.54812725  0.09781012
## sample estimates:
## mean in group 1 mean in group 2 
##        2.093023        2.318182
t.test(Fidgety_restless_2weeks.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Fidgety_restless_2weeks.TC by Child_Sex.T1
## t = -1.6416, df = 107, p-value = 0.1036
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.85566977  0.08047597
## sample estimates:
## mean in group 1 mean in group 2 
##        2.279070        2.666667
t.test(Irritability_2weeks.TC ~ Child_Sex.T1, data = covid, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  Irritability_2weeks.TC by Child_Sex.T1
## t = -1.5114, df = 107, p-value = 0.1336
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.7558909  0.1019093
## sample estimates:
## mean in group 1 mean in group 2 
##        2.279070        2.606061
# data file for group comparisons of responders/non-responders
completers_noncompleters = read.csv("/Volumes/group/users/borchersLR/COVID/github/completers_noncompleters.csv")
completers_noncompleters = completers_noncompleters %>% 
    mutate(subsample = !is.na(CESDC_total.TC))
# 109 included in sample; 115 did not complete tc assessment
completers_noncompleters %>% 
      group_by(subsample) %>%
      summarise(n=n())
## `summarise()` ungrouping output (override with `.groups` argument)
## # A tibble: 2 x 2
##   subsample     n
##   <lgl>     <int>
## 1 FALSE       115
## 2 TRUE        109
## group comparisons covid-19 survey completers vs. non-completers
# age at baseline
t.test(Age_S1.T1 ~ subsample, data = completers_noncompleters, var.equal=T)
## 
##  Two Sample t-test
## 
## data:  Age_S1.T1 by subsample
## t = 1.5736, df = 222, p-value = 0.117
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.05545692  0.49490965
## sample estimates:
## mean in group FALSE  mean in group TRUE 
##            11.45330            11.23358
# race
# 1 is white; 2 is african american; 3 is hispanic; 4 is asian; 5 is biracial; 6 is other
race <- data.frame(completers_noncompleters$subsample, completers_noncompleters$KSADS_Child_Race_by_P.T1)
race = table(completers_noncompleters$subsample, completers_noncompleters$KSADS_Child_Race_by_P.T1)
print(race)
##        
##          1  2  3  4  5  6
##   FALSE 54 15 10  4 25  7
##   TRUE  46  4 10 20 22  7
print(chisq.test(race))
## 
##  Pearson's Chi-squared test
## 
## data:  race
## X-squared = 17.719, df = 5, p-value = 0.003321
# els baseline
t.test(sumsev_type_t1 ~ subsample, data = completers_noncompleters, var.equal=T)
## 
##  Two Sample t-test
## 
## data:  sumsev_type_t1 by subsample
## t = 2.8344, df = 221, p-value = 0.005017
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  0.6235654 3.4694653
## sample estimates:
## mean in group FALSE  mean in group TRUE 
##            7.885965            5.839450
t.test(cdi_TOTAL.T1 ~ subsample, data = completers_noncompleters, rm.na=TRUE,  var.equal=T)
## 
##  Two Sample t-test
## 
## data:  cdi_TOTAL.T1 by subsample
## t = 2.4216, df = 218, p-value = 0.01627
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  0.1427805 1.3916110
## sample estimates:
## mean in group FALSE  mean in group TRUE 
##            2.535714            1.768519
# parental income
covid_income_all <-
  completers_noncompleters %>%
  mutate_at(
    vars(Parent_Income.T1
    ),
    funs(
      . %>%
        dplyr::recode(
          "10" = 3,
          "9" = 2,
          "8" = 2,
          "7" = 2,
          "6" = 2,
          "5" = 1,
          "4" = 1,
          "3" = 1,
          "2" = 1,
          "1" = 1,
        )
    )
  )
## Warning: Problem with `mutate()` input `Parent_Income.T1`.
## x Unreplaced values treated as NA as .x is not compatible. Please specify replacements exhaustively or supply .default
## ℹ Input `Parent_Income.T1` is ``%>%`(...)`.
## Warning: Unreplaced values treated as NA as .x is not compatible. Please specify
## replacements exhaustively or supply .default
# setting na values for income to 0
covid_income_all <- covid_income_all %>%
    mutate(Parent_Income.T1 = if_else(is.na(Parent_Income.T1), 0, Parent_Income.T1))
income <- data.frame(covid_income_all$subsample, covid_income_all$Parent_Income.T1)
income = table(covid_income_all$subsample, covid_income_all$Parent_Income.T1)
print(income)
##        
##          0  1  2  3
##   FALSE 12 16 56 31
##   TRUE   8  4 50 47
print(chisq.test(income))
## 
##  Pearson's Chi-squared test
## 
## data:  income
## X-squared = 11.469, df = 3, p-value = 0.009441
# figure 2
covid_plot = covid %>% 
  select(cdi_TOTAL.T1, sumsev_type_t1, PSS_total.TC, CESDC_total.TC, 
              covid_physs, Worry_no_food.TC, Mental_health_rating.TC, 
              Cancelling_events_difficulty.TC, Stress_of_restrictions.TC, 
              Stress_relations_family_change.TC, Stress_relations_friends_change.TC)

covid_plot <-covid_plot %>% rename('CDI-S Baseline' = cdi_TOTAL.T1, 'ELS Severity Baseline' = sumsev_type_t1, 'PSS COVID-19' = PSS_total.TC, 
                                   'CES-DC COVID-19' = CESDC_total.TC, 'Symptoms COVID-19' = covid_physs, 'Worry About Food COVID-19' = Worry_no_food.TC, 
                                   'Mental Health Impact COVID-19' = Mental_health_rating.TC, 'Difficulty Cancel Events COVID-19' = Cancelling_events_difficulty.TC,  
                                   'Stress of Restrictions COVID-19' = Stress_of_restrictions.TC, 'Stress Change Family Contact COVID-19' = Stress_relations_family_change.TC,
                                   'Stress Change Social Contact COVID-19' = Stress_relations_friends_change.TC)

ggcorrmat(
  covid,
  cor.vars = c('CDI-S Baseline' = cdi_TOTAL.T1, 'ELS Severity Baseline' = sumsev_type_t1, 'PSS COVID-19' = PSS_total.TC, 'CES-DC COVID-19' = CESDC_total.TC, 'Symptoms COVID-19' =
              covid_physs, 'Worry About Food COVID-19' = Worry_no_food.TC, 'Mental Health Impact COVID-19' = Mental_health_rating.TC, 'Difficulty Cancel Events COVID-19' =
              Cancelling_events_difficulty.TC,  'Stress of Restrictions COVID-19' = Stress_of_restrictions.TC, 
              'Stress Change Family Contact COVID-19' =Stress_relations_family_change.TC, 'Stress Change Social Contact COVID-19' = Stress_relations_friends_change.TC),
  sig.level = 0.05,
  p.adjust.method = "fdr",
  ggcorrplot.args = c(insig = "blank"),
  colors = c("white", "grey80", "grey30"),
  matrix.type = "lower",
  title = "Correlations among Baseline and COVID-19 \n items/measures assessed in this study",
      plot.title = element_text(size = 12, hjust = .5))

#  ggsave("~/Desktop/figure2.tiff", height = 7, width = 9)
# setting theme for graphs
base_size=9
theme_set(
theme_minimal(
  base_size = 11,
  base_family = "",
  base_line_size = base_size/22,
  base_rect_size = base_size/22
))
# figure 3a
cor.test(covid$PSS_total.TC, covid$sumsev_type_t1)
## 
##  Pearson's product-moment correlation
## 
## data:  covid$PSS_total.TC and covid$sumsev_type_t1
## t = 3.8394, df = 106, p-value = 0.0002102
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1717782 0.5050365
## sample estimates:
##       cor 
## 0.3494098
covid = covid %>%
  mutate(Child_Sex.T1 = as.factor(Child_Sex.T1))
figure1.1=covid %>% 
  ggplot(mapping = aes(x = sumsev_type_t1,
                       y = PSS_total.TC,
                       color = Child_Sex.T1)) +
  geom_point(alpha = .6, size = 3)+
  geom_smooth(method = "lm", alpha=.1, size = 2) +
  labs(x = "ELS Severity (Baseline)") +
  labs(y = "Perceived Stress (COVID-19)") + 
  ggtitle(~italic(r)~"(106)=0.35,"~italic(p)~"0<.001") +
  theme(plot.title = element_text(hjust = 0.5, size=30)) +
  theme(axis.line = element_line(size = 1)) +
  theme(legend.title = element_blank()) +
  theme(legend.position = c(.92, .85)) +
  labs(subtitle="A") +
  theme(plot.subtitle=element_text(size=18, face="bold", color="black")) +
  theme(axis.text=element_text(size=20)) +
  theme(axis.title=element_text(size=18)) +
  geom_hline(yintercept=14.2, color = "gray",
         linetype="dashed") +
  annotate("text", x = 16, y = 12, label = "Average PSS in adolescents", color="dark gray") + 
  scale_color_manual(labels = c("Male", "Female"), values = c("#4d4f53", "#8c1515"))+
  xlim(0,20) + 
  ylim(0, 52)
# ggsave("~/Desktop/els_pss.tiff", height = 5, width = 6)
# figure 3b
cor.test(covid$CESDC_total.TC, covid$sumsev_type_t1)
## 
##  Pearson's product-moment correlation
## 
## data:  covid$CESDC_total.TC and covid$sumsev_type_t1
## t = 2.8112, df = 107, p-value = 0.005871
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.07800399 0.42918713
## sample estimates:
##       cor 
## 0.2622577
figure1.2=covid %>% 
  ggplot(mapping = aes(x = sumsev_type_t1,
                       y = CESDC_total.TC,
                       color = Child_Sex.T1)) +
  geom_point(alpha = .6, size = 3)+
  geom_smooth(method = "lm", alpha=.1, size = 2) +
  labs(x = "ELS Severity (Baseline)") +
  labs(y = "Depression Symptoms (COVID-19)") + 
  ggtitle(~italic(r)~"(107)=0.26,"~italic(p)~"=0.006") +
  theme(plot.title = element_text(hjust = 0.5, size=30)) +
  theme(axis.line = element_line(size = 1)) +
  theme(legend.title = element_blank()) +
  theme(legend.position = c(.92, .85)) +
  labs(subtitle="B") +
  theme(plot.subtitle=element_text(size=18, face="bold", color="black")) +
  theme(axis.text=element_text(size=20)) +
  theme(axis.title=element_text(size=18)) +
  geom_hline(yintercept=15, color = "gray",
         linetype="dashed") +
  annotate("text", x = 17, y = 12, label = "CES-DC cut-off score", color="dark gray") + 
  scale_color_manual(labels = c("Male", "Female"), values = c("#4d4f53", "#8c1515"))+
  xlim(0,20) + 
  ylim(0, 52)
# ggsave("~/Desktop/els_cesdc.tiff", height = 5, width = 6)

# combined figure 
require(gridExtra)
## Loading required package: gridExtra
## 
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
## 
##     combine
require(cowplot)
## Loading required package: cowplot
## 
## ********************************************************
## Note: As of version 1.0.0, cowplot does not change the
##   default ggplot2 theme anymore. To recover the previous
##   behavior, execute:
##   theme_set(theme_cowplot())
## ********************************************************
## 
## Attaching package: 'cowplot'
## The following object is masked from 'package:lubridate':
## 
##     stamp
## The following object is masked from 'package:ggthemes':
## 
##     theme_map
## The following object is masked from 'package:ggpubr':
## 
##     get_legend
grid.arrange(figure1.1, figure1.2, ncol=2)
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (stat_smooth).
## Warning: Removed 1 rows containing missing values (geom_point).
## `geom_smooth()` using formula 'y ~ x'

g <- arrangeGrob(figure1.1, figure1.2, ncol=2) #generates g
## `geom_smooth()` using formula 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (stat_smooth).

## Warning: Removed 1 rows containing missing values (geom_point).
## `geom_smooth()` using formula 'y ~ x'
ggsave(file="~/Desktop/figure3.tiff", g, height = 6, width = 12)
# comparing scores in our sample to validated sample / clinical cutoff
mean(covid$PSS_total.TC, na.rm = TRUE)
## [1] 18.4537
# mean of pss in validated sample of 645 adolescents between 18-29 years old
14.2
## [1] 14.2
# difference between pss in our sample and the validated sample
18.45-14.2
## [1] 4.25
# number of participants above clinical cutoff of 15 on the cesdc
sum(covid$CESDC_total.TC > 15)
## [1] 69
# percent above cutoff in our sample
69/109
## [1] 0.6330275
## mediation analysis 
# centering variables 
covid$Age_S1.T1_z=scale(covid$Age_S1.T1, center=TRUE, scale =TRUE) 
covid$CDI_total.T1_z=scale(covid$cdi_TOTAL.T1, center=TRUE, scale =TRUE)
covid$sumsev_type_t1_z=scale(covid$sumsev_type_t1, center=TRUE, scale =TRUE) 
covid$Child_Age.TC_z=scale(covid$Child_Age.TC, center=TRUE, scale =TRUE) 
covid$PSS_total.TC_z=scale(covid$PSS_total.TC, center=TRUE, scale =TRUE)
covid$CESDC_total.TC_z=scale(covid$CESDC_total.TC, center=TRUE, scale =TRUE) 
covid = covid %>%
  mutate(Child_Sex.T1 = as.numeric(Child_Sex.T1))
# # mediation
mediation_model <- mediate(CESDC_total.TC_z ~ sumsev_type_t1_z + (PSS_total.TC_z)- CDI_total.T1_z - Child_Sex.T1 - Age_S1.T1_z - Child_Age.TC_z - KSADS_Child_Race_by_P.T1 - 
                           income_3levels, data =covid,n.iter=5000) 

summary(mediation_model)
## Call: mediate(y = CESDC_total.TC_z ~ sumsev_type_t1_z + (PSS_total.TC_z) - 
##     CDI_total.T1_z - Child_Sex.T1 - Age_S1.T1_z - Child_Age.TC_z - 
##     KSADS_Child_Race_by_P.T1 - income_3levels, data = covid, 
##     n.iter = 5000)
## 
## Direct effect estimates (traditional regression)    (c') 
##                  CESDC_total.TC_z*   se     t  df     Prob
## Intercept                    -0.65 0.37 -1.73 100 8.63e-02
## sumsev_type_t1_z              0.02 0.07  0.23 100 8.22e-01
## PSS_total.TC_z                0.69 0.07  9.41 100 1.92e-15
## 
## R = 0.73 R2 = 0.53   F = 56.29 on 2 and 100 DF   p-value:  4.21e-17 
## 
##  Total effect estimates (c) 
##                  CESDC_total.TC_z*   se     t  df   Prob
## Intercept                    -1.32 0.50 -2.62 101 0.0101
## sumsev_type_t1_z              0.23 0.09  2.60 101 0.0107
## 
##  'a'  effect estimates 
##                  PSS_total.TC_z   se     t  df     Prob
## Intercept                 -0.97 0.50 -1.94 101 0.055000
## sumsev_type_t1_z           0.31 0.09  3.54 101 0.000605
## 
##  'b'  effect estimates 
##                CESDC_total.TC_z*   se    t  df     Prob
## PSS_total.TC_z              0.69 0.07 9.46 101 1.39e-15
## 
##  'ab'  effect estimates (through mediators)
##                  CESDC_total.TC_z* boot sd lower upper
## sumsev_type_t1_z              0.22 0.18  0  0.18  0.18