Colorado twin sample

all data has been read in, cleaned and scored else where

read in cleaned data

HF_sleep<- fread("/Users/claire/Desktop/dissertation/cotwin_mendelian/ctc_sleep_psych/HF_sleep_dat.csv", header=T, data.table = F)
cadd<- fread("/Users/claire/Desktop/dissertation/cotwin_mendelian/ctc_sleep_psych/LTS_psych_dat.csv", header=T, data.table=F)

HF_sleep$project<- NULL
HF_sleep$family<- NULL
HF_sleep$bestbet<- NULL
HF_sleep$Trand<- NULL
HF_sleep$racecat<- NULL
HF_sleep$hispanic<- NULL


dat<- merge(HF_sleep, cadd, by='twinid')

z transform

dat$sleep_satisfaction<- scale(dat$sleep_satisfaction)
dat$weekday_dur<- scale(dat$weekday_dur)
dat$weekend_dur<- scale(dat$weekend_dur)
dat$total_alertness<- scale(dat$total_alertness)
dat$insom<- scale(dat$insom)

create between and within variables

dat<- dat %>% group_by(family) %>%   
  mutate(
    avg_satisf = mean(sleep_satisfaction,na.rm=T),    
    satisf_diff = sleep_satisfaction-avg_satisf,
    avg_weekday_dur= mean(weekday_dur,na.rm=T),    
    weekday_dur_diff = weekday_dur-avg_weekday_dur,
    avg_weekend_dur = mean(weekend_dur,na.rm=T),    
    weekend_dur_diff = weekend_dur-avg_weekend_dur,
    avg_meq = mean(total_meq,na.rm=T),    
    meq_diff = total_meq-avg_meq,
    avg_alertness = mean(total_alertness,na.rm=T),    
    alertness_diff = total_alertness-avg_alertness,
    avg_insom= mean(insom, na.rm=T),
    insom_diff=insom-avg_insom
  )

regress out covariates

# look at stucture
str(dat$hispanic); table(dat$hispanic)
str(dat$racecat); table(dat$racecat)
str(dat$work_schedule); table(dat$work_schedule)

# turn race and work sched into factors
dat$race_fact<- as.factor(dat$racecat)
dat$work_schedule<- as.factor(dat$work_schedule)
str(dat$race_fact)

# non normal 
hist(dat$INT)

hist(dat$EXT)

# sqrt root transform
dat$INT_SQRT<- sqrt(dat$INT) 
## Warning in sqrt(dat$INT): NaNs produced
dat$EXT_SQRT<- sqrt(dat$EXT) 
## Warning in sqrt(dat$EXT): NaNs produced
# more normal!
hist(dat$INT_SQRT)

hist(dat$EXT_SQRT)

summary(lm(INT_SQRT~sex+Age+hispanic+race_fact+work_schedule, data=dat, na.action = "na.exclude"))
summary(lm(EXT_SQRT~sex+Age+hispanic+race_fact+work_schedule, data=dat, na.action = "na.exclude"))

# regress out and save residuals
dat$INT_resid<- resid(lm(INT_SQRT~sex+Age+hispanic+race_fact+work_schedule, data=dat, na.action = "na.exclude"))
dat$EXT_resid<- resid(lm(EXT_SQRT~sex+Age+hispanic+race_fact+work_schedule, data=dat, na.action = "na.exclude"))

# looks good
hist(dat$INT_resid)

hist(dat$EXT_resid)

# finally, standardize
dat$INT_resid<- scale(dat$INT_resid)
dat$EXT_resid<- scale(dat$EXT_resid)

# mean around 0 and SD=1!
mean(dat$INT_resid, na.rm=T); sd(dat$INT_resid, na.rm=T)
mean(dat$EXT_resid, na.rm=T); sd(dat$EXT_resid, na.rm=T)

code zygosity

dat$family<- as.numeric(dat$family)
dat$zyg<- ifelse(dat$bestbet=="MZ", 1/2, ifelse(dat$bestbet=="DZ" | dat$bestbet=="OS", -1/2, NA))
dat$zygMZ<- ifelse(dat$bestbet=="MZ", 0, ifelse(dat$bestbet=="DZ" | dat$bestbet=="OS", 1, NA))
dat$zygDZ<- ifelse(dat$bestbet=="MZ", 1, ifelse(dat$bestbet=="DZ" | dat$bestbet=="OS", 0, NA))

table(dat$zyg)
## 
## -0.5  0.5 
## 1074 1037
table(dat$sex)
## 
##    0    1 
## 1181  932

create data frame to save models

col_out<- data.frame()

internalizing

satisfaction

# satisfaction
satisf_int_pheno<- lmer(INT_resid~sleep_satisfaction+(1|family), data=dat)
summary(satisf_int_pheno)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ sleep_satisfaction + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2319.3
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.22787 -0.64216  0.01849  0.67537  2.61698 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1518   0.3897  
##  Residual             0.8163   0.9035  
## Number of obs: 826, groups:  family, 606
## 
## Fixed effects:
##                     Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)         -0.01531    0.03683 604.61341  -0.416    0.678    
## sleep_satisfaction  -0.13687    0.03424 823.94777  -3.997 6.99e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## slp_stsfctn 0.254
out<- satisf_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Satisfaction",
         sleep="Satisfaction",
         Psychiatric="Internalizing",
         model="Phenotypic")

col_out<- rbind(col_out, out)


satisf_int<- lmer(INT_resid~avg_satisf+satisf_diff+(1|family), data=dat)
summary(satisf_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_satisf + satisf_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2319.5
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.28104 -0.64978  0.01876  0.66461  2.65307 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1472   0.3837  
##  Residual             0.8178   0.9043  
## Number of obs: 826, groups:  family, 606
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)  -0.01749    0.03676 601.45769  -0.476    0.634    
## avg_satisf   -0.18793    0.04414 633.87961  -4.258 2.37e-05 ***
## satisf_diff  -0.06273    0.05310 511.85440  -1.181    0.238    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_st
## avg_satisf  0.219        
## satisf_diff 0.138  0.015
anova(satisf_int_pheno,satisf_int)
## refitting model(s) with ML (instead of REML)
## Data: dat
## Models:
## satisf_int_pheno: INT_resid ~ sleep_satisfaction + (1 | family)
## satisf_int: INT_resid ~ avg_satisf + satisf_diff + (1 | family)
##                  npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)  
## satisf_int_pheno    4 2317.5 2336.4 -1154.8   2309.5                       
## satisf_int          5 2316.2 2339.8 -1153.1   2306.2 3.3404  1     0.0676 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
satisf_int_zyg<- lmer(INT_resid~avg_satisf+satisf_diff+zyg+zyg*satisf_diff+(1|family), data=dat)
summary(satisf_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_satisf + satisf_diff + zyg + zyg * satisf_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2320.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.25803 -0.65569  0.02182  0.65536  2.65216 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1467   0.3831  
##  Residual             0.8212   0.9062  
## Number of obs: 824, groups:  family, 605
## 
## Fixed effects:
##                   Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)      -0.018033   0.036865 596.586339  -0.489    0.625    
## avg_satisf       -0.185897   0.044290 630.507469  -4.197 3.09e-05 ***
## satisf_diff      -0.057312   0.053508 514.501087  -1.071    0.285    
## zyg               0.008143   0.071651 627.015829   0.114    0.910    
## satisf_diff:zyg   0.072475   0.107354 535.755867   0.675    0.500    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_st stsf_d zyg  
## avg_satisf  0.219                     
## satisf_diff 0.138  0.019              
## zyg         0.038  0.058  0.020       
## stsf_dff:zy 0.028  0.021  0.093  0.138
out<- satisf_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Satisfaction",
         sleep="Satisfaction",
         Psychiatric="Internalizing",
         model="Between Within")

col_out<- rbind(col_out, out)

satisf_int_MZ<- lmer(INT_resid~avg_satisf+satisf_diff+zygMZ+zygMZ*satisf_diff+(1|family), data=dat)
summary(satisf_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_satisf + satisf_diff + zygMZ + zygMZ * satisf_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2320.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.25803 -0.65569  0.02182  0.65536  2.65216 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1467   0.3831  
##  Residual             0.8212   0.9062  
## Number of obs: 824, groups:  family, 605
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)        -0.013962   0.052379 593.898162  -0.267     0.79    
## avg_satisf         -0.185897   0.044290 630.507469  -4.197 3.09e-05 ***
## satisf_diff        -0.021074   0.079222 559.518103  -0.266     0.79    
## zygMZ              -0.008143   0.071651 627.015829  -0.114     0.91    
## satisf_diff:zygMZ  -0.072475   0.107354 535.755867  -0.675     0.50    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_st stsf_d zygMZ 
## avg_satisf   0.194                     
## satisf_diff  0.152  0.027              
## zygMZ       -0.711 -0.058 -0.107       
## stsf_dff:MZ -0.114 -0.021 -0.740  0.138
out<- satisf_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Satisfaction",
         sleep="Satisfaction",
         Psychiatric="Internalizing",
         model="Dummy MZ")

col_out<- rbind(col_out, out)

satisf_int_DZ<- lmer(INT_resid~avg_satisf+satisf_diff+zygDZ+zygDZ*satisf_diff+(1|family), data=dat)
summary(satisf_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_satisf + satisf_diff + zygDZ + zygDZ * satisf_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2320.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.25803 -0.65569  0.02182  0.65536  2.65216 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1467   0.3831  
##  Residual             0.8212   0.9062  
## Number of obs: 824, groups:  family, 605
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)        -0.022104   0.050413 630.225809  -0.438    0.661    
## avg_satisf         -0.185897   0.044290 630.507469  -4.197 3.09e-05 ***
## satisf_diff        -0.093549   0.072197 485.417033  -1.296    0.196    
## zygDZ               0.008143   0.071651 627.015829   0.114    0.910    
## satisf_diff:zygDZ   0.072475   0.107354 535.755867   0.675    0.500    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_st stsf_d zygDZ 
## avg_satisf   0.120                     
## satisf_diff  0.122 -0.002              
## zygDZ       -0.683  0.058 -0.088       
## stsf_dff:DZ -0.078  0.021 -0.675  0.138
out<- satisf_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Satisfaction",
         sleep="Satisfaction",
         Psychiatric="Internalizing",
         model="Dummy DZ")

col_out<- rbind(col_out, out)

weekend duration

# weekend duration

weekend_dur_int_pheno<- lmer(INT_resid~weekend_dur+(1|family), data=dat)
summary(weekend_dur_int_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ weekend_dur + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 1818.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0360 -0.6272  0.0215  0.6060  2.1402 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2573   0.5072  
##  Residual             0.7235   0.8506  
## Number of obs: 646, groups:  family, 514
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)  -0.01176    0.04107 504.54740  -0.286    0.775
## weekend_dur  -0.02017    0.03475 642.86233  -0.580    0.562
## 
## Correlation of Fixed Effects:
##             (Intr)
## weekend_dur 0.111
out<- weekend_dur_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Phenotypic")

col_out<- rbind(col_out, out)


weekend_dur_int<- lmer(INT_resid~avg_weekend_dur+weekend_dur_diff+(1|family), data=dat)
summary(weekend_dur_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekend_dur + weekend_dur_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 1821.5
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.03432 -0.62735  0.02152  0.60601  2.14049 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2566   0.5065  
##  Residual             0.7256   0.8518  
## Number of obs: 646, groups:  family, 514
## 
## Fixed effects:
##                   Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)       -0.01173    0.04116 502.47708  -0.285    0.776
## avg_weekend_dur   -0.02008    0.04274 562.83184  -0.470    0.639
## weekend_dur_diff  -0.02031    0.06237 337.69125  -0.326    0.745
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wknd_dr  0.124       
## wknd_dr_dff  0.014 -0.029
anova(weekend_dur_int_pheno,weekend_dur_int)
## refitting model(s) with ML (instead of REML)
## Data: dat
## Models:
## weekend_dur_int_pheno: INT_resid ~ weekend_dur + (1 | family)
## weekend_dur_int: INT_resid ~ avg_weekend_dur + weekend_dur_diff + (1 | family)
##                       npar    AIC    BIC  logLik deviance Chisq Df Pr(>Chisq)
## weekend_dur_int_pheno    4 1816.7 1834.6 -904.37   1808.7                    
## weekend_dur_int          5 1818.7 1841.1 -904.37   1808.7     0  1     0.9977
weekend_dur_int_zyg<- lmer(INT_resid~avg_weekend_dur+weekend_dur_diff+zyg+zyg*weekend_dur_diff+(1|family), data=dat)
summary(weekend_dur_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekend_dur + weekend_dur_diff + zyg + zyg *  
##     weekend_dur_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 1823.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.03034 -0.63891  0.02638  0.61539  2.15762 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2582   0.5081  
##  Residual             0.7266   0.8524  
## Number of obs: 645, groups:  family, 513
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)           -0.013003   0.041260 499.847134  -0.315    0.753
## avg_weekend_dur       -0.019064   0.042907 561.613689  -0.444    0.657
## weekend_dur_diff      -0.002501   0.064909 327.768914  -0.039    0.969
## zyg                   -0.008321   0.081372 538.900478  -0.102    0.919
## weekend_dur_diff:zyg   0.106223   0.129932 331.589538   0.818    0.414
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_ wknd__ zyg   
## avg_wknd_dr  0.121                     
## wknd_dr_dff  0.011 -0.026              
## zyg          0.018 -0.066  0.008       
## wknd_dr_df:  0.003  0.002  0.264  0.016
out<- weekend_dur_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Between Within")

col_out<- rbind(col_out, out)

weekend_dur_int_MZ<- lmer(INT_resid~avg_weekend_dur+weekend_dur_diff+zygMZ+zygMZ*weekend_dur_diff+(1|family), data=dat)
summary(weekend_dur_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekend_dur + weekend_dur_diff + zygMZ + zygMZ *  
##     weekend_dur_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 1823.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.03034 -0.63891  0.02638  0.61539  2.15762 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2582   0.5081  
##  Residual             0.7266   0.8524  
## Number of obs: 645, groups:  family, 513
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)             -0.017164   0.058456 525.795560  -0.294    0.769
## avg_weekend_dur         -0.019064   0.042907 561.613689  -0.444    0.657
## weekend_dur_diff         0.050611   0.103241 322.824071   0.490    0.624
## zygMZ                    0.008321   0.081372 538.900478   0.102    0.919
## weekend_dur_diff:zygMZ  -0.106223   0.129932 331.589538  -0.818    0.414
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_ wknd__ zygMZ 
## avg_wknd_dr  0.040                     
## wknd_dr_dff  0.017 -0.016              
## zygMZ       -0.708  0.066 -0.015       
## wknd_dr_:MZ -0.013 -0.002 -0.795  0.016
out<- weekend_dur_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy MZ")

col_out<- rbind(col_out, out)

weekend_dur_int_DZ<- lmer(INT_resid~avg_weekend_dur+weekend_dur_diff+zygDZ+zygDZ*weekend_dur_diff+(1|family), data=dat)
summary(weekend_dur_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekend_dur + weekend_dur_diff + zygDZ + zygDZ *  
##     weekend_dur_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 1823.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.03034 -0.63891  0.02638  0.61539  2.15762 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2582   0.5081  
##  Residual             0.7266   0.8524  
## Number of obs: 645, groups:  family, 513
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)             -0.008843   0.057432 512.603238  -0.154    0.878
## avg_weekend_dur         -0.019064   0.042907 561.613689  -0.444    0.657
## weekend_dur_diff        -0.055612   0.078796 341.765256  -0.706    0.481
## zygDZ                   -0.008321   0.081372 538.900478  -0.102    0.919
## weekend_dur_diff:zygDZ   0.106223   0.129932 331.589538   0.818    0.414
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_ wknd__ zygDZ 
## avg_wknd_dr  0.134                     
## wknd_dr_dff  0.010 -0.023              
## zygDZ       -0.696 -0.066 -0.007       
## wknd_dr_:DZ -0.009  0.002 -0.607  0.016
out<- weekend_dur_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy DZ")

col_out<- rbind(col_out, out)

weekday duration

# weekday duration
weekday_dur_int_pheno<- lmer(INT_resid~weekday_dur+(1|family), data=dat)
summary(weekday_dur_int_pheno) ## NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ weekday_dur + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2466.5
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.20270 -0.63883  0.00684  0.66145  2.58429 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1697   0.4120  
##  Residual             0.8333   0.9128  
## Number of obs: 868, groups:  family, 630
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)  -0.01360    0.03582 608.79003  -0.380    0.704
## weekday_dur  -0.02894    0.03061 864.79284  -0.946    0.345
## 
## Correlation of Fixed Effects:
##             (Intr)
## weekday_dur 0.133
out<- weekday_dur_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Phenotypic")

col_out<- rbind(col_out, out)


weekday_dur_int<- lmer(INT_resid~avg_weekday_dur+weekday_dur_diff+(1|family), data=dat)
summary(weekday_dur_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekday_dur + weekday_dur_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2470.1
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.21078 -0.63574  0.00454  0.66712  2.58366 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1699   0.4122  
##  Residual             0.8342   0.9133  
## Number of obs: 868, groups:  family, 630
## 
## Fixed effects:
##                   Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)       -0.01403    0.03590 604.61803  -0.391    0.696
## avg_weekday_dur   -0.03500    0.04210 617.43553  -0.831    0.406
## weekday_dur_diff  -0.02150    0.04692 475.58949  -0.458    0.647
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wkdy_dr  0.136       
## wkdy_dr_dff  0.044 -0.045
anova(weekday_dur_int_pheno,weekday_dur_int)
## refitting model(s) with ML (instead of REML)
## Data: dat
## Models:
## weekday_dur_int_pheno: INT_resid ~ weekday_dur + (1 | family)
## weekday_dur_int: INT_resid ~ avg_weekday_dur + weekday_dur_diff + (1 | family)
##                       npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## weekday_dur_int_pheno    4 2464.6 2483.6 -1228.3   2456.6                     
## weekday_dur_int          5 2466.5 2490.3 -1228.3   2456.5 0.0439  1     0.8341
weekday_dur_int_zyg<- lmer(INT_resid~avg_weekday_dur+weekday_dur_diff+zyg+weekday_dur_diff*zyg+(1|family), data=dat)
summary(weekday_dur_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_weekday_dur + weekday_dur_diff + zyg + weekday_dur_diff *  
##     zyg + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2468.3
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.13701 -0.63600  0.02837  0.65850  2.69363 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1693   0.4115  
##  Residual             0.8342   0.9133  
## Number of obs: 866, groups:  family, 629
## 
## Fixed effects:
##                       Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)           -0.01343    0.03595 602.26963  -0.374   0.7087  
## avg_weekday_dur       -0.03141    0.04215 616.67975  -0.745   0.4565  
## weekday_dur_diff      -0.01412    0.04709 474.68160  -0.300   0.7644  
## zyg                    0.03507    0.07094 637.78355   0.494   0.6212  
## weekday_dur_diff:zyg   0.16235    0.09471 505.53236   1.714   0.0871 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_ wkdy__ zyg   
## avg_wkdy_dr  0.135                     
## wkdy_dr_dff  0.046 -0.043              
## zyg          0.029 -0.025  0.033       
## wkdy_dr_df:  0.030  0.031  0.074  0.052
out<- weekday_dur_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Between Within")

col_out<- rbind(col_out, out)


weekday_dur_int_MZ<- lmer(INT_resid~avg_weekday_dur+weekday_dur_diff+zygMZ+weekday_dur_diff*zygMZ+(1|family), data=dat)
summary(weekday_dur_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_weekday_dur + weekday_dur_diff + zygMZ + weekday_dur_diff *  
##     zygMZ + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2468.3
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.13701 -0.63600  0.02837  0.65850  2.69363 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1693   0.4115  
##  Residual             0.8342   0.9133  
## Number of obs: 866, groups:  family, 629
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)              0.004103   0.051229 605.918025   0.080   0.9362  
## avg_weekday_dur         -0.031408   0.042150 616.679752  -0.745   0.4565  
## weekday_dur_diff         0.067055   0.069214 500.267571   0.969   0.3331  
## zygMZ                   -0.035074   0.070941 637.783549  -0.494   0.6212  
## weekday_dur_diff:zygMZ  -0.162349   0.094711 505.532364  -1.714   0.0871 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_ wkdy__ zygMZ 
## avg_wkdy_dr  0.077                     
## wkdy_dr_dff  0.076 -0.008              
## zygMZ       -0.713  0.025 -0.058       
## wkdy_dr_:MZ -0.057 -0.031 -0.735  0.052
out<- weekday_dur_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy MZ")

col_out<- rbind(col_out, out)


weekday_dur_int_DZ<- lmer(INT_resid~avg_weekday_dur+weekday_dur_diff+zygDZ+weekday_dur_diff*zygDZ+(1|family), data=dat)
summary(weekday_dur_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_weekday_dur + weekday_dur_diff + zygDZ + weekday_dur_diff *  
##     zygDZ + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2468.3
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.13701 -0.63600  0.02837  0.65850  2.69363 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1693   0.4115  
##  Residual             0.8342   0.9133  
## Number of obs: 866, groups:  family, 629
## 
## Fixed effects:
##                         Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)             -0.03097    0.04976 634.45294  -0.622   0.5339  
## avg_weekday_dur         -0.03141    0.04215 616.67975  -0.745   0.4565  
## weekday_dur_diff        -0.09529    0.06426 478.29103  -1.483   0.1387  
## zygDZ                    0.03507    0.07094 637.78355   0.494   0.6212  
## weekday_dur_diff:zygDZ   0.16235    0.09471 505.53236   1.714   0.0871 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_ wkdy__ zygDZ 
## avg_wkdy_dr  0.115                     
## wkdy_dr_dff  0.018 -0.054              
## zygDZ       -0.692 -0.025 -0.014       
## wkdy_dr_:DZ -0.015  0.031 -0.683  0.052
out<- weekday_dur_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy DZ")

col_out<- rbind(col_out, out)

alertness

# alertness 
alertness_int_pheno<- lmer(INT_resid~total_alertness+(1|family), data=dat)
summary(alertness_int_pheno)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ total_alertness + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2497.2
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.16967 -0.66525  0.01919  0.67470  2.48863 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1542   0.3926  
##  Residual             0.8408   0.9169  
## Number of obs: 881, groups:  family, 635
## 
## Fixed effects:
##                   Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)      -0.009938   0.035106 606.540008  -0.283   0.7772  
## total_alertness  -0.068799   0.032675 878.955927  -2.106   0.0355 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## totl_lrtnss 0.073
out<- alertness_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Alertness",
         sleep="Alertness",
         Psychiatric="Internalizing",
         model="Phenotypic")

col_out<- rbind(col_out, out)

alertness_int<- lmer(INT_resid~avg_alertness+alertness_diff+(1|family), data=dat)
summary(alertness_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_alertness + alertness_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2498.5
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.17598 -0.66299  0.02227  0.65645  2.54371 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1518   0.3897  
##  Residual             0.8415   0.9173  
## Number of obs: 881, groups:  family, 635
## 
## Fixed effects:
##                 Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)     -0.01244    0.03510 604.71402  -0.354   0.7233  
## avg_alertness   -0.11206    0.04355 621.56914  -2.573   0.0103 *
## alertness_diff  -0.01208    0.04998 501.94387  -0.242   0.8091  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_lr
## avg_alrtnss  0.087       
## alrtnss_dff  0.011 -0.011
anova(alertness_int_pheno,alertness_int)
## refitting model(s) with ML (instead of REML)
## Data: dat
## Models:
## alertness_int_pheno: INT_resid ~ total_alertness + (1 | family)
## alertness_int: INT_resid ~ avg_alertness + alertness_diff + (1 | family)
##                     npar    AIC    BIC  logLik deviance Chisq Df Pr(>Chisq)
## alertness_int_pheno    4 2495.3 2514.5 -1243.7   2487.3                    
## alertness_int          5 2495.1 2519.0 -1242.5   2485.1 2.254  1     0.1333
alertness_int_zyg<- lmer(INT_resid~avg_alertness+alertness_diff+zyg+zyg*alertness_diff+(1|family), data=dat)
summary(alertness_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_alertness + alertness_diff + zyg + zyg * alertness_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2498.8
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.16794 -0.66094  0.02024  0.65348  2.56869 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1477   0.3843  
##  Residual             0.8472   0.9204  
## Number of obs: 879, groups:  family, 634
## 
## Fixed effects:
##                     Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)         -0.01442    0.03515 602.55798  -0.410    0.682  
## avg_alertness       -0.11254    0.04357 619.05485  -2.583    0.010 *
## alertness_diff      -0.02390    0.05163 500.76318  -0.463    0.644  
## zyg                  0.01831    0.06972 647.54417   0.263    0.793  
## alertness_diff:zyg  -0.07978    0.10356 520.56731  -0.770    0.441  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_lr alrtn_ zyg   
## avg_alrtnss  0.088                     
## alrtnss_dff  0.015 -0.009              
## zyg          0.033  0.030  0.015       
## alrtnss_df:  0.012  0.005  0.237  0.017
out<- alertness_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Alertness",
         sleep="Alertness",
         Psychiatric="Internalizing",
         model="Between Within")

col_out<- rbind(col_out, out)

alertness_int_MZ<- lmer(INT_resid~avg_alertness+alertness_diff+zygMZ+zygMZ*alertness_diff+(1|family), data=dat)
summary(alertness_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_alertness + alertness_diff + zygMZ + zygMZ *  
##     alertness_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2498.8
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.16794 -0.66094  0.02024  0.65348  2.56869 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1477   0.3843  
##  Residual             0.8472   0.9204  
## Number of obs: 879, groups:  family, 634
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)           -0.005267   0.050312 611.280376  -0.105    0.917  
## avg_alertness         -0.112545   0.043568 619.054854  -2.583    0.010 *
## alertness_diff        -0.063788   0.081311 510.662126  -0.784    0.433  
## zygMZ                 -0.018311   0.069716 647.544173  -0.263    0.793  
## alertness_diff:zygMZ   0.079775   0.103561 520.567309   0.770    0.441  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_lr alrtn_ zygMZ 
## avg_alrtnss  0.083                     
## alrtnss_dff  0.026 -0.002              
## zygMZ       -0.716 -0.030 -0.020       
## alrtnss_:MZ -0.020 -0.005 -0.787  0.017
out<- alertness_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Alertness",
         sleep="Alertness",
         Psychiatric="Internalizing",
         model="Dummy MZ")

col_out<- rbind(col_out, out)

alertness_int_DZ<- lmer(INT_resid~avg_alertness+alertness_diff+zygDZ+zygDZ*alertness_diff+(1|family), data=dat)
summary(alertness_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_alertness + alertness_diff + zygDZ + zygDZ *  
##     alertness_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2498.8
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.16794 -0.66094  0.02024  0.65348  2.56869 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1477   0.3843  
##  Residual             0.8472   0.9204  
## Number of obs: 879, groups:  family, 634
## 
## Fixed effects:
##                       Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)           -0.02358    0.04869 639.23603  -0.484    0.628  
## avg_alertness         -0.11254    0.04357 619.05485  -2.583    0.010 *
## alertness_diff         0.01599    0.06389 510.54559   0.250    0.803  
## zygDZ                  0.01831    0.06972 647.54417   0.263    0.793  
## alertness_diff:zygDZ  -0.07978    0.10356 520.56731  -0.770    0.441  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_lr alrtn_ zygDZ 
## avg_alrtnss  0.042                     
## alrtnss_dff  0.003 -0.011              
## zygDZ       -0.692  0.030 -0.001       
## alrtnss_:DZ -0.003  0.005 -0.619  0.017
out<- alertness_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Alertness",
         sleep="Alertness",
         Psychiatric="Internalizing",
         model="Dummy DZ")

col_out<- rbind(col_out, out)

chronotype

# chrono 
chrono_int_pheno<- lmer(INT_resid~total_meq+(1|family), data=dat)
summary(chrono_int_pheno)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ total_meq + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2500.9
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.17198 -0.64944  0.02028  0.66973  2.55691 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1463   0.3825  
##  Residual             0.8471   0.9204  
## Number of obs: 881, groups:  family, 635
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)   0.38603    0.17422 841.63027   2.216   0.0270 *
## total_meq    -0.00805    0.00352 850.30815  -2.287   0.0224 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##           (Intr)
## total_meq -0.980
out<- chrono_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Internalizing",
         model="Phenotypic")

col_out<- rbind(col_out, out)

chrono_int<- lmer(INT_resid~avg_meq+meq_diff+(1|family), data=dat)
summary(chrono_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_meq + meq_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2508.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.15030 -0.65079  0.01626  0.65438  2.54576 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1468   0.3832  
##  Residual             0.8475   0.9206  
## Number of obs: 881, groups:  family, 635
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)   0.434848   0.213421 628.149493   2.038   0.0420 *
## avg_meq      -0.009035   0.004309 634.297962  -2.096   0.0364 *
## meq_diff     -0.006088   0.006062 585.133566  -1.004   0.3156  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##          (Intr) avg_mq
## avg_meq  -0.986       
## meq_diff  0.005  0.006
anova(chrono_int_pheno,chrono_int)
## refitting model(s) with ML (instead of REML)
## Data: dat
## Models:
## chrono_int_pheno: INT_resid ~ total_meq + (1 | family)
## chrono_int: INT_resid ~ avg_meq + meq_diff + (1 | family)
##                  npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## chrono_int_pheno    4 2494.6 2513.7 -1243.3   2486.6                     
## chrono_int          5 2496.4 2520.3 -1243.2   2486.4 0.1578  1     0.6912
chrono_int_zyg<- lmer(INT_resid~avg_meq+meq_diff+zyg+zyg*meq_diff+(1|family), data=dat)
summary(chrono_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_meq + meq_diff + zyg + zyg * meq_diff + (1 |  
##     family)
##    Data: dat
## 
## REML criterion at convergence: 2511.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.17950 -0.63906  0.02351  0.66436  2.59925 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1440   0.3795  
##  Residual             0.8503   0.9221  
## Number of obs: 879, groups:  family, 634
## 
## Fixed effects:
##                Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)    0.444335   0.213469 624.383272   2.081   0.0378 *
## avg_meq       -0.009239   0.004312 630.509540  -2.142   0.0325 *
## meq_diff      -0.004848   0.006115 558.597124  -0.793   0.4282  
## zyg            0.030000   0.069751 646.676633   0.430   0.6673  
## meq_diff:zyg   0.017464   0.012270 583.215183   1.423   0.1552  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_mq mq_dff zyg   
## avg_meq     -0.986                     
## meq_diff     0.005  0.006              
## zyg          0.001  0.004  0.023       
## meq_dff:zyg -0.008  0.012  0.122  0.064
out<- chrono_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Internalizing",
         model="Between Within")

col_out<- rbind(col_out, out)

chrono_int_MZ<- lmer(INT_resid~avg_meq+meq_diff+zygMZ+zygMZ*meq_diff+(1|family), data=dat)
summary(chrono_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_meq + meq_diff + zygMZ + zygMZ * meq_diff + (1 |  
##     family)
##    Data: dat
## 
## REML criterion at convergence: 2511.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.17950 -0.63906  0.02351  0.66436  2.59925 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1440   0.3795  
##  Residual             0.8503   0.9221  
## Number of obs: 879, groups:  family, 634
## 
## Fixed effects:
##                  Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)      0.459335   0.216349 631.798042   2.123   0.0341 *
## avg_meq         -0.009239   0.004312 630.509539  -2.142   0.0325 *
## meq_diff         0.003884   0.009174 493.456243   0.423   0.6722  
## zygMZ           -0.030000   0.069751 646.676633  -0.430   0.6673  
## meq_diff:zygMZ  -0.017464   0.012270 583.215182  -1.423   0.1552  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_mq mq_dff zygMZ 
## avg_meq     -0.973                     
## meq_diff     0.007  0.012              
## zygMZ       -0.163 -0.004 -0.058       
## mq_dff:zyMZ -0.002 -0.012 -0.750  0.064
out<- chrono_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Internalizing",
         model="Dummy MZ")

col_out<- rbind(col_out, out)

chrono_int_DZ<- lmer(INT_resid~avg_meq+meq_diff+zygDZ+zygDZ*meq_diff+(1|family), data=dat)
summary(chrono_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_meq + meq_diff + zygDZ + zygDZ * meq_diff + (1 |  
##     family)
##    Data: dat
## 
## REML criterion at convergence: 2511.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.17950 -0.63906  0.02351  0.66436  2.59925 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1440   0.3795  
##  Residual             0.8503   0.9221  
## Number of obs: 879, groups:  family, 634
## 
## Fixed effects:
##                  Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)      0.429335   0.216250 618.135845   1.985   0.0475 *
## avg_meq         -0.009239   0.004312 630.509531  -2.142   0.0325 *
## meq_diff        -0.013580   0.008118 677.942308  -1.673   0.0948 .
## zygDZ            0.030000   0.069751 646.676634   0.430   0.6673  
## meq_diff:zygDZ   0.017464   0.012270 583.215189   1.423   0.1552  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_mq mq_dff zygDZ 
## avg_meq     -0.974                     
## meq_diff     0.015 -0.005              
## zygDZ       -0.160  0.004 -0.031       
## mq_dff:zyDZ -0.018  0.012 -0.664  0.064
out<- chrono_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Internalizing",
         model="Dummy DZ")

col_out<- rbind(col_out, out)

insomnia

# insom

insom_int_pheno<- lmer(INT_resid~insom + (1|family), data=dat)
summary(insom_int_pheno)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ insom + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2464.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.20505 -0.64305 -0.01324  0.67939  2.63702 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1377   0.3710  
##  Residual             0.8290   0.9105  
## Number of obs: 878, groups:  family, 635
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)  -0.04649    0.03542 618.90946  -1.313     0.19    
## insom         0.15418    0.02888 875.63839   5.338  1.2e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##       (Intr)
## insom -0.231
out<- insom_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Insomnia",
         sleep="Insomnia",
         Psychiatric="Internalizing",
         model="Phenotypic")

col_out<- rbind(col_out, out)

insom_int<- lmer(INT_resid~avg_insom+insom_diff+(1|family), data=dat)
summary(insom_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_insom + insom_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2467.1
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.25923 -0.64374 -0.00273  0.69035  2.65341 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1363   0.3691  
##  Residual             0.8299   0.9110  
## Number of obs: 878, groups:  family, 635
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)  -0.04949    0.03549 611.52481  -1.394   0.1637    
## avg_insom     0.18400    0.03855 642.01783   4.772 2.25e-06 ***
## insom_diff    0.11191    0.04635 513.43267   2.414   0.0161 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr) avg_ns
## avg_insom  -0.221       
## insom_diff -0.086 -0.052
anova(insom_int_pheno,insom_int)
## refitting model(s) with ML (instead of REML)
## Data: dat
## Models:
## insom_int_pheno: INT_resid ~ insom + (1 | family)
## insom_int: INT_resid ~ avg_insom + insom_diff + (1 | family)
##                 npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## insom_int_pheno    4 2462.6 2481.7 -1227.3   2454.6                     
## insom_int          5 2463.2 2487.1 -1226.6   2453.2 1.3644  1     0.2428
insom_int_zyg<- lmer(INT_resid~avg_insom+insom_diff+zyg+zyg*insom_diff+(1|family), data=dat)
summary(insom_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_insom + insom_diff + zyg + zyg * insom_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2466.8
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.25166 -0.64421 -0.00997  0.68601  2.65174 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1371   0.3702  
##  Residual             0.8301   0.9111  
## Number of obs: 876, groups:  family, 634
## 
## Fixed effects:
##                 Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)     -0.05138    0.03558 607.38894  -1.444   0.1492    
## avg_insom        0.18254    0.03866 639.64040   4.722 2.87e-06 ***
## insom_diff       0.11486    0.04666 507.75560   2.461   0.0142 *  
## zyg             -0.00206    0.06917 645.27142  -0.030   0.9762    
## insom_diff:zyg   0.13745    0.09329 513.23038   1.473   0.1413    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ns insm_d zyg   
## avg_insom   -0.222                     
## insom_diff  -0.085 -0.050              
## zyg          0.044 -0.057 -0.015       
## insm_dff:zy -0.018 -0.007  0.088 -0.098
out<- insom_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Insomnia",
         sleep="Insomnia",
         Psychiatric="Internalizing",
         model="Between Within")

col_out<- rbind(col_out, out)

insom_int_MZ<- lmer(INT_resid~avg_insom+insom_diff+zygMZ+zygMZ*insom_diff+(1|family), data=dat)
summary(insom_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_insom + insom_diff + zygMZ + zygMZ * insom_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2466.8
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.25166 -0.64421 -0.00997  0.68601  2.65174 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1371   0.3702  
##  Residual             0.8301   0.9111  
## Number of obs: 876, groups:  family, 634
## 
## Fixed effects:
##                   Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)       -0.05241    0.05069 612.29172  -1.034  0.30153    
## avg_insom          0.18254    0.03866 639.64040   4.722 2.87e-06 ***
## insom_diff         0.18359    0.06883 524.87593   2.667  0.00788 ** 
## zygMZ              0.00206    0.06917 645.27142   0.030  0.97625    
## insom_diff:zygMZ  -0.13745    0.09329 513.23038  -1.473  0.14125    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ns insm_d zygMZ 
## avg_insom   -0.195                     
## insom_diff  -0.101 -0.038              
## zygMZ       -0.713  0.057  0.076       
## insm_dff:MZ  0.079  0.007 -0.737 -0.098
out<- insom_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Insomnia",
         sleep="Insomnia",
         Psychiatric="Internalizing",
         model="Dummy MZ")

col_out<- rbind(col_out, out)

insom_int_DZ<- lmer(INT_resid~avg_insom+insom_diff+zygDZ+zygDZ*insom_diff+(1|family), data=dat)
summary(insom_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_insom + insom_diff + zygDZ + zygDZ * insom_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2466.8
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.25166 -0.64421 -0.00997  0.68601  2.65174 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.1371   0.3702  
##  Residual             0.8301   0.9111  
## Number of obs: 876, groups:  family, 634
## 
## Fixed effects:
##                   Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)       -0.05035    0.04852 640.47145  -1.038    0.300    
## avg_insom          0.18254    0.03866 639.64040   4.722 2.87e-06 ***
## insom_diff         0.04614    0.06300 493.72454   0.732    0.464    
## zygDZ             -0.00206    0.06917 645.27142  -0.030    0.976    
## insom_diff:zygDZ   0.13745    0.09329 513.23038   1.473    0.141    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ns insm_d zygDZ 
## avg_insom   -0.122                     
## insom_diff  -0.080 -0.032              
## zygDZ       -0.681 -0.057  0.061       
## insm_dff:DZ  0.056 -0.007 -0.675 -0.098
out<- insom_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Insomnia",
         sleep="Insomnia",
         Psychiatric="Internalizing",
         model="Dummy DZ")

col_out<- rbind(col_out, out)

externalizing

satisfaction

# satisfaction
satisf_ext_pheno<- lmer(EXT_resid~sleep_satisfaction+(1|family), data=dat)
summary(satisf_ext_pheno)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ sleep_satisfaction + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2526.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.14117 -0.66122 -0.02402  0.62103  2.31853 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2627   0.5125  
##  Residual             0.7380   0.8591  
## Number of obs: 894, groups:  family, 642
## 
## Fixed effects:
##                     Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)         -0.01823    0.03604 613.12580  -0.506   0.6131  
## sleep_satisfaction  -0.08509    0.03317 891.76428  -2.565   0.0105 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## slp_stsfctn 0.139
out<- satisf_ext_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Satisfaction",
         sleep="Satisfaction",
         Psychiatric="Externalizing",
         model="Phenotypic")

col_out<- rbind(col_out, out)


satisf_ext<- lmer(EXT_resid~avg_satisf+satisf_diff+(1|family), data=dat)
summary(satisf_ext)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_satisf + satisf_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2528.9
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.13693 -0.65055 -0.01632  0.62088  2.35209 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2632   0.5130  
##  Residual             0.7371   0.8586  
## Number of obs: 894, groups:  family, 642
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)   
## (Intercept)  -0.01974    0.03605 611.55095  -0.548  0.58414   
## avg_satisf   -0.11722    0.04275 648.24792  -2.742  0.00627 **
## satisf_diff  -0.03843    0.05130 489.21508  -0.749  0.45408   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_st
## avg_satisf  0.129        
## satisf_diff 0.064  0.020
anova(satisf_ext_pheno,satisf_ext)
## refitting model(s) with ML (instead of REML)
## Data: dat
## Models:
## satisf_ext_pheno: EXT_resid ~ sleep_satisfaction + (1 | family)
## satisf_ext: EXT_resid ~ avg_satisf + satisf_diff + (1 | family)
##                  npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## satisf_ext_pheno    4 2524.9 2544.1 -1258.5   2516.9                     
## satisf_ext          5 2525.5 2549.5 -1257.7   2515.5 1.4235  1     0.2328
satisf_ext_zyg<- lmer(EXT_resid~avg_satisf+satisf_diff+zyg+zyg*satisf_diff+(1|family), data=dat)
summary(satisf_ext_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_satisf + satisf_diff + zyg + zyg * satisf_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2532.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.15370 -0.65043 -0.01981  0.61586  2.32689 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2636   0.5134  
##  Residual             0.7396   0.8600  
## Number of obs: 893, groups:  family, 641
## 
## Fixed effects:
##                   Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)      -0.018447   0.036188 605.822140  -0.510  0.61041   
## avg_satisf       -0.116067   0.042844 647.023114  -2.709  0.00693 **
## satisf_diff      -0.037909   0.051506 485.889111  -0.736  0.46209   
## zyg               0.046478   0.071256 644.451614   0.652  0.51446   
## satisf_diff:zyg   0.006891   0.103071 486.863686   0.067  0.94672   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_st stsf_d zyg  
## avg_satisf  0.130                     
## satisf_diff 0.064  0.021              
## zyg         0.061  0.035  0.010       
## stsf_dff:zy 0.009  0.003  0.069  0.064
out<- satisf_ext_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Satisfaction",
         sleep="Satisfaction",
         Psychiatric="Externalizing",
         model="Between Within")

col_out<- rbind(col_out, out)

satisf_ext_MZ<- lmer(EXT_resid~avg_satisf+satisf_diff+zygMZ+zygMZ*satisf_diff+(1|family), data=dat)
summary(satisf_ext_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_satisf + satisf_diff + zygMZ + zygMZ * satisf_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2532.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.15370 -0.65043 -0.01981  0.61586  2.32689 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2636   0.5134  
##  Residual             0.7396   0.8600  
## Number of obs: 893, groups:  family, 641
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)         0.004792   0.052314 595.508635   0.092  0.92705   
## avg_satisf         -0.116067   0.042844 647.023114  -2.709  0.00693 **
## satisf_diff        -0.034463   0.075330 472.359974  -0.457  0.64752   
## zygMZ              -0.046478   0.071256 644.451614  -0.652  0.51446   
## satisf_diff:zygMZ  -0.006891   0.103071 486.863686  -0.067  0.94672   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_st stsf_d zygMZ 
## avg_satisf   0.114                     
## satisf_diff  0.069  0.016              
## zygMZ       -0.723 -0.035 -0.050       
## stsf_dff:MZ -0.050 -0.003 -0.731  0.064
out<- satisf_ext_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Satisfaction",
         sleep="Satisfaction",
         Psychiatric="Externalizing",
         model="Dummy MZ")

col_out<- rbind(col_out, out)

satisf_ext_DZ<- lmer(EXT_resid~avg_satisf+satisf_diff+zygDZ+zygDZ*satisf_diff+(1|family), data=dat)
summary(satisf_ext_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_satisf + satisf_diff + zygDZ + zygDZ * satisf_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2532.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.15370 -0.65043 -0.01981  0.61586  2.32689 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2636   0.5134  
##  Residual             0.7396   0.8600  
## Number of obs: 893, groups:  family, 641
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)        -0.041686   0.049205 658.291607  -0.847  0.39719   
## avg_satisf         -0.116067   0.042844 647.023114  -2.709  0.00693 **
## satisf_diff        -0.041354   0.070307 502.923823  -0.588  0.55666   
## zygDZ               0.046478   0.071256 644.451614   0.652  0.51446   
## satisf_diff:zygDZ   0.006891   0.103071 486.863686   0.067  0.94672   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_st stsf_d zygDZ 
## avg_satisf   0.070                     
## satisf_diff  0.058  0.013              
## zygDZ       -0.679  0.035 -0.039       
## stsf_dff:DZ -0.040  0.003 -0.683  0.064
out<- satisf_ext_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Satisfaction",
         sleep="Satisfaction",
         Psychiatric="Externalizing",
         model="Dummy DZ")

col_out<- rbind(col_out, out)

weekend duration

# weekend duration

weekend_dur_ext_pheno<- lmer(EXT_resid~weekend_dur+(1|family), data=dat)
summary(weekend_dur_ext_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ weekend_dur + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2040.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.97233 -0.65387 -0.05305  0.66820  2.28146 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2588   0.5087  
##  Residual             0.7614   0.8726  
## Number of obs: 715, groups:  family, 562
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)  -0.048074   0.039721 528.768985  -1.210    0.227
## weekend_dur  -0.006897   0.034280 712.999739  -0.201    0.841
## 
## Correlation of Fixed Effects:
##             (Intr)
## weekend_dur 0.089
out<- weekend_dur_ext_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Phenotypic")

col_out<- rbind(col_out, out)


weekend_dur_ext<- lmer(EXT_resid~avg_weekend_dur+weekend_dur_diff+(1|family), data=dat)
summary(weekend_dur_ext)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekend_dur + weekend_dur_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2042
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.95017 -0.65068 -0.04906  0.64403  2.30019 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2571   0.5070  
##  Residual             0.7619   0.8728  
## Number of obs: 715, groups:  family, 562
## 
## Fixed effects:
##                   Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)       -0.04950    0.03971 527.24819  -1.247    0.213
## avg_weekend_dur   -0.03851    0.04180 584.48321  -0.921    0.357
## weekend_dur_diff   0.06177    0.06236 331.80180   0.991    0.323
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wknd_dr  0.089       
## wknd_dr_dff  0.025 -0.028
anova(weekend_dur_ext_pheno,weekend_dur_ext)
## refitting model(s) with ML (instead of REML)
## Data: dat
## Models:
## weekend_dur_ext_pheno: EXT_resid ~ weekend_dur + (1 | family)
## weekend_dur_ext: EXT_resid ~ avg_weekend_dur + weekend_dur_diff + (1 | family)
##                       npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## weekend_dur_ext_pheno    4 2038.9 2057.2 -1015.4   2030.9                     
## weekend_dur_ext          5 2039.1 2062.0 -1014.6   2029.1 1.7435  1     0.1867
weekend_dur_ext_zyg<- lmer(EXT_resid~avg_weekend_dur+weekend_dur_diff+zyg+zyg*weekend_dur_diff+(1|family), data=dat)
summary(weekend_dur_ext_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekend_dur + weekend_dur_diff + zyg + zyg *  
##     weekend_dur_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2046.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.95679 -0.64754 -0.03161  0.64949  2.30929 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2542   0.5042  
##  Residual             0.7659   0.8752  
## Number of obs: 715, groups:  family, 562
## 
## Fixed effects:
##                       Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)           -0.04697    0.03979 524.31584  -1.180    0.238
## avg_weekend_dur       -0.03960    0.04184 584.54456  -0.946    0.344
## weekend_dur_diff       0.07091    0.06450 323.62470   1.099    0.272
## zyg                    0.06534    0.07892 556.68962   0.828    0.408
## weekend_dur_diff:zyg   0.06573    0.12946 337.15939   0.508    0.612
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_ wknd__ zyg   
## avg_wknd_dr  0.087                     
## wknd_dr_dff  0.031 -0.026              
## zyg          0.059 -0.035  0.027       
## wknd_dr_df:  0.025  0.007  0.247  0.032
out<- weekend_dur_ext_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Between Within")

col_out<- rbind(col_out, out)

weekend_dur_ext_MZ<- lmer(EXT_resid~avg_weekend_dur+weekend_dur_diff+zygMZ+zygMZ*weekend_dur_diff+(1|family), data=dat)
summary(weekend_dur_ext_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekend_dur + weekend_dur_diff + zygMZ + zygMZ *  
##     weekend_dur_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2046.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.95679 -0.64754 -0.03161  0.64949  2.30929 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2542   0.5042  
##  Residual             0.7659   0.8752  
## Number of obs: 715, groups:  family, 562
## 
## Fixed effects:
##                         Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)             -0.01430    0.05766 526.93607  -0.248    0.804
## avg_weekend_dur         -0.03960    0.04184 584.54456  -0.946    0.344
## weekend_dur_diff         0.10377    0.10204 318.15006   1.017    0.310
## zygMZ                   -0.06534    0.07892 556.68962  -0.828    0.408
## weekend_dur_diff:zygMZ  -0.06573    0.12946 337.15939  -0.508    0.612
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_ wknd__ zygMZ 
## avg_wknd_dr  0.036                     
## wknd_dr_dff  0.050 -0.012              
## zygMZ       -0.725  0.035 -0.038       
## wknd_dr_:MZ -0.039 -0.007 -0.790  0.032
out<- weekend_dur_ext_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy MZ")

col_out<- rbind(col_out, out)

weekend_dur_ext_DZ<- lmer(EXT_resid~avg_weekend_dur+weekend_dur_diff+zygDZ+zygDZ*weekend_dur_diff+(1|family), data=dat)
summary(weekend_dur_ext_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekend_dur + weekend_dur_diff + zygDZ + zygDZ *  
##     weekend_dur_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2046.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.95679 -0.64754 -0.03161  0.64949  2.30929 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2542   0.5042  
##  Residual             0.7659   0.8752  
## Number of obs: 715, groups:  family, 562
## 
## Fixed effects:
##                         Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)             -0.07963    0.05437 555.48495  -1.465    0.144
## avg_weekend_dur         -0.03960    0.04184 584.54456  -0.946    0.344
## weekend_dur_diff         0.03804    0.07929 351.63546   0.480    0.632
## zygDZ                    0.06534    0.07892 556.68962   0.828    0.408
## weekend_dur_diff:zygDZ   0.06573    0.12946 337.15939   0.508    0.612
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_ wknd__ zygDZ 
## avg_wknd_dr  0.089                     
## wknd_dr_dff  0.007 -0.027              
## zygDZ       -0.683 -0.035 -0.004       
## wknd_dr_:DZ -0.005  0.007 -0.615  0.032
out<- weekend_dur_ext_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy DZ")

col_out<- rbind(col_out, out)

weekday duration

# weekday duration
weekday_dur_ext_pheno<- lmer(EXT_resid~weekday_dur+(1|family), data=dat)
summary(weekday_dur_ext_pheno) ## NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ weekday_dur + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2689.5
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.09660 -0.65357 -0.03686  0.62579  2.40788 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2484   0.4984  
##  Residual             0.7559   0.8694  
## Number of obs: 950, groups:  family, 666
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)  -0.021266   0.034815 622.387290  -0.611    0.542
## weekday_dur   0.007801   0.029849 938.637919   0.261    0.794
## 
## Correlation of Fixed Effects:
##             (Intr)
## weekday_dur 0.079
out<- weekday_dur_ext_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Phenotypic")

col_out<- rbind(col_out, out)


weekday_dur_ext<- lmer(EXT_resid~avg_weekday_dur+weekday_dur_diff+(1|family), data=dat)
summary(weekday_dur_ext)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekday_dur + weekday_dur_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2692.2
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.13539 -0.65035 -0.03949  0.62831  2.38410 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2502   0.5002  
##  Residual             0.7544   0.8686  
## Number of obs: 950, groups:  family, 666
## 
## Fixed effects:
##                   Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)       -0.02220    0.03484 620.79885  -0.637    0.524
## avg_weekday_dur   -0.02074    0.04131 647.12839  -0.502    0.616
## weekday_dur_diff   0.03973    0.04369 470.62440   0.909    0.364
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wkdy_dr  0.073       
## wkdy_dr_dff  0.037 -0.011
anova(weekday_dur_ext_pheno,weekday_dur_ext)
## refitting model(s) with ML (instead of REML)
## Data: dat
## Models:
## weekday_dur_ext_pheno: EXT_resid ~ weekday_dur + (1 | family)
## weekday_dur_ext: EXT_resid ~ avg_weekday_dur + weekday_dur_diff + (1 | family)
##                       npar    AIC    BIC  logLik deviance Chisq Df Pr(>Chisq)
## weekday_dur_ext_pheno    4 2687.4 2706.8 -1339.7   2679.4                    
## weekday_dur_ext          5 2688.4 2712.7 -1339.2   2678.4 1.001  1     0.3171
weekday_dur_ext_zyg<- lmer(EXT_resid~avg_weekday_dur+weekday_dur_diff+zyg+weekday_dur_diff*zyg+(1|family), data=dat)
summary(weekday_dur_ext_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_weekday_dur + weekday_dur_diff + zyg + weekday_dur_diff *  
##     zyg + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2696.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.15677 -0.64608 -0.03938  0.61902  2.36283 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2504   0.5004  
##  Residual             0.7567   0.8699  
## Number of obs: 949, groups:  family, 665
## 
## Fixed effects:
##                       Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)           -0.02078    0.03499 614.38630  -0.594    0.553
## avg_weekday_dur       -0.01970    0.04139 645.79910  -0.476    0.634
## weekday_dur_diff       0.04063    0.04400 464.69887   0.924    0.356
## zyg                    0.04528    0.06928 666.43236   0.654    0.514
## weekday_dur_diff:zyg   0.01635    0.08861 488.69493   0.185    0.854
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_ wkdy__ zyg   
## avg_wkdy_dr  0.074                     
## wkdy_dr_dff  0.038 -0.010              
## zyg          0.071  0.024  0.006       
## wkdy_dr_df:  0.005  0.012  0.105  0.035
out<- weekday_dur_ext_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Between Within")

col_out<- rbind(col_out, out)


weekday_dur_ext_MZ<- lmer(EXT_resid~avg_weekday_dur+weekday_dur_diff+zygMZ+weekday_dur_diff*zygMZ+(1|family), data=dat)
summary(weekday_dur_ext_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_weekday_dur + weekday_dur_diff + zygMZ + weekday_dur_diff *  
##     zygMZ + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2696.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.15677 -0.64608 -0.03938  0.61902  2.36283 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2504   0.5004  
##  Residual             0.7567   0.8699  
## Number of obs: 949, groups:  family, 665
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)              0.001857   0.050967 608.497632   0.036    0.971
## avg_weekday_dur         -0.019701   0.041390 645.799100  -0.476    0.634
## weekday_dur_diff         0.048810   0.065634 454.633873   0.744    0.457
## zygMZ                   -0.045279   0.069281 666.432356  -0.654    0.514
## weekday_dur_diff:zygMZ  -0.016353   0.088609 488.694926  -0.185    0.854
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_ wkdy__ zygMZ 
## avg_wkdy_dr  0.067                     
## wkdy_dr_dff  0.039  0.002              
## zygMZ       -0.729 -0.024 -0.028       
## wkdy_dr_:MZ -0.027 -0.012 -0.745  0.035
out<- weekday_dur_ext_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy MZ")

col_out<- rbind(col_out, out)


weekday_dur_ext_DZ<- lmer(EXT_resid~avg_weekday_dur+weekday_dur_diff+zygDZ+weekday_dur_diff*zygDZ+(1|family), data=dat)
summary(weekday_dur_ext_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_weekday_dur + weekday_dur_diff + zygDZ + weekday_dur_diff *  
##     zygDZ + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2696.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.15677 -0.64608 -0.03938  0.61902  2.36283 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2504   0.5004  
##  Residual             0.7567   0.8699  
## Number of obs: 949, groups:  family, 665
## 
## Fixed effects:
##                         Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)             -0.04342    0.04745 677.01409  -0.915    0.360
## avg_weekday_dur         -0.01970    0.04139 645.79910  -0.476    0.634
## weekday_dur_diff         0.03246    0.05907 505.23826   0.549    0.583
## zygDZ                    0.04528    0.06928 666.43236   0.654    0.514
## weekday_dur_diff:zygDZ   0.01635    0.08861 488.69493   0.185    0.854
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_ wkdy__ zygDZ 
## avg_wkdy_dr  0.037                     
## wkdy_dr_dff  0.034 -0.017              
## zygDZ       -0.677  0.024 -0.022       
## wkdy_dr_:DZ -0.021  0.012 -0.672  0.035
out<- weekday_dur_ext_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy DZ")

col_out<- rbind(col_out, out)

alertness

# alertness 
alertness_ext_pheno<- lmer(EXT_resid~total_alertness+(1|family), data=dat)
summary(alertness_ext_pheno)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ total_alertness + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2728.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.08492 -0.64389 -0.03954  0.63341  2.39921 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2514   0.5014  
##  Residual             0.7504   0.8662  
## Number of obs: 965, groups:  family, 673
## 
## Fixed effects:
##                  Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)      -0.02418    0.03455 626.29314  -0.700    0.484
## total_alertness  -0.02535    0.03138 961.54010  -0.808    0.419
## 
## Correlation of Fixed Effects:
##             (Intr)
## totl_lrtnss 0.074
out<- alertness_ext_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Alertness",
         sleep="Alertness",
         Psychiatric="Externalizing",
         model="Phenotypic")

col_out<- rbind(col_out, out)

alertness_ext<- lmer(EXT_resid~avg_alertness+alertness_diff+(1|family), data=dat)
summary(alertness_ext)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_alertness + alertness_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2732
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.08112 -0.64492 -0.03831  0.63625  2.39848 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2509   0.5009  
##  Residual             0.7518   0.8670  
## Number of obs: 965, groups:  family, 673
## 
## Fixed effects:
##                 Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)     -0.02411    0.03456 625.37802  -0.698    0.486
## avg_alertness   -0.03207    0.04271 659.31457  -0.751    0.453
## alertness_diff  -0.01710    0.04724 518.27262  -0.362    0.717
## 
## Correlation of Fixed Effects:
##             (Intr) avg_lr
## avg_alrtnss  0.054       
## alrtnss_dff  0.050 -0.018
anova(alertness_ext_pheno,alertness_ext)
## refitting model(s) with ML (instead of REML)
## Data: dat
## Models:
## alertness_ext_pheno: EXT_resid ~ total_alertness + (1 | family)
## alertness_ext: EXT_resid ~ avg_alertness + alertness_diff + (1 | family)
##                     npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## alertness_ext_pheno    4 2726.4 2745.9 -1359.2   2718.4                     
## alertness_ext          5 2728.4 2752.8 -1359.2   2718.4 0.0546  1     0.8153
alertness_ext_zyg<- lmer(EXT_resid~avg_alertness+alertness_diff+zyg+zyg*alertness_diff+(1|family), data=dat)
summary(alertness_ext_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_alertness + alertness_diff + zyg + zyg * alertness_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2735.9
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.09545 -0.64554 -0.04097  0.62474  2.37343 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2510   0.5010  
##  Residual             0.7541   0.8684  
## Number of obs: 964, groups:  family, 672
## 
## Fixed effects:
##                     Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)         -0.02267    0.03471 618.50108  -0.653    0.514
## avg_alertness       -0.03200    0.04279 657.95931  -0.748    0.455
## alertness_diff      -0.02154    0.04864 510.16461  -0.443    0.658
## zyg                  0.04337    0.06878 671.50914   0.631    0.529
## alertness_diff:zyg  -0.02769    0.09775 527.30111  -0.283    0.777
## 
## Correlation of Fixed Effects:
##             (Intr) avg_lr alrtn_ zyg   
## avg_alrtnss  0.055                     
## alrtnss_dff  0.045 -0.010              
## zyg          0.071  0.022 -0.013       
## alrtnss_df: -0.014  0.033  0.227  0.051
out<- alertness_ext_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Alertness",
         sleep="Alertness",
         Psychiatric="Externalizing",
         model="Between Within")

col_out<- rbind(col_out, out)

alertness_ext_MZ<- lmer(EXT_resid~avg_alertness+alertness_diff+zygMZ+zygMZ*alertness_diff+(1|family), data=dat)
summary(alertness_ext_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_alertness + alertness_diff + zygMZ + zygMZ *  
##     alertness_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2735.9
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.09545 -0.64554 -0.04097  0.62474  2.37343 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2510   0.5010  
##  Residual             0.7541   0.8684  
## Number of obs: 964, groups:  family, 672
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)          -9.843e-04  5.057e-02  6.113e+02  -0.019    0.984
## avg_alertness        -3.200e-02  4.279e-02  6.580e+02  -0.748    0.455
## alertness_diff       -3.538e-02  7.639e-02  5.088e+02  -0.463    0.643
## zygMZ                -4.337e-02  6.878e-02  6.715e+02  -0.631    0.529
## alertness_diff:zygMZ  2.769e-02  9.775e-02  5.273e+02   0.283    0.777
## 
## Correlation of Fixed Effects:
##             (Intr) avg_lr alrtn_ zygMZ 
## avg_alrtnss  0.052                     
## alrtnss_dff  0.030  0.015              
## zygMZ       -0.729 -0.022 -0.024       
## alrtnss_:MZ -0.025 -0.033 -0.785  0.051
out<- alertness_ext_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Alertness",
         sleep="Alertness",
         Psychiatric="Externalizing",
         model="Dummy MZ")

col_out<- rbind(col_out, out)

alertness_ext_DZ<- lmer(EXT_resid~avg_alertness+alertness_diff+zygDZ+zygDZ*alertness_diff+(1|family), data=dat)
summary(alertness_ext_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_alertness + alertness_diff + zygDZ + zygDZ *  
##     alertness_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2735.9
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.09545 -0.64554 -0.04097  0.62474  2.37343 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2510   0.5010  
##  Residual             0.7541   0.8684  
## Number of obs: 964, groups:  family, 672
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)           -0.044352   0.047098 683.761702  -0.942    0.347
## avg_alertness         -0.032003   0.042792 657.959314  -0.748    0.455
## alertness_diff        -0.007696   0.060618 534.733731  -0.127    0.899
## zygDZ                  0.043368   0.068782 671.509138   0.631    0.529
## alertness_diff:zygDZ  -0.027685   0.097754 527.301108  -0.283    0.777
## 
## Correlation of Fixed Effects:
##             (Intr) avg_lr alrtn_ zygDZ 
## avg_alrtnss  0.024                     
## alrtnss_dff  0.073 -0.035              
## zygDZ       -0.678  0.022 -0.052       
## alrtnss_:DZ -0.048  0.033 -0.624  0.051
out<- alertness_ext_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Alertness",
         sleep="Alertness",
         Psychiatric="Externalizing",
         model="Dummy DZ")

col_out<- rbind(col_out, out)

chronotype

# chrono 
chrono_ext_pheno<- lmer(EXT_resid~total_meq+(1|family), data=dat)
summary(chrono_ext_pheno)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ total_meq + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2724.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.02217 -0.64259 -0.01496  0.64325  2.40555 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2466   0.4965  
##  Residual             0.7488   0.8653  
## Number of obs: 964, groups:  family, 672
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)   0.396378   0.165260 938.793002   2.399   0.0167 * 
## total_meq    -0.008551   0.003313 948.988695  -2.581   0.0100 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##           (Intr)
## total_meq -0.978
out<- chrono_ext_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Externalizing",
         model="Phenotypic")

col_out<- rbind(col_out, out)

chrono_ext<- lmer(EXT_resid~avg_meq+meq_diff+(1|family), data=dat)
summary(chrono_ext)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_meq + meq_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2732.2
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.01561 -0.63805 -0.02112  0.62834  2.41097 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2449   0.4948  
##  Residual             0.7509   0.8665  
## Number of obs: 964, groups:  family, 672
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)   0.469829   0.210939 631.886171   2.227   0.0263 *
## avg_meq      -0.010030   0.004239 642.414371  -2.366   0.0183 *
## meq_diff     -0.006129   0.005452 549.029772  -1.124   0.2614  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##          (Intr) avg_mq
## avg_meq  -0.987       
## meq_diff  0.027 -0.020
anova(chrono_ext_pheno,chrono_ext)
## refitting model(s) with ML (instead of REML)
## Data: dat
## Models:
## chrono_ext_pheno: EXT_resid ~ total_meq + (1 | family)
## chrono_ext: EXT_resid ~ avg_meq + meq_diff + (1 | family)
##                  npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## chrono_ext_pheno    4 2717.9 2737.4 -1355.0   2709.9                     
## chrono_ext          5 2719.6 2744.0 -1354.8   2709.6 0.3139  1     0.5753
chrono_ext_zyg<- lmer(EXT_resid~avg_meq+meq_diff+zyg+zyg*meq_diff+(1|family), data=dat)
summary(chrono_ext_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_meq + meq_diff + zyg + zyg * meq_diff + (1 |  
##     family)
##    Data: dat
## 
## REML criterion at convergence: 2740.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0272 -0.6360 -0.0163  0.6352  2.3938 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2455   0.4955  
##  Residual             0.7529   0.8677  
## Number of obs: 963, groups:  family, 671
## 
## Fixed effects:
##                Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)    0.471792   0.211364 629.953889   2.232   0.0260 *
## avg_meq       -0.010047   0.004248 640.057318  -2.365   0.0183 *
## meq_diff      -0.006063   0.005523 532.569255  -1.098   0.2729  
## zyg            0.043012   0.068488 668.508569   0.628   0.5302  
## meq_diff:zyg   0.001209   0.011112 559.528573   0.109   0.9134  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_mq mq_dff zyg   
## avg_meq     -0.987                     
## meq_diff     0.024 -0.017              
## zyg          0.002  0.009 -0.006       
## meq_dff:zyg -0.023  0.023  0.152  0.045
out<- chrono_ext_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Externalizing",
         model="Between Within")

col_out<- rbind(col_out, out)

chrono_ext_MZ<- lmer(EXT_resid~avg_meq+meq_diff+zygMZ+zygMZ*meq_diff+(1|family), data=dat)
summary(chrono_ext_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_meq + meq_diff + zygMZ + zygMZ * meq_diff + (1 |  
##     family)
##    Data: dat
## 
## REML criterion at convergence: 2740.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0272 -0.6360 -0.0163  0.6352  2.3938 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2455   0.4955  
##  Residual             0.7529   0.8677  
## Number of obs: 963, groups:  family, 671
## 
## Fixed effects:
##                  Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)      0.493298   0.214203 633.917063   2.303   0.0216 *
## avg_meq         -0.010047   0.004248 640.057331  -2.365   0.0183 *
## meq_diff        -0.005458   0.008407 504.075703  -0.649   0.5165  
## zygMZ           -0.043012   0.068488 668.508570  -0.628   0.5302  
## meq_diff:zygMZ  -0.001209   0.011112 559.528573  -0.109   0.9134  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_mq mq_dff zygMZ 
## avg_meq     -0.972                     
## meq_diff     0.004  0.004              
## zygMZ       -0.162 -0.009 -0.026       
## mq_dff:zyMZ  0.016 -0.023 -0.760  0.045
out<- chrono_ext_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Externalizing",
         model="Dummy MZ")

col_out<- rbind(col_out, out)

chrono_ext_DZ<- lmer(EXT_resid~avg_meq+meq_diff+zygDZ+zygDZ*meq_diff+(1|family), data=dat)
summary(chrono_ext_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_meq + meq_diff + zygDZ + zygDZ * meq_diff + (1 |  
##     family)
##    Data: dat
## 
## REML criterion at convergence: 2740.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0272 -0.6360 -0.0163  0.6352  2.3938 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2455   0.4955  
##  Residual             0.7529   0.8677  
## Number of obs: 963, groups:  family, 671
## 
## Fixed effects:
##                  Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)      0.450286   0.214037 627.938669   2.104   0.0358 *
## avg_meq         -0.010047   0.004248 640.057336  -2.365   0.0183 *
## meq_diff        -0.006667   0.007216 607.396683  -0.924   0.3559  
## zygDZ            0.043012   0.068488 668.508570   0.628   0.5302  
## meq_diff:zygDZ   0.001209   0.011112 559.528573   0.109   0.9134  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_mq mq_dff zygDZ 
## avg_meq     -0.976                     
## meq_diff     0.042 -0.030              
## zygDZ       -0.158  0.009 -0.039       
## mq_dff:zyDZ -0.030  0.023 -0.654  0.045
out<- chrono_ext_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Externalizing",
         model="Dummy DZ")

col_out<- rbind(col_out, out)

insomnia

# insom

insom_ext_pheno<- lmer(EXT_resid~insom + (1|family), data=dat)
summary(insom_ext_pheno)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ insom + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2713
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.13746 -0.63937 -0.03125  0.61784  2.32122 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2455   0.4955  
##  Residual             0.7480   0.8648  
## Number of obs: 962, groups:  family, 673
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)   
## (Intercept)  -0.03713    0.03464 637.45030  -1.072  0.28426   
## insom         0.07884    0.02916 959.59169   2.703  0.00698 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##       (Intr)
## insom -0.138
out<- insom_ext_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Insomnia",
         sleep="Insomnia",
         Psychiatric="Externalizing",
         model="Phenotypic")

col_out<- rbind(col_out, out)

insom_ext<- lmer(EXT_resid~avg_insom+insom_diff+(1|family), data=dat)
summary(insom_ext)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_insom + insom_diff + (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2716.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1378 -0.6386 -0.0312  0.6169  2.3212 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2454   0.4954  
##  Residual             0.7490   0.8655  
## Number of obs: 962, groups:  family, 673
## 
## Fixed effects:
##              Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)  -0.03698    0.03475 632.44634  -1.064   0.2877  
## avg_insom     0.07768    0.03920 650.07462   1.982   0.0479 *
## insom_diff    0.08033    0.04482 500.14811   1.792   0.0737 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##            (Intr) avg_ns
## avg_insom  -0.152       
## insom_diff -0.033 -0.022
anova(insom_ext_pheno,insom_ext)
## refitting model(s) with ML (instead of REML)
## Data: dat
## Models:
## insom_ext_pheno: EXT_resid ~ insom + (1 | family)
## insom_ext: EXT_resid ~ avg_insom + insom_diff + (1 | family)
##                 npar    AIC    BIC  logLik deviance Chisq Df Pr(>Chisq)
## insom_ext_pheno    4 2710.8 2730.3 -1351.4   2702.8                    
## insom_ext          5 2712.8 2737.2 -1351.4   2702.8 0.002  1     0.9648
insom_ext_zyg<- lmer(EXT_resid~avg_insom+insom_diff+zyg+zyg*insom_diff+(1|family), data=dat)
summary(insom_ext_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_insom + insom_diff + zyg + zyg * insom_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2718
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.02727 -0.65081 -0.03621  0.62551  2.31694 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2518   0.5018  
##  Residual             0.7433   0.8621  
## Number of obs: 961, groups:  family, 672
## 
## Fixed effects:
##                 Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)     -0.03615    0.03494 625.84415  -1.035   0.3012  
## avg_insom        0.07661    0.03939 649.50440   1.945   0.0522 .
## insom_diff       0.08763    0.04495 492.84141   1.949   0.0518 .
## zyg              0.03247    0.06872 670.58745   0.473   0.6367  
## insom_diff:zyg   0.16038    0.09044 516.27024   1.773   0.0768 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ns insm_d zyg   
## avg_insom   -0.157                     
## insom_diff  -0.031 -0.021              
## zyg          0.083 -0.078  0.000       
## insm_dff:zy -0.002  0.006  0.092 -0.036
out<- insom_ext_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Insomnia",
         sleep="Insomnia",
         Psychiatric="Externalizing",
         model="Between Within")

col_out<- rbind(col_out, out)

insom_ext_MZ<- lmer(EXT_resid~avg_insom+insom_diff+zygMZ+zygMZ*insom_diff+(1|family), data=dat)
summary(insom_ext_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_insom + insom_diff + zygMZ + zygMZ * insom_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2718
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.02727 -0.65081 -0.03621  0.62551  2.31694 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2518   0.5018  
##  Residual             0.7433   0.8621  
## Number of obs: 961, groups:  family, 672
## 
## Fixed effects:
##                   Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)       -0.01992    0.05100 616.89262  -0.391   0.6962  
## avg_insom          0.07661    0.03939 649.50440   1.945   0.0522 .
## insom_diff         0.16782    0.06664 491.73593   2.518   0.0121 *
## zygMZ             -0.03247    0.06872 670.58745  -0.473   0.6367  
## insom_diff:zygMZ  -0.16038    0.09044 516.27024  -1.773   0.0768 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ns insm_d zygMZ 
## avg_insom   -0.160                     
## insom_diff  -0.031 -0.010              
## zygMZ       -0.731  0.078  0.024       
## insm_dff:MZ  0.025 -0.006 -0.741 -0.036
out<- insom_ext_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Insomnia",
         sleep="Insomnia",
         Psychiatric="Externalizing",
         model="Dummy MZ")

col_out<- rbind(col_out, out)

insom_ext_DZ<- lmer(EXT_resid~avg_insom+insom_diff+zygDZ+zygDZ*insom_diff+(1|family), data=dat)
summary(insom_ext_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_insom + insom_diff + zygDZ + zygDZ * insom_diff +  
##     (1 | family)
##    Data: dat
## 
## REML criterion at convergence: 2718
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.02727 -0.65081 -0.03621  0.62551  2.31694 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  family   (Intercept) 0.2518   0.5018  
##  Residual             0.7433   0.8621  
## Number of obs: 961, groups:  family, 672
## 
## Fixed effects:
##                    Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)       -0.052392   0.046932 684.836538  -1.116   0.2647  
## avg_insom          0.076614   0.039390 649.504402   1.945   0.0522 .
## insom_diff         0.007434   0.060749 520.266732   0.122   0.9027  
## zygDZ              0.032474   0.068716 670.587453   0.473   0.6367  
## insom_diff:zygDZ   0.160384   0.090443 516.270235   1.773   0.0768 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ns insm_d zygDZ 
## avg_insom   -0.060                     
## insom_diff  -0.036 -0.020              
## zygDZ       -0.670 -0.078  0.027       
## insm_dff:DZ  0.025  0.006 -0.676 -0.036
out<- insom_ext_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Insomnia",
         sleep="Insomnia",
         Psychiatric="Externalizing",
         model="Dummy DZ")

col_out<- rbind(col_out, out)

write file

fwrite(col_out, "/Users/claire/Desktop/dissertation/cotwin_mendelian/ctc_results_colorado.csv", sep="\t")

ABCD sample

get data

# get covariates
acs<- fread("/Users/claire/Desktop/dissertation/cotwin_mendelian/ctc_sleep_psych//acspsw03.txt", header = T, data.table = F)
acsvars<- c('subjectkey', 'eventname', 'sex', 'race_ethnicity')
acs<- acs %>% dplyr::select(all_of(acsvars))

subs<- fread("/Users/claire/Desktop/dissertation/cotwin_mendelian/ctc_sleep_psych/abcd_suss01.txt", header=T, data.table = F)
pube<- fread("/Users/claire/Desktop/dissertation/cotwin_mendelian/ctc_sleep_psych/abcd_ssphp01.txt", header=T, data.table = F)
subsvars<- c('subjectkey', 'eventname','su_caff_ss_sum_calc', 'su_caff_ss_sum_l')
pubevars<- c('subjectkey', 'eventname','pds_p_ss_female_category_2', 'pds_p_ss_male_category_2')
subs<- subs %>% dplyr::select(all_of(subsvars))
pube<- pube %>% dplyr::select(all_of(pubevars)) %>%
  mutate(pubertal_score= ifelse(!is.na(pube$pds_p_ss_female_category_2), pube$pds_p_ss_female_category_2, ifelse(!is.na(pube$pds_p_ss_male_category_2), pube$pds_p_ss_male_category_2, NA))) %>%
  select(subjectkey, eventname, pubertal_score)


acs<- subset(acs, acs$eventname=="1_year_follow_up_y_arm_1")

#abcd<- fread("/Users/claire/Desktop/dissertation/cotwin_mendelian/ctc_sleep_psych/ABCD_sleep_psych.csv", header=T, data.table=F)

### new file with all sibs

abcd<- fread("/Users/claire/Desktop/dissertation/cotwin_mendelian/ctc_sleep_psych/ABCD_sleep_psych_ALL_sibs.csv", header=T, data.table=F)


colnames(abcd)
##  [1] "subjectkey"                      "eventname_wave_2.x"             
##  [3] "weekend_dur_mcq_wave_2"          "weekday_dur_mcq_wave_2"         
##  [5] "chronotype_wave_2"               "social_jet_lag_wave_2"          
##  [7] "eventname"                       "avg_weekend_dur"                
##  [9] "avg_weekday_dur"                 "avg_weekend_effic"              
## [11] "avg_weekday_effic"               "variability"                    
## [13] "eventname_wave_2.y"              "interview_age_wave_2"           
## [15] "sex_wave_2"                      "cbcl_scr_syn_attention_r_wave_2"
## [17] "cbcl_scr_syn_internal_r_wave_2"  "cbcl_scr_syn_external_r_wave_2" 
## [19] "visit_wave_2"                    "total_score_wave_2"             
## [21] "distress_score_wave_2"           "rel_family_id"                  
## [23] "zyg"                             "matched_subject"                
## [25] "rel_relationship"                "twin"
abcd_all<- merge(abcd, acs, by="subjectkey", all.x=T)

z transform sleep before creating between/within scores

abcd_all$avg_weekend_dur<- scale(abcd_all$avg_weekend_dur)
abcd_all$avg_weekday_dur<- scale(abcd_all$avg_weekday_dur)
abcd_all$weekend_dur_mcq_wave_2<- scale(abcd_all$weekend_dur_mcq_wave_2)
abcd_all$weekday_dur_mcq_wave_2<- scale(abcd_all$weekday_dur_mcq_wave_2)
abcd_all$avg_weekend_effic<- scale(abcd_all$avg_weekend_effic)
abcd_all$avg_weekday_effic<- scale(abcd_all$avg_weekday_effic)
abcd_all$variability<- scale(abcd_all$variability)
abcd_all$chronotype_wave_2<- scale(abcd_all$chronotype_wave_2)
abcd_all$social_jet_lag_wave_2<- scale(abcd_all$social_jet_lag_wave_2)

set up between and within family variables

abcd_all <- abcd_all%>% group_by(rel_family_id) %>%   
  mutate(
    fam_avg_weekend_dur = mean(avg_weekend_dur,na.rm=T),    
    weekend_dur_diff = avg_weekend_dur-fam_avg_weekend_dur,
    fam_avg_weekday_dur = mean(avg_weekday_dur,na.rm=T),    
    weekday_dur_diff = avg_weekday_dur-fam_avg_weekday_dur,
    avg_weekend_dur_mcq = mean(weekend_dur_mcq_wave_2,na.rm=T),    
    weekend_dur_mcq_diff = weekend_dur_mcq_wave_2-avg_weekend_dur_mcq,
    avg_weekday_dur_mcq = mean(weekday_dur_mcq_wave_2,na.rm=T),    
    weekday_dur_mcq_diff = weekday_dur_mcq_wave_2-avg_weekday_dur_mcq,
    fam_avg_weekend_effic = mean(avg_weekend_effic,na.rm=T), 
    weekend_effic_diff = avg_weekend_effic-fam_avg_weekend_effic,
    fam_avg_weekday_effic = mean(avg_weekday_effic,na.rm=T),    
    weekday_effic_diff = avg_weekday_effic-fam_avg_weekday_effic,
    avg_variabilitiy = mean(variability,na.rm=T),    
    variabiltiy_diff = variability-avg_variabilitiy,
    avg_chrono = mean(chronotype_wave_2,na.rm=T),    
    chrono_diff = chronotype_wave_2-avg_chrono,
    avg_jetlag = mean(social_jet_lag_wave_2,na.rm=T),    
    jetlag_diff = social_jet_lag_wave_2-avg_jetlag)

head(abcd_all)


hist(abcd_all$weekend_dur_diff)

hist(abcd_all$weekday_dur_diff)

hist(abcd_all$weekend_effic_diff)

hist(abcd_all$weekday_effic_diff)

hist(abcd_all$variabiltiy_diff)

hist(abcd_all$chrono_diff)  ### should we do something about this distribution?

hist(abcd_all$jetlag_diff)

code zygosity

# create contrast codes for zygosity
table(abcd_all$zyg)
## 
##    1    2    3 
##  602  794 1567
#             MZ   DZ      SIB
# sibDZ_MZ   2/3  -1/3     -1/3
# sib_DZ      0    1/2     -1/2

abcd_all$sibDZ_MZ<- ifelse(abcd_all$zyg==1, 2/3, ifelse(abcd_all$zyg==2, -1/3, ifelse(abcd_all$zyg==3, -1/3, NA)))
abcd_all$sib_DZ<- ifelse(abcd_all$zyg==1, 0, ifelse(abcd_all$zyg==2, 1/2, ifelse(abcd_all$zyg==3, -1/2, NA)))

table(abcd_all$sibDZ_MZ)
## 
## -0.333333333333333  0.666666666666667 
##               2361                602
table(abcd_all$sib_DZ)
## 
## -0.5    0  0.5 
## 1567  602  794
# if sib_DZ is not significant--> dummy code so MZ is 0 on all, then DZ 0 on all

abcd_all$MZ_dummy_DZ<- ifelse(abcd_all$zyg==1, 0, ifelse(abcd_all$zyg==2, 1, ifelse(abcd_all$zyg==3, 0, NA)))
abcd_all$MZ_dummy_sib<- ifelse(abcd_all$zyg==1, 0, ifelse(abcd_all$zyg==2, 0, ifelse(abcd_all$zyg==3, 1, NA)))

abcd_all$DZ_dummy_MZ<- ifelse(abcd_all$zyg==1, 1, ifelse(abcd_all$zyg==2, 0, ifelse(abcd_all$zyg==3, 0, NA)))
abcd_all$DZ_dummy_sib<- ifelse(abcd_all$zyg==1, 0, ifelse(abcd_all$zyg==2, 0, ifelse(abcd_all$zyg==3, 1, NA)))

abcd_all$sib_dummy_MZ<- ifelse(abcd_all$zyg==1, 1, ifelse(abcd_all$zyg==2, 0, ifelse(abcd_all$zyg==3, 0, NA)))
abcd_all$sib_dummy_DZ<- ifelse(abcd_all$zyg==1, 0, ifelse(abcd_all$zyg==2, 1, ifelse(abcd_all$zyg==3, 0, NA)))

regress out covariates

table(abcd_all$sex)

# get caffeine intake variable
subs<- subs %>% filter(eventname=="2_year_follow_up_y_arm_1") %>% 
  select(subjectkey, su_caff_ss_sum_l) %>%
  rename(caff_intake=su_caff_ss_sum_l)
hist(subs$caff_intake)

# get puberty rating
pube<- pube %>% filter(eventname=="2_year_follow_up_y_arm_1") %>% 
  select(subjectkey, pubertal_score)
hist(pube$pubertal_score)

pube$pubertal_score<- as.numeric(pube$pubertal_score)

# merge in
cov<- merge(subs, pube, by="subjectkey", all=T)
abcd_all<- merge(abcd_all, cov, by="subjectkey", all=T)

# check structure
str(abcd_all$race_ethnicity); table(abcd_all$sex)

# convert to factor
abcd_all$race_ethnicity_fact<- as.factor(abcd_all$race_ethnicity)
str(abcd_all$race_ethnicity_fact)


# look at psych variables
hist(abcd_all$cbcl_scr_syn_internal_r_wave_2)

hist(abcd_all$cbcl_scr_syn_external_r_wave_2)

hist(abcd_all$cbcl_scr_syn_attention_r_wave_2) 

hist(abcd_all$total_score_wave_2)

# not normal so transform
abcd_all$int_SQRT<- sqrt(abcd_all$cbcl_scr_syn_internal_r_wave_2)
abcd_all$ext_SQRT<- sqrt(abcd_all$cbcl_scr_syn_external_r_wave_2)
abcd_all$att_SQRT<- sqrt(abcd_all$cbcl_scr_syn_attention_r_wave_2)
abcd_all$psychosis_SQRT<- sqrt(abcd_all$total_score_wave_2)

# somewhat better
hist(abcd_all$int_SQRT)

hist(abcd_all$ext_SQRT)

hist(abcd_all$att_SQRT) 

hist(abcd_all$psychosis_SQRT)

# regress out covarars
abcd_all$INT_resid<- resid(lm(int_SQRT~sex+interview_age_wave_2+race_ethnicity_fact + caff_intake + pubertal_score, data=abcd_all, na.action = "na.exclude"))

abcd_all$EXT_resid<- resid(lm(ext_SQRT~sex+interview_age_wave_2+race_ethnicity_fact + caff_intake + pubertal_score, data=abcd_all, na.action = "na.exclude"))

abcd_all$ATT_resid<- resid(lm(att_SQRT~sex+interview_age_wave_2+race_ethnicity_fact + caff_intake + pubertal_score, data=abcd_all, na.action = "na.exclude"))

abcd_all$PSYCH_resid<- resid(lm(psychosis_SQRT~sex+interview_age_wave_2+race_ethnicity_fact + caff_intake + pubertal_score, data=abcd_all, na.action = "na.exclude"))

# scale dependent vars

abcd_all$INT_resid<- scale(abcd_all$INT_resid)
abcd_all$EXT_resid<- scale(abcd_all$EXT_resid)
abcd_all$ATT_resid<- scale(abcd_all$ATT_resid)
abcd_all$PSYCH_resid<- scale(abcd_all$PSYCH_resid)

# mean around 0 and SD at 1
mean(abcd_all$INT_resid, na.rm=T); sd(abcd_all$INT_resid, na.rm=T)
mean(abcd_all$EXT_resid, na.rm=T); sd(abcd_all$EXT_resid, na.rm=T)
mean(abcd_all$ATT_resid, na.rm=T); sd(abcd_all$ATT_resid, na.rm=T)
mean(abcd_all$PSYCH_resid, na.rm=T); sd(abcd_all$PSYCH_resid, na.rm=T)

# add whether or not someone was in a covid arm for the fitbit analyses.

abcd_all$covid<- ifelse(abcd_all$eventname.x=="covid19_cv1_arm_2", 1, ifelse( abcd_all$eventname.x=="baseline_year_1_arm_1" | abcd_all$eventname.x=="2_year_follow_up_y_arm_1", 0, NA))

create data frame to save models

abcd_out<- data.frame()

internalizing

variability

# variability (fitbit)
variability_int_pheno<- lmer(INT_resid~variability+covid+(1|rel_family_id), data=abcd_all)
summary(variability_int_pheno)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ variability + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3414.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.22635 -0.54369 -0.01005  0.47599  2.86361 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4938   0.7027  
##  Residual                  0.4432   0.6657  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)   -0.10092    0.03134  827.55703  -3.220  0.00133 ** 
## variability    0.11794    0.02767 1271.00050   4.262 2.17e-05 ***
## covid         -0.04309    0.19246 1058.66787  -0.224  0.82289    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) vrblty
## variability  0.037       
## covid       -0.147 -0.065
out<- variability_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Internalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

variability_int<- lmer(INT_resid~avg_variabilitiy+variabiltiy_diff+covid+(1|rel_family_id), data=abcd_all)
summary(variability_int) ### don't need to save this one, just for model comparison
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + (1 |  
##     rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3417.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1917 -0.5485  0.0015  0.4807  2.8753 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4944   0.7031  
##  Residual                  0.4428   0.6654  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                    Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)        -0.10022    0.03135  827.59257  -3.197  0.00144 ** 
## avg_variabilitiy    0.14082    0.03487  878.93476   4.038 5.86e-05 ***
## variabiltiy_diff    0.07928    0.04526  465.73794   1.752  0.08049 .  
## covid              -0.04859    0.19254 1058.78023  -0.252  0.80082    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_
## avg_varblty  0.041              
## varblty_dff  0.006  0.003       
## covid       -0.147 -0.067 -0.019
variability_int_zyg<- lmer(INT_resid~avg_variabilitiy+variabiltiy_diff+covid+sibDZ_MZ+sib_DZ+variabiltiy_diff*sibDZ_MZ+variabiltiy_diff*sib_DZ+(1|rel_family_id), data=abcd_all)
summary(variability_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + sibDZ_MZ +  
##     sib_DZ + variabiltiy_diff * sibDZ_MZ + variabiltiy_diff *  
##     sib_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3425.5
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.15060 -0.55376 -0.00432  0.47879  2.89755 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4919   0.7014  
##  Residual                  0.4443   0.6665  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                             Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)               -1.124e-01  3.257e-02  7.940e+02  -3.452 0.000586 ***
## avg_variabilitiy           1.421e-01  3.489e-02  8.782e+02   4.073 5.07e-05 ***
## variabiltiy_diff           7.950e-02  4.741e-02  4.612e+02   1.677 0.094205 .  
## covid                     -6.502e-02  1.927e-01  1.056e+03  -0.337 0.735836    
## sibDZ_MZ                  -3.054e-02  7.432e-02  7.660e+02  -0.411 0.681180    
## sib_DZ                    -1.348e-01  7.169e-02  8.133e+02  -1.881 0.060345 .  
## variabiltiy_diff:sibDZ_MZ -1.369e-03  1.115e-01  4.567e+02  -0.012 0.990209    
## variabiltiy_diff:sib_DZ   -1.166e-02  1.020e-01  4.681e+02  -0.114 0.908977    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  sDZ_MZ sib_DZ v_:DZ_
## avg_varblty  0.045                                          
## varblty_dff  0.004  0.002                                   
## covid       -0.136 -0.069 -0.015                            
## sibDZ_MZ     0.232  0.041 -0.002 -0.007                     
## sib_DZ       0.124 -0.031 -0.002  0.047 -0.088              
## vrbl_:DZ_MZ -0.004 -0.004  0.292  0.010  0.000  0.001       
## vrblty_:_DZ -0.003 -0.005 -0.013  0.011  0.001  0.005  0.008
out<- variability_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Internalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

variability_int_MZ<- lmer(INT_resid~avg_variabilitiy+variabiltiy_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+variabiltiy_diff*MZ_dummy_DZ+variabiltiy_diff*MZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(variability_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + MZ_dummy_DZ +  
##     MZ_dummy_sib + variabiltiy_diff * MZ_dummy_DZ + variabiltiy_diff *  
##     MZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3425.5
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.15060 -0.55376 -0.00432  0.47879  2.89755 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4919   0.7014  
##  Residual                  0.4443   0.6665  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -1.328e-01  6.531e-02  7.559e+02  -2.033   0.0424
## avg_variabilitiy               1.421e-01  3.489e-02  8.782e+02   4.073 5.07e-05
## variabiltiy_diff               7.859e-02  9.912e-02  4.537e+02   0.793   0.4283
## covid                         -6.502e-02  1.927e-01  1.056e+03  -0.337   0.7358
## MZ_dummy_DZ                   -3.688e-02  8.529e-02  7.553e+02  -0.432   0.6656
## MZ_dummy_sib                   9.797e-02  7.963e-02  7.976e+02   1.230   0.2189
## variabiltiy_diff:MZ_dummy_DZ  -4.463e-03  1.222e-01  4.530e+02  -0.037   0.9709
## variabiltiy_diff:MZ_dummy_sib  7.201e-03  1.230e-01  4.644e+02   0.059   0.9533
##                                  
## (Intercept)                   *  
## avg_variabilitiy              ***
## variabiltiy_diff                 
## covid                            
## MZ_dummy_DZ                      
## MZ_dummy_sib                     
## variabiltiy_diff:MZ_dummy_DZ     
## variabiltiy_diff:MZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  MZ__DZ MZ_dm_ v_:MZ__D
## avg_varblty  0.054                                            
## varblty_dff -0.001 -0.002                                     
## covid       -0.073 -0.069  0.000                              
## MZ_dummy_DZ -0.764 -0.049  0.001  0.026                       
## MZ_dummy_sb -0.814 -0.024  0.001 -0.014  0.624                
## vrb_:MZ__DZ  0.001  0.001 -0.811 -0.005  0.000 -0.001         
## vrblt_:MZ__  0.002  0.005 -0.806 -0.014 -0.001  0.002  0.654
out<- variability_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Internalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

variability_int_DZ<- lmer(INT_resid~avg_variabilitiy+variabiltiy_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+variabiltiy_diff*DZ_dummy_MZ+variabiltiy_diff*DZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(variability_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + DZ_dummy_MZ +  
##     DZ_dummy_sib + variabiltiy_diff * DZ_dummy_MZ + variabiltiy_diff *  
##     DZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3425.5
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.15060 -0.55376 -0.00432  0.47879  2.89755 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4919   0.7014  
##  Residual                  0.4443   0.6665  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -1.697e-01  5.504e-02  7.585e+02  -3.083  0.00212
## avg_variabilitiy               1.421e-01  3.489e-02  8.782e+02   4.073 5.07e-05
## variabiltiy_diff               7.413e-02  7.144e-02  4.515e+02   1.038  0.30000
## covid                         -6.502e-02  1.927e-01  1.056e+03  -0.337  0.73584
## DZ_dummy_MZ                    3.688e-02  8.529e-02  7.553e+02   0.432  0.66559
## DZ_dummy_sib                   1.348e-01  7.169e-02  8.133e+02   1.881  0.06034
## variabiltiy_diff:DZ_dummy_MZ   4.463e-03  1.222e-01  4.530e+02   0.037  0.97087
## variabiltiy_diff:DZ_dummy_sib  1.166e-02  1.020e-01  4.681e+02   0.114  0.90898
##                                  
## (Intercept)                   ** 
## avg_variabilitiy              ***
## variabiltiy_diff                 
## covid                            
## DZ_dummy_MZ                      
## DZ_dummy_sib                  .  
## variabiltiy_diff:DZ_dummy_MZ     
## variabiltiy_diff:DZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  DZ__MZ DZ_dm_ v_:DZ__M
## avg_varblty -0.012                                            
## varblty_dff  0.003  0.000                                     
## covid       -0.047 -0.069 -0.008                              
## DZ_dummy_MZ -0.643  0.049 -0.001 -0.026                       
## DZ_dummy_sb -0.764  0.031 -0.001 -0.047  0.497                
## vrb_:DZ__MZ -0.002 -0.001 -0.585  0.005  0.000  0.001         
## vrblt_:DZ__ -0.001  0.005 -0.700 -0.011  0.002  0.005  0.410
out<- variability_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Internalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)


variability_int_sib<- lmer(INT_resid~avg_variabilitiy+variabiltiy_diff+covid+sib_dummy_MZ+sib_dummy_DZ+variabiltiy_diff*sib_dummy_MZ+variabiltiy_diff*sib_dummy_DZ+(1|rel_family_id), data=abcd_all)
summary(variability_int_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + sib_dummy_MZ +  
##     sib_dummy_DZ + variabiltiy_diff * sib_dummy_MZ + variabiltiy_diff *  
##     sib_dummy_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3425.5
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.15060 -0.55376 -0.00432  0.47879  2.89755 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4919   0.7014  
##  Residual                  0.4443   0.6665  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -3.483e-02  4.626e-02  9.005e+02  -0.753   0.4517
## avg_variabilitiy               1.421e-01  3.489e-02  8.782e+02   4.073 5.07e-05
## variabiltiy_diff               8.579e-02  7.277e-02  4.851e+02   1.179   0.2390
## covid                         -6.502e-02  1.927e-01  1.056e+03  -0.337   0.7358
## sib_dummy_MZ                  -9.797e-02  7.963e-02  7.976e+02  -1.230   0.2189
## sib_dummy_DZ                  -1.348e-01  7.169e-02  8.133e+02  -1.881   0.0603
## variabiltiy_diff:sib_dummy_MZ -7.201e-03  1.230e-01  4.644e+02  -0.059   0.9533
## variabiltiy_diff:sib_dummy_DZ -1.166e-02  1.020e-01  4.681e+02  -0.114   0.9090
##                                  
## (Intercept)                      
## avg_variabilitiy              ***
## variabiltiy_diff                 
## covid                            
## sib_dummy_MZ                     
## sib_dummy_DZ                  .  
## variabiltiy_diff:sib_dummy_MZ    
## variabiltiy_diff:sib_dummy_DZ    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  sb__MZ sb__DZ v_:__M
## avg_varblty  0.034                                          
## varblty_dff  0.010  0.007                                   
## covid       -0.128 -0.069 -0.023                            
## sib_dmmy_MZ -0.572  0.024 -0.004  0.014                     
## sib_dmmy_DZ -0.641 -0.031 -0.006  0.047  0.368              
## vrblt_:__MZ -0.006 -0.005 -0.592  0.014  0.002  0.003       
## vrblt_:__DZ -0.006 -0.005 -0.714  0.011  0.003  0.005  0.422
out<- variability_int_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Internalizing",
         model="Dummy Sib")
abcd_out<- rbind(abcd_out, out)

social jet lag

# jetlag 
jetlag_int_pheno<- lmer(INT_resid~social_jet_lag_wave_2+(1|rel_family_id), data=abcd_all)
summary(jetlag_int_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ social_jet_lag_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5838.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5113 -0.5874 -0.0019  0.4940  3.4331 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4927   0.7020  
##  Residual                  0.4801   0.6929  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                         Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)             -0.12663    0.02504 1217.21052  -5.057 4.91e-07 ***
## social_jet_lag_wave_2   -0.02690    0.02241 2140.46605  -1.200     0.23    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## scl_jt_l__2 0.037
out<- jetlag_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Internalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

jetlag_int<- lmer(INT_resid~avg_jetlag+jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_jetlag + jetlag_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5839.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4938 -0.5818  0.0028  0.4869  3.4338 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4920   0.7014  
##  Residual                  0.4798   0.6926  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)   -0.12829    0.02504 1215.93641  -5.123 3.49e-07 ***
## avg_jetlag    -0.06779    0.03216 1253.84942  -2.108   0.0352 *  
## jetlag_diff    0.01127    0.03108 1067.36196   0.363   0.7170    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt
## avg_jetlag  0.053        
## jetlag_diff 0.001  0.004
jetlag_int_zyg<- lmer(INT_resid~avg_jetlag+jetlag_diff+sibDZ_MZ+sib_DZ+sibDZ_MZ*jetlag_diff+sib_DZ*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_jetlag + jetlag_diff + sibDZ_MZ + sib_DZ + sibDZ_MZ *  
##     jetlag_diff + sib_DZ * jetlag_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5844.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4919 -0.5768 -0.0004  0.4923  3.5265 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4893   0.6995  
##  Residual                  0.4796   0.6925  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)          -1.517e-01  2.667e-02  1.164e+03  -5.689 1.61e-08 ***
## avg_jetlag           -6.809e-02  3.210e-02  1.253e+03  -2.121   0.0341 *  
## jetlag_diff          -5.655e-03  3.724e-02  9.572e+02  -0.152   0.8793    
## sibDZ_MZ             -6.374e-02  6.133e-02  1.147e+03  -1.039   0.2989    
## sib_DZ               -1.341e-01  5.914e-02  1.187e+03  -2.268   0.0235 *  
## jetlag_diff:sibDZ_MZ -1.179e-01  8.973e-02  9.441e+02  -1.314   0.1893    
## jetlag_diff:sib_DZ    2.609e-02  7.684e-02  9.816e+02   0.340   0.7343    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d sDZ_MZ sib_DZ j_:DZ_
## avg_jetlag   0.049                                   
## jetlag_diff  0.004  0.004                            
## sibDZ_MZ     0.231 -0.011  0.001                     
## sib_DZ       0.224  0.010  0.004 -0.146              
## jtlg_:DZ_MZ  0.001  0.001  0.361  0.004 -0.002       
## jtlg_df:_DZ  0.004  0.001  0.332 -0.003  0.004 -0.207
out<- jetlag_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Internalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

jetlag_int_MZ<- lmer(INT_resid~avg_jetlag+jetlag_diff+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*jetlag_diff+MZ_dummy_sib*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_jetlag + jetlag_diff + MZ_dummy_DZ + MZ_dummy_sib +  
##     MZ_dummy_DZ * jetlag_diff + MZ_dummy_sib * jetlag_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5844.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4919 -0.5768 -0.0004  0.4923  3.5265 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4893   0.6995  
##  Residual                  0.4796   0.6925  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -1.942e-01  5.374e-02  1.136e+03  -3.614 0.000315 ***
## avg_jetlag               -6.809e-02  3.210e-02  1.253e+03  -2.121 0.034115 *  
## jetlag_diff              -8.424e-02  8.109e-02  9.359e+02  -1.039 0.299166    
## MZ_dummy_DZ              -3.328e-03  7.186e-02  1.134e+03  -0.046 0.963071    
## MZ_dummy_sib              1.308e-01  6.409e-02  1.182e+03   2.041 0.041470 *  
## jetlag_diff:MZ_dummy_DZ   1.309e-01  1.047e-01  9.327e+02   1.251 0.211294    
## jetlag_diff:MZ_dummy_sib  1.048e-01  9.001e-02  9.734e+02   1.165 0.244457    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d MZ__DZ MZ_dm_ j_:MZ__D
## avg_jetlag   0.016                                     
## jetlag_diff  0.004  0.002                              
## MZ_dummy_DZ -0.747  0.013 -0.003                       
## MZ_dummy_sb -0.838  0.006 -0.004  0.627                
## jtl_:MZ__DZ -0.003  0.000 -0.775  0.005  0.003         
## jtlg_d:MZ__ -0.004 -0.001 -0.901  0.003  0.003  0.698
out<- jetlag_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Internalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

jetlag_int_DZ<- lmer(INT_resid~avg_jetlag+jetlag_diff+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*jetlag_diff+DZ_dummy_sib*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_jetlag + jetlag_diff + DZ_dummy_MZ + DZ_dummy_sib +  
##     DZ_dummy_MZ * jetlag_diff + DZ_dummy_sib * jetlag_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5844.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4919 -0.5768 -0.0004  0.4923  3.5265 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4893   0.6995  
##  Residual                  0.4796   0.6925  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -1.975e-01  4.774e-02  1.132e+03  -4.137 3.77e-05 ***
## avg_jetlag               -6.809e-02  3.210e-02  1.253e+03  -2.121   0.0341 *  
## jetlag_diff               4.668e-02  6.617e-02  9.280e+02   0.705   0.4807    
## DZ_dummy_MZ               3.328e-03  7.186e-02  1.134e+03   0.046   0.9631    
## DZ_dummy_sib              1.341e-01  5.914e-02  1.187e+03   2.268   0.0235 *  
## jetlag_diff:DZ_dummy_MZ  -1.309e-01  1.047e-01  9.327e+02  -1.251   0.2113    
## jetlag_diff:DZ_dummy_sib -2.609e-02  7.684e-02  9.816e+02  -0.340   0.7343    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d DZ__MZ DZ_dm_ j_:DZ__M
## avg_jetlag   0.038                                     
## jetlag_diff  0.007  0.003                              
## DZ_dummy_MZ -0.664 -0.013 -0.004                       
## DZ_dummy_sb -0.807 -0.010 -0.005  0.536                
## jtl_:DZ__MZ -0.004  0.000 -0.632  0.005  0.003         
## jtlg_d:DZ__ -0.006 -0.001 -0.861  0.004  0.004  0.544
out<- jetlag_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Internalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

jetlag_int_sib<- lmer(INT_resid~avg_jetlag+jetlag_diff+DZ_dummy_MZ+sib_dummy_DZ+DZ_dummy_MZ*jetlag_diff+sib_dummy_DZ*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_int_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_jetlag + jetlag_diff + DZ_dummy_MZ + sib_dummy_DZ +  
##     DZ_dummy_MZ * jetlag_diff + sib_dummy_DZ * jetlag_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5844.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4919 -0.5768 -0.0004  0.4923  3.5265 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4893   0.6995  
##  Residual                  0.4796   0.6925  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)                -0.06339    0.03496 1296.94216  -1.813   0.0701 .
## avg_jetlag                 -0.06809    0.03210 1252.57333  -2.121   0.0341 *
## jetlag_diff                 0.02059    0.03907 1154.03309   0.527   0.5982  
## DZ_dummy_MZ                -0.13081    0.06409 1181.72017  -2.041   0.0415 *
## sib_dummy_DZ               -0.13414    0.05914 1187.29833  -2.268   0.0235 *
## jetlag_diff:DZ_dummy_MZ    -0.10483    0.09001  973.39741  -1.165   0.2445  
## jetlag_diff:sib_dummy_DZ    0.02609    0.07684  981.57205   0.340   0.7343  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d DZ__MZ sb__DZ j_:DZ_
## avg_jetlag   0.036                                   
## jetlag_diff -0.003  0.003                            
## DZ_dummy_MZ -0.545 -0.006  0.001                     
## sib_dmmy_DZ -0.590  0.010  0.002  0.322              
## jtl_:DZ__MZ  0.001  0.001 -0.434  0.003 -0.001       
## jtlg_d:__DZ  0.001  0.001 -0.508 -0.001  0.004  0.221
out<- jetlag_int_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Internalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekend duration (fitbit)

# weekend duration (fitbit)
weekend_dur_int_pheno<- lmer(INT_resid~avg_weekend_dur+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_int_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekend_dur + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3396.3
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.97119 -0.56201 -0.00897  0.47773  2.95205 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5015   0.7082  
##  Residual                  0.4491   0.6702  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                   Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)       -0.10083    0.03172  818.29393  -3.178  0.00154 **
## avg_weekend_dur   -0.03143    0.02838 1261.89216  -1.108  0.26828   
## covid              0.00203    0.19352 1045.17647   0.010  0.99163   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wknd_dr -0.045       
## covid       -0.146  0.023
out<- weekend_dur_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekend_dur_int<- lmer(INT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3397.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.95922 -0.54649  0.00496  0.48377  2.97222 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5030   0.7092  
##  Residual                  0.4472   0.6687  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                       Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)         -1.026e-01  3.175e-02  8.189e+02  -3.232  0.00128 **
## fam_avg_weekend_dur  3.121e-03  3.531e-02  8.591e+02   0.088  0.92960   
## weekend_dur_diff    -9.432e-02  4.752e-02  4.574e+02  -1.985  0.04776 * 
## covid                1.455e-02  1.936e-01  1.046e+03   0.075  0.94014   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__
## fm_vg_wknd_ -0.057              
## wknd_dr_dff  0.002  0.001       
## covid       -0.147  0.042 -0.019
weekend_dur_int_zyg<- lmer(INT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekend_dur_diff+sib_DZ*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekend_dur_diff + sib_DZ *  
##     weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3404.1
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.90792 -0.53575 -0.00982  0.48149  3.00247 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5018   0.7084  
##  Residual                  0.4474   0.6689  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                             Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)               -1.164e-01  3.301e-02  7.863e+02  -3.528 0.000444 ***
## fam_avg_weekend_dur        7.068e-03  3.542e-02  8.592e+02   0.200 0.841866    
## weekend_dur_diff          -7.316e-02  5.300e-02  4.493e+02  -1.381 0.168103    
## covid                      3.079e-03  1.937e-01  1.044e+03   0.016 0.987323    
## sibDZ_MZ                  -4.740e-02  7.523e-02  7.588e+02  -0.630 0.528855    
## sib_DZ                    -1.260e-01  7.264e-02  8.032e+02  -1.735 0.083201 .  
## weekend_dur_diff:sibDZ_MZ  1.013e-01  1.311e-01  4.466e+02   0.772 0.440286    
## weekend_dur_diff:sib_DZ    8.339e-02  1.038e-01  4.547e+02   0.803 0.422252    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wknd_ -0.077                                          
## wknd_dr_dff  0.000  0.002                                   
## covid       -0.137  0.041 -0.013                            
## sibDZ_MZ     0.232 -0.078 -0.001 -0.007                     
## sib_DZ       0.130 -0.027 -0.002  0.043 -0.086              
## wkn__:DZ_MZ -0.002  0.001  0.437  0.008 -0.002  0.001       
## wknd_d_:_DZ -0.002  0.002  0.055  0.007  0.001 -0.001 -0.033
out<- weekend_dur_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)


weekend_dur_int_MZ<- lmer(INT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekend_dur_diff+MZ_dummy_sib*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekend_dur_diff +  
##     MZ_dummy_sib * weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3404.1
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.90792 -0.53575 -0.00982  0.48149  3.00247 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5018   0.7084  
##  Residual                  0.4474   0.6689  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -1.480e-01  6.613e-02  7.501e+02  -2.239   0.0255
## fam_avg_weekend_dur            7.068e-03  3.542e-02  8.592e+02   0.200   0.8419
## weekend_dur_diff              -5.649e-03  1.204e-01  4.450e+02  -0.047   0.9626
## covid                          3.079e-03  1.937e-01  1.044e+03   0.016   0.9873
## MZ_dummy_DZ                   -1.560e-02  8.630e-02  7.472e+02  -0.181   0.8566
## MZ_dummy_sib                   1.104e-01  8.068e-02  7.903e+02   1.368   0.1716
## weekend_dur_diff:MZ_dummy_DZ  -5.958e-02  1.426e-01  4.437e+02  -0.418   0.6763
## weekend_dur_diff:MZ_dummy_sib -1.430e-01  1.394e-01  4.519e+02  -1.026   0.3056
##                                
## (Intercept)                   *
## fam_avg_weekend_dur            
## weekend_dur_diff               
## covid                          
## MZ_dummy_DZ                    
## MZ_dummy_sib                   
## weekend_dur_diff:MZ_dummy_DZ   
## weekend_dur_diff:MZ_dummy_sib  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wknd_ -0.097                                             
## wknd_dr_dff -0.002  0.002                                      
## covid       -0.074  0.041  0.000                               
## MZ_dummy_DZ -0.762  0.056  0.002  0.024                        
## MZ_dummy_sb -0.815  0.084  0.002 -0.013  0.623                 
## wk__:MZ__DZ  0.002  0.000 -0.844 -0.005 -0.002 -0.001          
## wknd__:MZ__  0.003 -0.002 -0.864 -0.010 -0.002 -0.001  0.729
out<- weekend_dur_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_int_DZ<- lmer(INT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekend_dur_diff+DZ_dummy_sib*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekend_dur_diff +  
##     DZ_dummy_sib * weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3404.1
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.90792 -0.53575 -0.00982  0.48149  3.00247 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5018   0.7084  
##  Residual                  0.4474   0.6689  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -1.636e-01  5.586e-02  7.506e+02  -2.929   0.0035
## fam_avg_weekend_dur            7.068e-03  3.542e-02  8.592e+02   0.200   0.8419
## weekend_dur_diff              -6.523e-02  7.645e-02  4.403e+02  -0.853   0.3940
## covid                          3.079e-03  1.937e-01  1.044e+03   0.016   0.9873
## DZ_dummy_MZ                    1.560e-02  8.630e-02  7.472e+02   0.181   0.8566
## DZ_dummy_sib                   1.260e-01  7.264e-02  8.032e+02   1.735   0.0832
## weekend_dur_diff:DZ_dummy_MZ   5.958e-02  1.426e-01  4.437e+02   0.418   0.6763
## weekend_dur_diff:DZ_dummy_sib -8.339e-02  1.038e-01  4.547e+02  -0.803   0.4223
##                                 
## (Intercept)                   **
## fam_avg_weekend_dur             
## weekend_dur_diff                
## covid                           
## DZ_dummy_MZ                     
## DZ_dummy_sib                  . 
## weekend_dur_diff:DZ_dummy_MZ    
## weekend_dur_diff:DZ_dummy_sib   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wknd_ -0.028                                             
## wknd_dr_dff -0.002  0.002                                      
## covid       -0.050  0.041 -0.009                               
## DZ_dummy_MZ -0.643 -0.056  0.002 -0.024                        
## DZ_dummy_sb -0.765  0.027  0.002 -0.043  0.496                 
## wk__:DZ__MZ  0.001  0.000 -0.536  0.005 -0.002 -0.001          
## wknd__:DZ__  0.002 -0.002 -0.736 -0.007 -0.001 -0.001  0.395
out<- weekend_dur_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_int_sib<- lmer(INT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekend_dur_diff+sib_dummy_DZ*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_int_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekend_dur_diff +  
##     sib_dummy_DZ * weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3404.1
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.90792 -0.53575 -0.00982  0.48149  3.00247 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5018   0.7084  
##  Residual                  0.4474   0.6689  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -3.764e-02  4.676e-02  8.874e+02  -0.805   0.4210
## fam_avg_weekend_dur            7.068e-03  3.542e-02  8.592e+02   0.200   0.8419
## weekend_dur_diff              -1.486e-01  7.025e-02  4.729e+02  -2.116   0.0349
## covid                          3.079e-03  1.937e-01  1.044e+03   0.016   0.9873
## sib_dummy_MZ                  -1.104e-01  8.068e-02  7.903e+02  -1.368   0.1716
## sib_dummy_DZ                  -1.260e-01  7.264e-02  8.032e+02  -1.735   0.0832
## weekend_dur_diff:sib_dummy_MZ  1.430e-01  1.394e-01  4.519e+02   1.026   0.3056
## weekend_dur_diff:sib_dummy_DZ  8.339e-02  1.038e-01  4.547e+02   0.803   0.4223
##                                
## (Intercept)                    
## fam_avg_weekend_dur            
## weekend_dur_diff              *
## covid                          
## sib_dummy_MZ                   
## sib_dummy_DZ                  .
## weekend_dur_diff:sib_dummy_MZ  
## weekend_dur_diff:sib_dummy_DZ  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wknd_  0.008                                           
## wknd_dr_dff  0.003 -0.001                                    
## covid       -0.126  0.041 -0.020                             
## sib_dmmy_MZ -0.573 -0.084  0.000  0.013                      
## sib_dmmy_DZ -0.639 -0.027 -0.001  0.043  0.370               
## wknd__:__MZ -0.001  0.002 -0.504  0.010 -0.001  0.000        
## wknd__:__DZ -0.001  0.002 -0.677  0.007  0.000 -0.001  0.341
out<- weekend_dur_int_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekday duration (fitbit)

# weekday duration (fitbit)
weekday_dur_int_pheno<- lmer(INT_resid~avg_weekday_dur+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_int_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekday_dur + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3432.1
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.00240 -0.55350 -0.00242  0.47872  2.97936 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5072   0.7122  
##  Residual                  0.4454   0.6674  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                   Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)     -1.048e-01  3.164e-02  8.257e+02  -3.314 0.000961 ***
## avg_weekday_dur -1.957e-02  2.867e-02  1.275e+03  -0.683 0.494974    
## covid            7.273e-03  1.937e-01  1.058e+03   0.038 0.970053    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wkdy_dr -0.038       
## covid       -0.145  0.013
out<- weekday_dur_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekday_dur_int<- lmer(INT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3433.8
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.96811 -0.54608 -0.00177  0.47021  3.03987 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5079   0.7127  
##  Residual                  0.4444   0.6666  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                       Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)         -1.056e-01  3.164e-02  8.262e+02  -3.338 0.000882 ***
## fam_avg_weekday_dur  8.430e-03  3.479e-02  8.604e+02   0.242 0.808608    
## weekday_dur_diff    -7.809e-02  5.013e-02  4.672e+02  -1.558 0.119983    
## covid                7.009e-03  1.937e-01  1.059e+03   0.036 0.971137    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__
## fm_vg_wkdy_ -0.042              
## wkdy_dr_dff -0.007  0.006       
## covid       -0.145  0.011  0.008
weekday_dur_int_zyg<- lmer(INT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekday_dur_diff+sib_DZ*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekday_dur_diff + sib_DZ *  
##     weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3441.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9449 -0.5393 -0.0008  0.4715  3.0293 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5058   0.7112  
##  Residual                  0.4455   0.6675  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                             Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)                 -0.11897    0.03290  793.59009  -3.616 0.000318 ***
## fam_avg_weekday_dur          0.01125    0.03485  860.33500   0.323 0.746973    
## weekday_dur_diff            -0.07228    0.05229  462.60405  -1.382 0.167540    
## covid                       -0.00651    0.19375 1056.42943  -0.034 0.973201    
## sibDZ_MZ                    -0.04410    0.07511  764.76888  -0.587 0.557252    
## sib_DZ                      -0.12601    0.07234  810.77014  -1.742 0.081914 .  
## weekday_dur_diff:sibDZ_MZ    0.05579    0.12236  457.16343   0.456 0.648628    
## weekday_dur_diff:sib_DZ      0.07126    0.11334  471.26503   0.629 0.529836    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wkdy_ -0.059                                          
## wkdy_dr_dff -0.008  0.005                                   
## covid       -0.134  0.010  0.006                            
## sibDZ_MZ     0.234 -0.062 -0.004 -0.005                     
## sib_DZ       0.127 -0.022 -0.001  0.044 -0.085              
## wkd__:DZ_MZ -0.003 -0.003  0.278 -0.003 -0.008  0.001       
## wkdy_d_:_DZ -0.002 -0.006 -0.028  0.009  0.001 -0.005  0.018
out<- weekday_dur_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)


weekday_dur_int_MZ<- lmer(INT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekday_dur_diff+MZ_dummy_sib*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekday_dur_diff +  
##     MZ_dummy_sib * weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3441.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9449 -0.5393 -0.0008  0.4715  3.0293 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5058   0.7112  
##  Residual                  0.4455   0.6675  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                     -0.14837    0.06604  756.04166  -2.247   0.0249
## fam_avg_weekday_dur              0.01125    0.03485  860.33500   0.323   0.7470
## weekday_dur_diff                -0.03508    0.10845  453.41122  -0.324   0.7465
## covid                           -0.00651    0.19375 1056.42943  -0.034   0.9732
## MZ_dummy_DZ                     -0.01890    0.08610  753.54939  -0.220   0.8263
## MZ_dummy_sib                     0.10711    0.08054  796.29471   1.330   0.1839
## weekday_dur_diff:MZ_dummy_DZ    -0.02016    0.13391  452.97103  -0.151   0.8804
## weekday_dur_diff:MZ_dummy_sib   -0.09143    0.13578  466.19344  -0.673   0.5011
##                                
## (Intercept)                   *
## fam_avg_weekday_dur            
## weekday_dur_diff               
## covid                          
## MZ_dummy_DZ                    
## MZ_dummy_sib                   
## weekday_dur_diff:MZ_dummy_DZ   
## weekday_dur_diff:MZ_dummy_sib  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wkdy_ -0.076                                             
## wkdy_dr_dff -0.010  0.000                                      
## covid       -0.070  0.010  0.001                               
## MZ_dummy_DZ -0.764  0.045  0.007  0.023                        
## MZ_dummy_sb -0.815  0.068  0.008 -0.015  0.625                 
## wk__:MZ__DZ  0.007  0.000 -0.810  0.007 -0.008 -0.006          
## wkdy__:MZ__  0.007  0.005 -0.799 -0.001 -0.006 -0.007  0.647
out<- weekday_dur_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_int_DZ<- lmer(INT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekday_dur_diff+DZ_dummy_sib*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekday_dur_diff +  
##     DZ_dummy_sib * weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3441.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9449 -0.5393 -0.0008  0.4715  3.0293 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5058   0.7112  
##  Residual                  0.4455   0.6675  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                     -0.16727    0.05557  757.51907  -3.010   0.0027
## fam_avg_weekday_dur              0.01125    0.03485  860.33500   0.323   0.7470
## weekday_dur_diff                -0.05525    0.07855  452.13150  -0.703   0.4822
## covid                           -0.00651    0.19375 1056.42943  -0.034   0.9732
## DZ_dummy_MZ                      0.01890    0.08610  753.54939   0.220   0.8263
## DZ_dummy_sib                     0.12601    0.07234  810.77014   1.742   0.0819
## weekday_dur_diff:DZ_dummy_MZ     0.02016    0.13391  452.97103   0.151   0.8804
## weekday_dur_diff:DZ_dummy_sib   -0.07126    0.11334  471.26503  -0.629   0.5298
##                                 
## (Intercept)                   **
## fam_avg_weekday_dur             
## weekday_dur_diff                
## covid                           
## DZ_dummy_MZ                     
## DZ_dummy_sib                  . 
## weekday_dur_diff:DZ_dummy_MZ    
## weekday_dur_diff:DZ_dummy_sib   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wkdy_ -0.021                                             
## wkdy_dr_dff -0.008  0.001                                      
## covid       -0.048  0.010  0.013                               
## DZ_dummy_MZ -0.642 -0.045  0.004 -0.023                        
## DZ_dummy_sb -0.764  0.022  0.005 -0.044  0.494                 
## wk__:DZ__MZ  0.004  0.000 -0.587 -0.007 -0.008 -0.003          
## wkdy__:DZ__  0.005  0.006 -0.693 -0.009 -0.003 -0.005  0.407
out<- weekday_dur_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_int_sib<- lmer(INT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekday_dur_diff+sib_dummy_DZ*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_int_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekday_dur_diff +  
##     sib_dummy_DZ * weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3441.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9449 -0.5393 -0.0008  0.4715  3.0293 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5058   0.7112  
##  Residual                  0.4455   0.6675  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                     -0.04126    0.04664  895.74828  -0.885   0.3766
## fam_avg_weekday_dur              0.01125    0.03485  860.33500   0.323   0.7470
## weekday_dur_diff                -0.12651    0.08171  489.78106  -1.548   0.1222
## covid                           -0.00651    0.19375 1056.42943  -0.034   0.9732
## sib_dummy_MZ                    -0.10711    0.08054  796.29471  -1.330   0.1839
## sib_dummy_DZ                    -0.12601    0.07234  810.77014  -1.742   0.0819
## weekday_dur_diff:sib_dummy_MZ    0.09143    0.13578  466.19344   0.673   0.5011
## weekday_dur_diff:sib_dummy_DZ    0.07126    0.11334  471.26503   0.629   0.5298
##                                
## (Intercept)                    
## fam_avg_weekday_dur            
## weekday_dur_diff               
## covid                          
## sib_dummy_MZ                   
## sib_dummy_DZ                  .
## weekday_dur_diff:sib_dummy_MZ  
## weekday_dur_diff:sib_dummy_DZ  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wkdy_  0.009                                           
## wkdy_dr_dff -0.003  0.009                                    
## covid       -0.126  0.010 -0.001                             
## sib_dmmy_MZ -0.573 -0.068  0.001  0.015                      
## sib_dmmy_DZ -0.640 -0.022  0.002  0.044  0.370               
## wkdy__:__MZ  0.002 -0.005 -0.602  0.001 -0.007 -0.001        
## wkdy__:__DZ  0.001 -0.006 -0.721  0.009 -0.001 -0.005  0.434
out<- weekday_dur_int_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekend duration (MCQ)

# weekend duration (MCQ)
weekend_dur_MCQ_int_pheno<- lmer(INT_resid~weekend_dur_mcq_wave_2+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_int_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ weekend_dur_mcq_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5839.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5110 -0.5843  0.0013  0.4943  3.4126 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4941   0.7029  
##  Residual                  0.4798   0.6927  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)            -1.258e-01  2.506e-02  1.218e+03  -5.020 5.93e-07 ***
## weekend_dur_mcq_wave_2  6.732e-03  2.100e-02  2.009e+03   0.321    0.749    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## wknd_dr___2 -0.041
out<- weekend_dur_MCQ_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_int<- lmer(INT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + (1 |  
##     rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5839.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4394 -0.5883 -0.0071  0.4935  3.4323 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4934   0.7024  
##  Residual                  0.4790   0.6921  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)            -0.12836    0.02507 1218.01847  -5.120 3.56e-07 ***
## avg_weekend_dur_mcq     0.05984    0.03286 1257.14824   1.821   0.0688 .  
## weekend_dur_mcq_diff   -0.02940    0.02713 1035.20656  -1.083   0.2788    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___
## avg_wknd_d_ -0.064       
## wknd_dr_mc_ -0.001  0.006
weekend_dur_MCQ_int_zyg<- lmer(INT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+sibDZ_MZ+sib_DZ+weekend_dur_mcq_diff*sibDZ_MZ+weekend_dur_mcq_diff*sib_DZ+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + sibDZ_MZ +  
##     sib_DZ + weekend_dur_mcq_diff * sibDZ_MZ + weekend_dur_mcq_diff *  
##     sib_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5845
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4090 -0.5874 -0.0042  0.5003  3.4321 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4914   0.7010  
##  Residual                  0.4781   0.6915  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                     -0.15081    0.02668 1165.61397  -5.652 1.99e-08
## avg_weekend_dur_mcq              0.05540    0.03284 1256.84267   1.687   0.0919
## weekend_dur_mcq_diff            -0.02460    0.02911  961.70775  -0.845   0.3984
## sibDZ_MZ                        -0.06299    0.06139 1148.43577  -1.026   0.3050
## sib_DZ                          -0.12943    0.05923 1188.76340  -2.185   0.0291
## weekend_dur_mcq_diff:sibDZ_MZ   -0.06587    0.06717  937.48670  -0.981   0.3270
## weekend_dur_mcq_diff:sib_DZ      0.10260    0.06447  997.85323   1.591   0.1118
##                                  
## (Intercept)                   ***
## avg_weekend_dur_mcq           .  
## weekend_dur_mcq_diff             
## sibDZ_MZ                         
## sib_DZ                        *  
## weekend_dur_mcq_diff:sibDZ_MZ    
## weekend_dur_mcq_diff:sib_DZ      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ sDZ_MZ sib_DZ w___:D
## avg_wknd_d_ -0.044                                   
## wknd_dr_mc_  0.000  0.002                            
## sibDZ_MZ     0.231  0.019  0.000                     
## sib_DZ       0.221  0.039  0.002 -0.145              
## wk___:DZ_MZ  0.000 -0.001  0.238  0.000 -0.001       
## wknd___:_DZ  0.002 -0.012  0.237 -0.001  0.000 -0.154
out<- weekend_dur_MCQ_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_int_MZ<- lmer(INT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+MZ_dummy_DZ+MZ_dummy_sib+weekend_dur_mcq_diff*MZ_dummy_DZ+weekend_dur_mcq_diff*MZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + MZ_dummy_DZ +  
##     MZ_dummy_sib + weekend_dur_mcq_diff * MZ_dummy_DZ + weekend_dur_mcq_diff *  
##     MZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5845
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4090 -0.5874 -0.0042  0.5003  3.4321 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4914   0.7010  
##  Residual                  0.4781   0.6915  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                       -1.928e-01  5.378e-02  1.137e+03  -3.585
## avg_weekend_dur_mcq                5.539e-02  3.284e-02  1.257e+03   1.687
## weekend_dur_mcq_diff              -6.851e-02  5.893e-02  9.202e+02  -1.163
## MZ_dummy_DZ                       -1.718e-03  7.191e-02  1.135e+03  -0.024
## MZ_dummy_sib                       1.277e-01  6.419e-02  1.183e+03   1.990
## weekend_dur_mcq_diff:MZ_dummy_DZ   1.172e-01  7.885e-02  9.244e+02   1.486
## weekend_dur_mcq_diff:MZ_dummy_sib  1.457e-02  6.989e-02  9.801e+02   0.208
##                                   Pr(>|t|)    
## (Intercept)                       0.000351 ***
## avg_weekend_dur_mcq               0.091933 .  
## weekend_dur_mcq_diff              0.245323    
## MZ_dummy_DZ                       0.980940    
## MZ_dummy_sib                      0.046856 *  
## weekend_dur_mcq_diff:MZ_dummy_DZ  0.137658    
## weekend_dur_mcq_diff:MZ_dummy_sib 0.834895    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ MZ__DZ MZ_dm_ w___:MZ__D
## avg_wknd_d_ -0.007                                       
## wknd_dr_mc_  0.000  0.000                                
## MZ_dummy_DZ -0.748 -0.001  0.000                         
## MZ_dummy_sb -0.838 -0.036  0.000  0.626                  
## w___:MZ__DZ  0.000 -0.004 -0.747  0.001  0.000           
## wkn___:MZ__  0.000  0.006 -0.843  0.000 -0.001  0.630
out<- weekend_dur_MCQ_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_int_DZ<- lmer(INT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+DZ_dummy_MZ+DZ_dummy_sib+weekend_dur_mcq_diff*DZ_dummy_MZ+weekend_dur_mcq_diff*DZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + DZ_dummy_MZ +  
##     DZ_dummy_sib + weekend_dur_mcq_diff * DZ_dummy_MZ + weekend_dur_mcq_diff *  
##     DZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5845
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4090 -0.5874 -0.0042  0.5003  3.4321 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4914   0.7010  
##  Residual                  0.4781   0.6915  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                       -1.945e-01  4.775e-02  1.132e+03  -4.074
## avg_weekend_dur_mcq                5.539e-02  3.284e-02  1.257e+03   1.687
## weekend_dur_mcq_diff               4.866e-02  5.239e-02  9.299e+02   0.929
## DZ_dummy_MZ                        1.718e-03  7.191e-02  1.135e+03   0.024
## DZ_dummy_sib                       1.294e-01  5.923e-02  1.189e+03   2.185
## weekend_dur_mcq_diff:DZ_dummy_MZ  -1.172e-01  7.885e-02  9.244e+02  -1.486
## weekend_dur_mcq_diff:DZ_dummy_sib -1.026e-01  6.447e-02  9.979e+02  -1.591
##                                   Pr(>|t|)    
## (Intercept)                       4.95e-05 ***
## avg_weekend_dur_mcq                 0.0919 .  
## weekend_dur_mcq_diff                0.3533    
## DZ_dummy_MZ                         0.9809    
## DZ_dummy_sib                        0.0291 *  
## weekend_dur_mcq_diff:DZ_dummy_MZ    0.1377    
## weekend_dur_mcq_diff:DZ_dummy_sib   0.1118    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ DZ__MZ DZ_dm_ w___:DZ__M
## avg_wknd_d_ -0.009                                       
## wknd_dr_mc_  0.002 -0.006                                
## DZ_dummy_MZ -0.664  0.001 -0.001                         
## DZ_dummy_sb -0.806 -0.039 -0.001  0.535                  
## w___:DZ__MZ -0.001  0.004 -0.664  0.001  0.001           
## wkn___:DZ__ -0.002  0.012 -0.813  0.001  0.000  0.540
out<- weekend_dur_MCQ_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_int_sib<- lmer(INT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+sib_dummy_MZ+sib_dummy_DZ+weekend_dur_mcq_diff*sib_dummy_MZ+weekend_dur_mcq_diff*sib_dummy_DZ+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_int_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + sib_dummy_MZ +  
##     sib_dummy_DZ + weekend_dur_mcq_diff * sib_dummy_MZ + weekend_dur_mcq_diff *  
##     sib_dummy_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5845
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4090 -0.5874 -0.0042  0.5003  3.4321 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4914   0.7010  
##  Residual                  0.4781   0.6915  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                         -0.06510    0.03507 1300.22386  -1.856
## avg_weekend_dur_mcq                  0.05540    0.03284 1256.84267   1.687
## weekend_dur_mcq_diff                -0.05394    0.03756 1145.79701  -1.436
## sib_dummy_MZ                        -0.12771    0.06418 1183.02718  -1.990
## sib_dummy_DZ                        -0.12943    0.05923 1188.76340  -2.185
## weekend_dur_mcq_diff:sib_dummy_MZ   -0.01457    0.06988  980.07860  -0.208
## weekend_dur_mcq_diff:sib_dummy_DZ    0.10260    0.06447  997.85323   1.591
##                                   Pr(>|t|)  
## (Intercept)                         0.0637 .
## avg_weekend_dur_mcq                 0.0919 .
## weekend_dur_mcq_diff                0.1513  
## sib_dummy_MZ                        0.0469 *
## sib_dummy_DZ                        0.0291 *
## weekend_dur_mcq_diff:sib_dummy_MZ   0.8349  
## weekend_dur_mcq_diff:sib_dummy_DZ   0.1118  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ sb__MZ sb__DZ w___:__M
## avg_wknd_d_ -0.078                                     
## wknd_dr_mc_ -0.004  0.012                              
## sib_dmmy_MZ -0.546  0.036  0.002                       
## sib_dmmy_DZ -0.592  0.039  0.002  0.323                
## wkn___:__MZ  0.002 -0.006 -0.537 -0.001 -0.001         
## wkn___:__DZ  0.003 -0.012 -0.583 -0.001  0.000  0.313
out<- weekend_dur_MCQ_int_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekday duration (MCQ)

# weekday duration (MCQ)
weekday_dur_MCQ_int_pheno<- lmer(INT_resid~weekday_dur_mcq_wave_2+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_int_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ weekday_dur_mcq_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5838.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5723 -0.5835 -0.0019  0.4968  3.4284 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4959   0.7042  
##  Residual                  0.4783   0.6916  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -0.12609    0.02506 1217.11301  -5.031 5.61e-07 ***
## weekday_dur_mcq_wave_2   -0.02492    0.02069 2025.29896  -1.204    0.229    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## wkdy_dr___2 0.021
out<- weekday_dur_MCQ_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_int<- lmer(INT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + (1 |  
##     rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5840.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5939 -0.5830 -0.0101  0.4965  3.5026 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4953   0.7037  
##  Residual                  0.4780   0.6914  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)            -0.12572    0.02505 1217.36119  -5.019 5.97e-07 ***
## avg_weekday_dur_mcq     0.01593    0.03157 1239.50011   0.505   0.6139    
## weekday_dur_mcq_diff   -0.05472    0.02703 1003.60970  -2.024   0.0432 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___
## avg_wkdy_d_ 0.020        
## wkdy_dr_mc_ 0.010  0.015
weekday_dur_MCQ_int_zyg<- lmer(INT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+sibDZ_MZ+sib_DZ+weekday_dur_mcq_diff*sibDZ_MZ+weekday_dur_mcq_diff*sib_DZ+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + sibDZ_MZ +  
##     sib_DZ + weekday_dur_mcq_diff * sibDZ_MZ + weekday_dur_mcq_diff *  
##     sib_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5847.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5228 -0.5761 -0.0155  0.5004  3.4843 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4925   0.7018  
##  Residual                  0.4784   0.6917  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -1.490e-01  2.673e-02  1.165e+03  -5.576 3.06e-08
## avg_weekday_dur_mcq            5.929e-03  3.176e-02  1.238e+03   0.187   0.8519
## weekday_dur_mcq_diff          -4.560e-02  2.940e-02  9.627e+02  -1.551   0.1212
## sibDZ_MZ                      -6.352e-02  6.162e-02  1.148e+03  -1.031   0.3029
## sib_DZ                        -1.310e-01  5.942e-02  1.188e+03  -2.204   0.0277
## weekday_dur_mcq_diff:sibDZ_MZ  2.770e-02  6.896e-02  9.561e+02   0.402   0.6881
## weekday_dur_mcq_diff:sib_DZ    3.797e-02  6.350e-02  9.726e+02   0.598   0.5501
##                                  
## (Intercept)                   ***
## avg_weekday_dur_mcq              
## weekday_dur_mcq_diff             
## sibDZ_MZ                         
## sib_DZ                        *  
## weekday_dur_mcq_diff:sibDZ_MZ    
## weekday_dur_mcq_diff:sib_DZ      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ sDZ_MZ sib_DZ w___:D
## avg_wkdy_d_  0.061                                   
## wkdy_dr_mc_  0.005  0.004                            
## sibDZ_MZ     0.236  0.079  0.003                     
## sib_DZ       0.227  0.078 -0.006 -0.138              
## wk___:DZ_MZ  0.002 -0.013  0.285  0.005  0.003       
## wkdy___:_DZ -0.007 -0.018  0.226  0.003  0.003 -0.144
out<- weekday_dur_MCQ_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_int_MZ<- lmer(INT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+MZ_dummy_DZ+MZ_dummy_sib+weekday_dur_mcq_diff*MZ_dummy_DZ+weekday_dur_mcq_diff*MZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + MZ_dummy_DZ +  
##     MZ_dummy_sib + weekday_dur_mcq_diff * MZ_dummy_DZ + weekday_dur_mcq_diff *  
##     MZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5847.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5228 -0.5761 -0.0155  0.5004  3.4843 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4925   0.7018  
##  Residual                  0.4784   0.6917  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                       -1.914e-01  5.404e-02  1.137e+03  -3.541
## avg_weekday_dur_mcq                5.929e-03  3.176e-02  1.238e+03   0.187
## weekday_dur_mcq_diff              -2.714e-02  6.122e-02  9.517e+02  -0.443
## MZ_dummy_DZ                       -1.958e-03  7.202e-02  1.135e+03  -0.027
## MZ_dummy_sib                       1.290e-01  6.460e-02  1.182e+03   1.997
## weekday_dur_mcq_diff:MZ_dummy_DZ  -8.712e-03  7.998e-02  9.421e+02  -0.109
## weekday_dur_mcq_diff:MZ_dummy_sib -4.668e-02  7.164e-02  9.805e+02  -0.652
##                                   Pr(>|t|)    
## (Intercept)                       0.000414 ***
## avg_weekday_dur_mcq               0.851915    
## weekday_dur_mcq_diff              0.657649    
## MZ_dummy_DZ                       0.978313    
## MZ_dummy_sib                      0.046071 *  
## weekday_dur_mcq_diff:MZ_dummy_DZ  0.913281    
## weekday_dur_mcq_diff:MZ_dummy_sib 0.514820    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ MZ__DZ MZ_dm_ w___:MZ__D
## avg_wkdy_d_  0.090                                       
## wkdy_dr_mc_  0.006 -0.008                                
## MZ_dummy_DZ -0.747 -0.035 -0.004                         
## MZ_dummy_sb -0.840 -0.111 -0.004  0.626                  
## w___:MZ__DZ -0.004  0.004 -0.765  0.002  0.004           
## wkd___:MZ__ -0.004  0.020 -0.855  0.003  0.007  0.654
out<- weekday_dur_MCQ_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_int_DZ<- lmer(INT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+DZ_dummy_MZ+DZ_dummy_sib+weekday_dur_mcq_diff*DZ_dummy_MZ+weekday_dur_mcq_diff*DZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + DZ_dummy_MZ +  
##     DZ_dummy_sib + weekday_dur_mcq_diff * DZ_dummy_MZ + weekday_dur_mcq_diff *  
##     DZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5847.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5228 -0.5761 -0.0155  0.5004  3.4843 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4925   0.7018  
##  Residual                  0.4784   0.6917  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                       -1.933e-01  4.785e-02  1.132e+03  -4.041
## avg_weekday_dur_mcq                5.929e-03  3.176e-02  1.238e+03   0.187
## weekday_dur_mcq_diff              -3.585e-02  5.147e-02  9.285e+02  -0.697
## DZ_dummy_MZ                        1.958e-03  7.202e-02  1.135e+03   0.027
## DZ_dummy_sib                       1.310e-01  5.942e-02  1.188e+03   2.204
## weekday_dur_mcq_diff:DZ_dummy_MZ   8.712e-03  7.998e-02  9.421e+02   0.109
## weekday_dur_mcq_diff:DZ_dummy_sib -3.797e-02  6.350e-02  9.726e+02  -0.598
##                                   Pr(>|t|)    
## (Intercept)                       5.69e-05 ***
## avg_weekday_dur_mcq                 0.8519    
## weekday_dur_mcq_diff                0.4863    
## DZ_dummy_MZ                         0.9783    
## DZ_dummy_sib                        0.0277 *  
## weekday_dur_mcq_diff:DZ_dummy_MZ    0.9133    
## weekday_dur_mcq_diff:DZ_dummy_sib   0.5501    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ DZ__MZ DZ_dm_ w___:DZ__M
## avg_wkdy_d_  0.049                                       
## wkdy_dr_mc_ -0.003 -0.003                                
## DZ_dummy_MZ -0.661  0.035  0.002                         
## DZ_dummy_sb -0.807 -0.078  0.003  0.531                  
## w___:DZ__MZ  0.002 -0.004 -0.644  0.002 -0.001           
## wkd___:DZ__  0.004  0.018 -0.811 -0.001  0.003  0.521
out<- weekday_dur_MCQ_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_int_sib<- lmer(INT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+sib_dummy_MZ+sib_dummy_DZ+weekday_dur_mcq_diff*sib_dummy_MZ+weekday_dur_mcq_diff*sib_dummy_DZ+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_int_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## INT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + sib_dummy_MZ +  
##     sib_dummy_DZ + weekday_dur_mcq_diff * sib_dummy_MZ + weekday_dur_mcq_diff *  
##     sib_dummy_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5847.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5228 -0.5761 -0.0155  0.5004  3.4843 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4925   0.7018  
##  Residual                  0.4784   0.6917  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                       -6.238e-02  3.508e-02  1.298e+03  -1.778
## avg_weekday_dur_mcq                5.929e-03  3.176e-02  1.238e+03   0.187
## weekday_dur_mcq_diff              -7.382e-02  3.720e-02  1.064e+03  -1.985
## sib_dummy_MZ                      -1.290e-01  6.460e-02  1.182e+03  -1.997
## sib_dummy_DZ                      -1.310e-01  5.942e-02  1.188e+03  -2.204
## weekday_dur_mcq_diff:sib_dummy_MZ  4.668e-02  7.164e-02  9.805e+02   0.652
## weekday_dur_mcq_diff:sib_dummy_DZ  3.797e-02  6.350e-02  9.726e+02   0.598
##                                   Pr(>|t|)  
## (Intercept)                         0.0756 .
## avg_weekday_dur_mcq                 0.8519  
## weekday_dur_mcq_diff                0.0475 *
## sib_dummy_MZ                        0.0461 *
## sib_dummy_DZ                        0.0277 *
## weekday_dur_mcq_diff:sib_dummy_MZ   0.5148  
## weekday_dur_mcq_diff:sib_dummy_DZ   0.5501  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ sb__MZ sb__DZ w___:__M
## avg_wkdy_d_ -0.066                                     
## wkdy_dr_mc_  0.017  0.027                              
## sib_dmmy_MZ -0.548  0.111 -0.007                       
## sib_dmmy_DZ -0.593  0.078 -0.009  0.328                
## wkd___:__MZ -0.008 -0.020 -0.519  0.007  0.004         
## wkd___:__DZ -0.010 -0.018 -0.586  0.004  0.003  0.304
out<- weekday_dur_MCQ_int_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Internalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

chronotype

# chrono 
chrono_int_pheno<- lmer(INT_resid~chronotype_wave_2+(1|rel_family_id), data=abcd_all)
summary(chrono_int_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ chronotype_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5157.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4804 -0.5776  0.0011  0.4891  3.3738 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4813   0.6938  
##  Residual                  0.4897   0.6998  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)         -0.11834    0.02610 1161.25992  -4.534 6.39e-06 ***
## chronotype_wave_2   -0.01239    0.02120 1762.33662  -0.584    0.559    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## chrntyp_w_2 -0.084
out<- chrono_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Internalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

chrono_int<- lmer(INT_resid~avg_chrono+chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_chrono + chrono_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5161.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4752 -0.5767 -0.0029  0.4907  3.3786 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4814   0.6938  
##  Residual                  0.4899   0.6999  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept) -1.193e-01  2.616e-02  1.155e+03  -4.561 5.63e-06 ***
## avg_chrono   4.867e-04  3.115e-02  1.200e+03   0.016    0.988    
## chrono_diff -2.350e-02  2.894e-02  7.919e+02  -0.812    0.417    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch
## avg_chrono  -0.106       
## chrono_diff -0.016  0.000
chrono_int_zyg<- lmer(INT_resid~avg_chrono+chrono_diff+sibDZ_MZ+sib_DZ+sibDZ_MZ*chrono_diff+sib_DZ*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_chrono + chrono_diff + sibDZ_MZ + sib_DZ + sibDZ_MZ *  
##     chrono_diff + sib_DZ * chrono_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5168.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4360 -0.5729 -0.0049  0.4958  3.4120 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4780   0.6914  
##  Residual                  0.4905   0.7004  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)          -1.437e-01  2.785e-02  1.115e+03  -5.162 2.89e-07 ***
## avg_chrono            2.303e-03  3.110e-02  1.199e+03   0.074   0.9410    
## chrono_diff          -1.864e-02  3.033e-02  7.482e+02  -0.615   0.5389    
## sibDZ_MZ             -6.731e-02  6.363e-02  1.099e+03  -1.058   0.2904    
## sib_DZ               -1.391e-01  6.168e-02  1.129e+03  -2.255   0.0243 *  
## chrono_diff:sibDZ_MZ  2.673e-02  6.820e-02  7.301e+02   0.392   0.6952    
## chrono_diff:sib_DZ    3.012e-02  6.953e-02  7.722e+02   0.433   0.6649    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d sDZ_MZ sib_DZ c_:DZ_
## avg_chrono  -0.106                                   
## chrono_diff -0.009  0.000                            
## sibDZ_MZ     0.225 -0.003  0.000                     
## sib_DZ       0.228 -0.022  0.006 -0.148              
## chrn_:DZ_MZ  0.000  0.001  0.165 -0.008 -0.004       
## chrn_df:_DZ  0.006  0.000  0.220 -0.004 -0.011 -0.147
out<- chrono_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Internalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

chrono_int_MZ<- lmer(INT_resid~avg_chrono+chrono_diff+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*chrono_diff+MZ_dummy_sib*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_chrono + chrono_diff + MZ_dummy_DZ + MZ_dummy_sib +  
##     MZ_dummy_DZ * chrono_diff + MZ_dummy_sib * chrono_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5168.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4360 -0.5729 -0.0049  0.4958  3.4120 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4780   0.6914  
##  Residual                  0.4905   0.7004  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -1.886e-01  5.574e-02  1.092e+03  -3.384  0.00074 ***
## avg_chrono                2.303e-03  3.110e-02  1.199e+03   0.074  0.94098    
## chrono_diff              -8.230e-04  5.867e-02  7.160e+02  -0.014  0.98881    
## MZ_dummy_DZ              -2.230e-03  7.470e-02  1.087e+03  -0.030  0.97619    
## MZ_dummy_sib              1.368e-01  6.648e-02  1.126e+03   2.058  0.03977 *  
## chrono_diff:MZ_dummy_DZ  -1.167e-02  8.097e-02  7.177e+02  -0.144  0.88546    
## chrono_diff:MZ_dummy_sib -4.179e-02  7.185e-02  7.661e+02  -0.582  0.56099    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d MZ__DZ MZ_dm_ c_:MZ__D
## avg_chrono  -0.055                                     
## chrono_diff -0.006  0.001                              
## MZ_dummy_DZ -0.744 -0.007  0.005                       
## MZ_dummy_sb -0.837  0.013  0.005  0.624                
## chr_:MZ__DZ  0.005 -0.001 -0.725 -0.005 -0.004         
## chrn_d:MZ__  0.005  0.000 -0.817 -0.004 -0.013  0.592
out<- chrono_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Internalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

chrono_int_DZ<- lmer(INT_resid~avg_chrono+chrono_diff+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*chrono_diff+DZ_dummy_sib*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_chrono + chrono_diff + DZ_dummy_MZ + DZ_dummy_sib +  
##     DZ_dummy_MZ * chrono_diff + DZ_dummy_sib * chrono_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5168.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4360 -0.5729 -0.0049  0.4958  3.4120 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4780   0.6914  
##  Residual                  0.4905   0.7004  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -1.908e-01  4.995e-02  1.086e+03  -3.821  0.00014 ***
## avg_chrono                2.303e-03  3.110e-02  1.199e+03   0.074  0.94098    
## chrono_diff              -1.249e-02  5.580e-02  7.196e+02  -0.224  0.82295    
## DZ_dummy_MZ               2.230e-03  7.470e-02  1.087e+03   0.030  0.97619    
## DZ_dummy_sib              1.391e-01  6.168e-02  1.129e+03   2.255  0.02434 *  
## chrono_diff:DZ_dummy_MZ   1.167e-02  8.097e-02  7.177e+02   0.144  0.88546    
## chrono_diff:DZ_dummy_sib -3.012e-02  6.953e-02  7.722e+02  -0.433  0.66495    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d DZ__MZ DZ_dm_ c_:DZ__M
## avg_chrono  -0.072                                     
## chrono_diff -0.002  0.000                              
## DZ_dummy_MZ -0.666  0.007  0.002                       
## DZ_dummy_sb -0.807  0.022  0.002  0.539                
## chr_:DZ__MZ  0.002  0.001 -0.689 -0.005 -0.001         
## chrn_d:DZ__  0.002  0.000 -0.803 -0.001 -0.011  0.553
out<- chrono_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Internalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

chrono_int_sib<- lmer(INT_resid~avg_chrono+chrono_diff+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*chrono_diff+sib_dummy_DZ*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_int_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_chrono + chrono_diff + sib_dummy_MZ + sib_dummy_DZ +  
##     sib_dummy_MZ * chrono_diff + sib_dummy_DZ * chrono_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5168.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.4360 -0.5729 -0.0049  0.4958  3.4120 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4780   0.6914  
##  Residual                  0.4905   0.7004  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)              -5.177e-02  3.641e-02  1.215e+03  -1.422   0.1554  
## avg_chrono                2.303e-03  3.110e-02  1.199e+03   0.074   0.9410  
## chrono_diff              -4.261e-02  4.148e-02  8.790e+02  -1.027   0.3045  
## sib_dummy_MZ             -1.368e-01  6.648e-02  1.126e+03  -2.058   0.0398 *
## sib_dummy_DZ             -1.391e-01  6.168e-02  1.129e+03  -2.255   0.0243 *
## chrono_diff:sib_dummy_MZ  4.179e-02  7.185e-02  7.661e+02   0.582   0.5610  
## chrono_diff:sib_dummy_DZ  3.012e-02  6.953e-02  7.722e+02   0.433   0.6649  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d sb__MZ sb__DZ c_:__M
## avg_chrono  -0.061                                   
## chrono_diff -0.027  0.000                            
## sib_dmmy_MZ -0.545 -0.013  0.015                     
## sib_dmmy_DZ -0.587 -0.022  0.016  0.322              
## chrn_d:__MZ  0.015  0.000 -0.577 -0.013 -0.009       
## chrn_d:__DZ  0.016  0.000 -0.597 -0.009 -0.011  0.344
out<- chrono_int_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Internalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekend efficiency

weekend_effic_int_pheno<- lmer(INT_resid~avg_weekend_effic+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_int_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekend_effic + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3397
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9844 -0.5517 -0.0011  0.4782  2.9682 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4996   0.7068  
##  Residual                  0.4508   0.6714  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)       -1.010e-01  3.176e-02  8.202e+02  -3.179  0.00153 **
## avg_weekend_effic -1.859e-02  3.008e-02  1.131e+03  -0.618  0.53682   
## covid              2.954e-03  1.936e-01  1.043e+03   0.015  0.98783   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wknd_ff -0.074       
## covid       -0.148  0.036
out<- weekend_effic_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Internalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekend_effic_int<- lmer(INT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3400
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.95509 -0.54438 -0.00036  0.47555  2.96943 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4999   0.7070  
##  Residual                  0.4507   0.6714  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                         Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)           -1.029e-01  3.184e-02  8.154e+02  -3.233  0.00128 **
## fam_avg_weekend_effic  8.691e-03  4.287e-02  8.666e+02   0.203  0.83941   
## weekend_effic_diff    -4.503e-02  4.221e-02  4.555e+02  -1.067  0.28656   
## covid                  5.444e-03  1.936e-01  1.042e+03   0.028  0.97758   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__
## fm_vg_wknd_ -0.101              
## wknd_ffc_df -0.004  0.000       
## covid       -0.148  0.036  0.015
weekend_effic_int_zyg<- lmer(INT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekend_effic_diff+sib_DZ*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekend_effic_diff + sib_DZ *  
##     weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3408.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.93639 -0.54578  0.00584  0.47325  2.98502 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4975   0.7053  
##  Residual                  0.4524   0.6726  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                               Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                 -1.162e-01  3.306e-02  7.829e+02  -3.516 0.000463
## fam_avg_weekend_effic        6.838e-03  4.293e-02  8.651e+02   0.159 0.873474
## weekend_effic_diff          -3.841e-02  4.619e-02  4.457e+02  -0.832 0.406096
## covid                       -9.813e-03  1.937e-01  1.039e+03  -0.051 0.959614
## sibDZ_MZ                    -4.673e-02  7.503e-02  7.578e+02  -0.623 0.533657
## sib_DZ                      -1.253e-01  7.264e-02  8.026e+02  -1.725 0.084950
## weekend_effic_diff:sibDZ_MZ  2.039e-02  1.105e-01  4.427e+02   0.185 0.853651
## weekend_effic_diff:sib_DZ    3.250e-02  9.659e-02  4.508e+02   0.336 0.736678
##                                
## (Intercept)                 ***
## fam_avg_weekend_effic          
## weekend_effic_diff             
## covid                          
## sibDZ_MZ                       
## sib_DZ                      .  
## weekend_effic_diff:sibDZ_MZ    
## weekend_effic_diff:sib_DZ      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wknd_ -0.102                                          
## wknd_ffc_df -0.005  0.000                                   
## covid       -0.137  0.038  0.011                            
## sibDZ_MZ     0.230 -0.048 -0.002 -0.006                     
## sib_DZ       0.122  0.045 -0.002  0.046 -0.090              
## wkn__:DZ_MZ -0.001 -0.001  0.340 -0.006 -0.004  0.001       
## wknd_f_:_DZ -0.002 -0.001  0.177 -0.004  0.002 -0.003 -0.111
out<- weekend_effic_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Internalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekend_effic_int_MZ<- lmer(INT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekend_effic_diff+MZ_dummy_sib*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekend_effic_diff +  
##     MZ_dummy_sib * weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3408.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.93639 -0.54578  0.00584  0.47325  2.98502 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4975   0.7053  
##  Residual                  0.4524   0.6726  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                     -1.474e-01  6.601e-02  7.472e+02  -2.233
## fam_avg_weekend_effic            6.838e-03  4.293e-02  8.651e+02   0.159
## weekend_effic_diff              -2.482e-02  9.934e-02  4.407e+02  -0.250
## covid                           -9.813e-03  1.937e-01  1.039e+03  -0.051
## MZ_dummy_DZ                     -1.592e-02  8.625e-02  7.467e+02  -0.185
## MZ_dummy_sib                     1.094e-01  8.037e-02  7.891e+02   1.361
## weekend_effic_diff:MZ_dummy_DZ  -4.138e-03  1.254e-01  4.412e+02  -0.033
## weekend_effic_diff:MZ_dummy_sib -3.664e-02  1.156e-01  4.472e+02  -0.317
##                                 Pr(>|t|)  
## (Intercept)                       0.0259 *
## fam_avg_weekend_effic             0.8735  
## weekend_effic_diff                0.8028  
## covid                             0.9596  
## MZ_dummy_DZ                       0.8536  
## MZ_dummy_sib                      0.1739  
## weekend_effic_diff:MZ_dummy_DZ    0.9737  
## weekend_effic_diff:MZ_dummy_sib   0.7513  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wknd_ -0.088                                             
## wknd_ffc_df -0.004 -0.001                                      
## covid       -0.073  0.038  0.000                               
## MZ_dummy_DZ -0.763  0.061  0.003  0.024                        
## MZ_dummy_sb -0.812  0.025  0.004 -0.016  0.622                 
## wk__:MZ__DZ  0.003  0.001 -0.792  0.004 -0.004 -0.003          
## wknd__:MZ__  0.003  0.001 -0.860  0.008 -0.003 -0.003  0.681
out<- weekend_effic_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Internalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekend_effic_int_DZ<- lmer(INT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekend_effic_diff+DZ_dummy_sib*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekend_effic_diff +  
##     DZ_dummy_sib * weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3408.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.93639 -0.54578  0.00584  0.47325  2.98502 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4975   0.7053  
##  Residual                  0.4524   0.6726  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                     -1.633e-01  5.580e-02  7.496e+02  -2.927
## fam_avg_weekend_effic            6.838e-03  4.293e-02  8.651e+02   0.159
## weekend_effic_diff              -2.896e-02  7.647e-02  4.420e+02  -0.379
## covid                           -9.813e-03  1.937e-01  1.039e+03  -0.051
## DZ_dummy_MZ                      1.592e-02  8.625e-02  7.467e+02   0.185
## DZ_dummy_sib                     1.253e-01  7.264e-02  8.026e+02   1.725
## weekend_effic_diff:DZ_dummy_MZ   4.138e-03  1.254e-01  4.412e+02   0.033
## weekend_effic_diff:DZ_dummy_sib -3.250e-02  9.659e-02  4.508e+02  -0.336
##                                 Pr(>|t|)   
## (Intercept)                      0.00353 **
## fam_avg_weekend_effic            0.87347   
## weekend_effic_diff               0.70512   
## covid                            0.95961   
## DZ_dummy_MZ                      0.85360   
## DZ_dummy_sib                     0.08495 . 
## weekend_effic_diff:DZ_dummy_MZ   0.97368   
## weekend_effic_diff:DZ_dummy_sib  0.73668   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wknd_ -0.010                                             
## wknd_ffc_df -0.005  0.000                                      
## covid       -0.049  0.038  0.007                               
## DZ_dummy_MZ -0.644 -0.061  0.003 -0.024                        
## DZ_dummy_sb -0.764 -0.045  0.003 -0.046  0.499                 
## wk__:DZ__MZ  0.003 -0.001 -0.610 -0.004 -0.004 -0.002          
## wknd__:DZ__  0.004  0.001 -0.792  0.004 -0.003 -0.003  0.483
out<- weekend_effic_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Internalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekend_effic_int_sib<- lmer(INT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekend_effic_diff+sib_dummy_DZ*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_int_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekend_effic_diff +  
##     sib_dummy_DZ * weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3408.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.93639 -0.54578  0.00584  0.47325  2.98502 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4975   0.7053  
##  Residual                  0.4524   0.6726  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                     -3.803e-02  4.690e-02  8.865e+02  -0.811
## fam_avg_weekend_effic            6.838e-03  4.293e-02  8.651e+02   0.159
## weekend_effic_diff              -6.145e-02  5.902e-02  4.663e+02  -1.041
## covid                           -9.813e-03  1.937e-01  1.039e+03  -0.051
## sib_dummy_MZ                    -1.094e-01  8.037e-02  7.891e+02  -1.361
## sib_dummy_DZ                    -1.253e-01  7.264e-02  8.026e+02  -1.725
## weekend_effic_diff:sib_dummy_MZ  3.664e-02  1.156e-01  4.472e+02   0.317
## weekend_effic_diff:sib_dummy_DZ  3.250e-02  9.659e-02  4.508e+02   0.336
##                                 Pr(>|t|)  
## (Intercept)                       0.4177  
## fam_avg_weekend_effic             0.8735  
## weekend_effic_diff                0.2983  
## covid                             0.9596  
## sib_dummy_MZ                      0.1739  
## sib_dummy_DZ                      0.0849 .
## weekend_effic_diff:sib_dummy_MZ   0.7513  
## weekend_effic_diff:sib_dummy_DZ   0.7367  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wknd_ -0.081                                           
## wknd_ffc_df -0.002  0.001                                    
## covid       -0.129  0.038  0.016                             
## sib_dmmy_MZ -0.571 -0.025  0.000  0.016                      
## sib_dmmy_DZ -0.640  0.045  0.001  0.046  0.368               
## wknd__:__MZ  0.001 -0.001 -0.511 -0.008 -0.003  0.000        
## wknd__:__DZ  0.000 -0.001 -0.611 -0.004  0.000 -0.003  0.312
out<- weekend_effic_int_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Internalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekday efficiency

weekday_effic_int_pheno<- lmer(INT_resid~avg_weekday_effic+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_int_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ avg_weekday_effic + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3426.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9911 -0.5401  0.0119  0.4754  3.0210 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5077   0.7125  
##  Residual                  0.4419   0.6648  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)       -1.025e-01  3.160e-02  8.255e+02  -3.243  0.00123 **
## avg_weekday_effic -6.770e-02  2.791e-02  1.191e+03  -2.426  0.01542 * 
## covid             -8.587e-03  1.935e-01  1.060e+03  -0.044  0.96461   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wkdy_ff -0.040       
## covid       -0.146  0.037
out<- weekday_effic_int_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Internalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekday_effic_int<- lmer(INT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_int)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3429.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.96670 -0.53274  0.00719  0.47414  3.04649 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5074   0.7123  
##  Residual                  0.4421   0.6649  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                         Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)           -1.037e-01  3.162e-02  8.248e+02  -3.279  0.00108 **
## fam_avg_weekday_effic -3.981e-02  3.878e-02  8.889e+02  -1.027  0.30492   
## weekday_effic_diff    -9.830e-02  4.065e-02  4.705e+02  -2.419  0.01596 * 
## covid                 -6.565e-03  1.935e-01  1.060e+03  -0.034  0.97294   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__
## fm_vg_wkdy_ -0.054              
## wkdy_ffc_df -0.002 -0.011       
## covid       -0.146  0.033  0.018
weekday_effic_int_zyg<- lmer(INT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekday_effic_diff+sib_DZ*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_int_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekday_effic_diff + sib_DZ *  
##     weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3436.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.97509 -0.53583  0.00413  0.47269  2.99064 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5070   0.7120  
##  Residual                  0.4414   0.6643  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                               Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -0.11605    0.03291  791.78451  -3.526 0.000446
## fam_avg_weekday_effic         -0.03593    0.03894  887.44225  -0.923 0.356452
## weekday_effic_diff            -0.08092    0.04215  460.70910  -1.920 0.055501
## covid                         -0.02144    0.19359 1058.37767  -0.111 0.911849
## sibDZ_MZ                      -0.03590    0.07523  763.32579  -0.477 0.633359
## sib_DZ                        -0.12286    0.07226  811.40558  -1.700 0.089468
## weekday_effic_diff:sibDZ_MZ    0.13199    0.09789  452.62518   1.348 0.178212
## weekday_effic_diff:sib_DZ      0.06142    0.09242  472.79572   0.665 0.506610
##                                
## (Intercept)                 ***
## fam_avg_weekday_effic          
## weekday_effic_diff          .  
## covid                          
## sibDZ_MZ                       
## sib_DZ                      .  
## weekday_effic_diff:sibDZ_MZ    
## weekday_effic_diff:sib_DZ      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wkdy_ -0.077                                          
## wkdy_ffc_df -0.002 -0.008                                   
## covid       -0.135  0.033  0.015                            
## sibDZ_MZ     0.237 -0.094  0.002 -0.007                     
## sib_DZ       0.127 -0.014 -0.007  0.044 -0.085              
## wkd__:DZ_MZ  0.003  0.004  0.256 -0.010  0.000  0.004       
## wkdy_f_:_DZ -0.010  0.015  0.065  0.013  0.003 -0.002 -0.042
out<- weekday_effic_int_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Internalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekday_effic_int_MZ<- lmer(INT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekday_effic_diff+MZ_dummy_sib*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_int_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekday_effic_diff +  
##     MZ_dummy_sib * weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3436.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.97509 -0.53583  0.00413  0.47269  2.99064 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5070   0.7120  
##  Residual                  0.4414   0.6643  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                     -1.400e-01  6.618e-02  7.537e+02  -2.115
## fam_avg_weekday_effic           -3.593e-02  3.894e-02  8.874e+02  -0.923
## weekday_effic_diff               7.074e-03  8.629e-02  4.469e+02   0.082
## covid                           -2.144e-02  1.936e-01  1.058e+03  -0.111
## MZ_dummy_DZ                     -2.553e-02  8.619e-02  7.519e+02  -0.296
## MZ_dummy_sib                     9.733e-02  8.063e-02  7.958e+02   1.207
## weekday_effic_diff:MZ_dummy_DZ  -1.013e-01  1.100e-01  4.519e+02  -0.921
## weekday_effic_diff:MZ_dummy_sib -1.627e-01  1.065e-01  4.609e+02  -1.528
##                                 Pr(>|t|)  
## (Intercept)                       0.0347 *
## fam_avg_weekday_effic             0.3565  
## weekday_effic_diff                0.9347  
## covid                             0.9118  
## MZ_dummy_DZ                       0.7671  
## MZ_dummy_sib                      0.2278  
## weekday_effic_diff:MZ_dummy_DZ    0.3576  
## weekday_effic_diff:MZ_dummy_sib   0.1272  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wkdy_ -0.110                                             
## wkdy_ffc_df  0.001 -0.001                                      
## covid       -0.073  0.033  0.000                               
## MZ_dummy_DZ -0.765  0.076 -0.001  0.024                        
## MZ_dummy_sb -0.816  0.094 -0.001 -0.013  0.627                 
## wk__:MZ__DZ -0.002  0.003 -0.785  0.014 -0.003  0.001          
## wkdy__:MZ__  0.000 -0.010 -0.810  0.004  0.000  0.003  0.636
out<- weekday_effic_int_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Internalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekday_effic_int_DZ<- lmer(INT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekday_effic_diff+DZ_dummy_sib*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_int_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekday_effic_diff +  
##     DZ_dummy_sib * weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3436.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.97509 -0.53583  0.00413  0.47269  2.99064 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5070   0.7120  
##  Residual                  0.4414   0.6643  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                       -0.16552    0.05552  757.87805  -2.981
## fam_avg_weekday_effic             -0.03593    0.03894  887.44225  -0.923
## weekday_effic_diff                -0.09420    0.06818  459.95513  -1.382
## covid                             -0.02144    0.19359 1058.37767  -0.111
## DZ_dummy_MZ                        0.02553    0.08619  751.90174   0.296
## DZ_dummy_sib                       0.12286    0.07226  811.40558   1.700
## weekday_effic_diff:DZ_dummy_MZ     0.10127    0.10997  451.87838   0.921
## weekday_effic_diff:DZ_dummy_sib   -0.06142    0.09242  472.79572  -0.665
##                                 Pr(>|t|)   
## (Intercept)                      0.00296 **
## fam_avg_weekday_effic            0.35645   
## weekday_effic_diff               0.16774   
## covid                            0.91185   
## DZ_dummy_MZ                      0.76712   
## DZ_dummy_sib                     0.08947 . 
## weekday_effic_diff:DZ_dummy_MZ   0.35760   
## weekday_effic_diff:DZ_dummy_sib  0.50661   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wkdy_ -0.013                                             
## wkdy_ffc_df -0.012  0.003                                      
## covid       -0.049  0.033  0.023                               
## DZ_dummy_MZ -0.641 -0.076  0.006 -0.024                        
## DZ_dummy_sb -0.764  0.014  0.008 -0.044  0.494                 
## wk__:DZ__MZ  0.008 -0.003 -0.620 -0.014 -0.003 -0.005          
## wkdy__:DZ__  0.009 -0.015 -0.738 -0.013 -0.004 -0.002  0.457
out<- weekday_effic_int_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Internalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekday_effic_int_sib<- lmer(INT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekday_effic_diff+sib_dummy_DZ*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_int_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: INT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekday_effic_diff +  
##     sib_dummy_DZ * weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3436.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.97509 -0.53583  0.00413  0.47269  2.99064 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5070   0.7120  
##  Residual                  0.4414   0.6643  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                       -0.04266    0.04659  895.89008  -0.916
## fam_avg_weekday_effic             -0.03593    0.03894  887.44225  -0.923
## weekday_effic_diff                -0.15563    0.06240  489.11194  -2.494
## covid                             -0.02144    0.19359 1058.37767  -0.111
## sib_dummy_MZ                      -0.09733    0.08063  795.83298  -1.207
## sib_dummy_DZ                      -0.12286    0.07226  811.40558  -1.700
## weekday_effic_diff:sib_dummy_MZ    0.16270    0.10649  460.91086   1.528
## weekday_effic_diff:sib_dummy_DZ    0.06142    0.09242  472.79572   0.665
##                                 Pr(>|t|)  
## (Intercept)                       0.3601  
## fam_avg_weekday_effic             0.3565  
## weekday_effic_diff                0.0130 *
## covid                             0.9118  
## sib_dummy_MZ                      0.2278  
## sib_dummy_DZ                      0.0895 .
## weekday_effic_diff:sib_dummy_MZ   0.1272  
## weekday_effic_diff:sib_dummy_DZ   0.5066  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wkdy_  0.007                                           
## wkdy_ffc_df  0.008 -0.018                                    
## covid       -0.126  0.033  0.006                             
## sib_dmmy_MZ -0.571 -0.094 -0.003  0.013                      
## sib_dmmy_DZ -0.640 -0.014 -0.005  0.044  0.369               
## wkdy__:__MZ -0.005  0.010 -0.586 -0.004  0.003  0.003        
## wkdy__:__DZ -0.008  0.015 -0.675  0.013  0.002 -0.002  0.396
out<- weekday_effic_int_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Internalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

Externalizing

variability

# variability (fitbit)
variability_EXT_pheno<- lmer(EXT_resid~variability+covid+(1|rel_family_id), data=abcd_all)
summary(variability_EXT_pheno)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ variability + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3445.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1982 -0.5364 -0.1090  0.4728  3.2038 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5304   0.7283  
##  Residual                  0.4398   0.6631  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)   -0.07411    0.03201  806.63674  -2.315   0.0208 *  
## variability    0.11449    0.02798 1265.54373   4.091 4.56e-05 ***
## covid         -0.02343    0.19587 1061.25015  -0.120   0.9048    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) vrblty
## variability  0.036       
## covid       -0.146 -0.064
out<- variability_EXT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Externalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

variability_EXT<- lmer(EXT_resid~avg_variabilitiy+variabiltiy_diff+covid+(1|rel_family_id), data=abcd_all)
summary(variability_EXT) ### don't need to save this one, just for model comparison
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + (1 |  
##     rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3445.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2147 -0.5282 -0.1145  0.4777  3.1458 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5306   0.7285  
##  Residual                  0.4379   0.6618  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                    Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)        -0.07281    0.03200  807.99106  -2.276   0.0231 *  
## avg_variabilitiy    0.15743    0.03556  857.73363   4.427 1.08e-05 ***
## variabiltiy_diff    0.04531    0.04503  442.96213   1.006   0.3149    
## covid              -0.03299    0.19578 1062.70893  -0.169   0.8662    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_
## avg_varblty  0.041              
## varblty_dff  0.006  0.003       
## covid       -0.146 -0.067 -0.019
variability_EXT_zyg<- lmer(EXT_resid~avg_variabilitiy+variabiltiy_diff+covid+sibDZ_MZ+sib_DZ+variabiltiy_diff*sibDZ_MZ+variabiltiy_diff*sib_DZ+(1|rel_family_id), data=abcd_all)
summary(variability_EXT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + sibDZ_MZ +  
##     sib_DZ + variabiltiy_diff * sibDZ_MZ + variabiltiy_diff *  
##     sib_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3446.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1847 -0.5357 -0.1104  0.4630  3.2031 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5227   0.7230  
##  Residual                  0.4380   0.6618  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                             Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)                 -0.09556    0.03312  772.63029  -2.885  0.00402 ** 
## avg_variabilitiy             0.15866    0.03544  855.19929   4.477  8.6e-06 ***
## variabiltiy_diff             0.03821    0.04708  436.76289   0.812  0.41745    
## covid                       -0.06171    0.19521 1056.98885  -0.316  0.75199    
## sibDZ_MZ                    -0.09467    0.07561  744.97566  -1.252  0.21091    
## sib_DZ                      -0.19057    0.07289  791.23501  -2.614  0.00911 ** 
## variabiltiy_diff:sibDZ_MZ   -0.07103    0.11069  432.54500  -0.642  0.52144    
## variabiltiy_diff:sib_DZ     -0.16019    0.10129  443.28957  -1.582  0.11447    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  sDZ_MZ sib_DZ v_:DZ_
## avg_varblty  0.045                                          
## varblty_dff  0.004  0.002                                   
## covid       -0.136 -0.068 -0.016                            
## sibDZ_MZ     0.233  0.041 -0.002 -0.007                     
## sib_DZ       0.125 -0.031 -0.002  0.046 -0.088              
## vrbl_:DZ_MZ -0.004 -0.004  0.291  0.010  0.000  0.001       
## vrblty_:_DZ -0.003 -0.005 -0.014  0.011  0.001  0.005  0.009
out<- variability_EXT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Externalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

variability_EXT_MZ<- lmer(EXT_resid~avg_variabilitiy+variabiltiy_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+variabiltiy_diff*MZ_dummy_DZ+variabiltiy_diff*MZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(variability_EXT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + MZ_dummy_DZ +  
##     MZ_dummy_sib + variabiltiy_diff * MZ_dummy_DZ + variabiltiy_diff *  
##     MZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3446.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1847 -0.5357 -0.1104  0.4630  3.2031 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5227   0.7230  
##  Residual                  0.4380   0.6618  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -1.587e-01  6.646e-02  7.352e+02  -2.388   0.0172
## avg_variabilitiy               1.587e-01  3.544e-02  8.552e+02   4.477  8.6e-06
## variabiltiy_diff              -9.139e-03  9.842e-02  4.297e+02  -0.093   0.9261
## covid                         -6.171e-02  1.952e-01  1.057e+03  -0.316   0.7520
## MZ_dummy_DZ                   -6.124e-04  8.679e-02  7.346e+02  -0.007   0.9944
## MZ_dummy_sib                   1.900e-01  8.098e-02  7.758e+02   2.346   0.0192
## variabiltiy_diff:MZ_dummy_DZ  -9.069e-03  1.213e-01  4.290e+02  -0.075   0.9404
## variabiltiy_diff:MZ_dummy_sib  1.511e-01  1.221e-01  4.398e+02   1.237   0.2166
##                                  
## (Intercept)                   *  
## avg_variabilitiy              ***
## variabiltiy_diff                 
## covid                            
## MZ_dummy_DZ                      
## MZ_dummy_sib                  *  
## variabiltiy_diff:MZ_dummy_DZ     
## variabiltiy_diff:MZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  MZ__DZ MZ_dm_ v_:MZ__D
## avg_varblty  0.053                                            
## varblty_dff -0.001 -0.002                                     
## covid       -0.073 -0.068  0.000                              
## MZ_dummy_DZ -0.764 -0.049  0.001  0.025                       
## MZ_dummy_sb -0.815 -0.024  0.001 -0.014  0.624                
## vrb_:MZ__DZ  0.001  0.001 -0.811 -0.005  0.000 -0.001         
## vrblt_:MZ__  0.002  0.005 -0.806 -0.014 -0.001  0.002  0.654
out<- variability_EXT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Externalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

variability_EXT_DZ<- lmer(EXT_resid~avg_variabilitiy+variabiltiy_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+variabiltiy_diff*DZ_dummy_MZ+variabiltiy_diff*DZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(variability_EXT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + DZ_dummy_MZ +  
##     DZ_dummy_sib + variabiltiy_diff * DZ_dummy_MZ + variabiltiy_diff *  
##     DZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3446.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1847 -0.5357 -0.1104  0.4630  3.2031 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5227   0.7230  
##  Residual                  0.4380   0.6618  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -1.593e-01  5.600e-02  7.377e+02  -2.844  0.00457
## avg_variabilitiy               1.587e-01  3.544e-02  8.552e+02   4.477  8.6e-06
## variabiltiy_diff              -1.821e-02  7.093e-02  4.276e+02  -0.257  0.79753
## covid                         -6.171e-02  1.952e-01  1.057e+03  -0.316  0.75199
## DZ_dummy_MZ                    6.124e-04  8.679e-02  7.346e+02   0.007  0.99437
## DZ_dummy_sib                   1.906e-01  7.289e-02  7.912e+02   2.614  0.00911
## variabiltiy_diff:DZ_dummy_MZ   9.069e-03  1.213e-01  4.290e+02   0.075  0.94044
## variabiltiy_diff:DZ_dummy_sib  1.602e-01  1.013e-01  4.433e+02   1.582  0.11447
##                                  
## (Intercept)                   ** 
## avg_variabilitiy              ***
## variabiltiy_diff                 
## covid                            
## DZ_dummy_MZ                      
## DZ_dummy_sib                  ** 
## variabiltiy_diff:DZ_dummy_MZ     
## variabiltiy_diff:DZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  DZ__MZ DZ_dm_ v_:DZ__M
## avg_varblty -0.012                                            
## varblty_dff  0.003  0.000                                     
## covid       -0.047 -0.068 -0.008                              
## DZ_dummy_MZ -0.643  0.049 -0.001 -0.025                       
## DZ_dummy_sb -0.765  0.031 -0.001 -0.046  0.497                
## vrb_:DZ__MZ -0.002 -0.001 -0.585  0.005  0.000  0.001         
## vrblt_:DZ__ -0.001  0.005 -0.700 -0.011  0.002  0.005  0.409
out<- variability_EXT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Externalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)


variability_EXT_sib<- lmer(EXT_resid~avg_variabilitiy+variabiltiy_diff+covid+sib_dummy_MZ+sib_dummy_DZ+variabiltiy_diff*sib_dummy_MZ+variabiltiy_diff*sib_dummy_DZ+(1|rel_family_id), data=abcd_all)
summary(variability_EXT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + sib_dummy_MZ +  
##     sib_dummy_DZ + variabiltiy_diff * sib_dummy_MZ + variabiltiy_diff *  
##     sib_dummy_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3446.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1847 -0.5357 -0.1104  0.4630  3.2031 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5227   0.7230  
##  Residual                  0.4380   0.6618  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                      0.03128    0.04697  877.44676   0.666  0.50566
## avg_variabilitiy                 0.15866    0.03544  855.19929   4.477  8.6e-06
## variabiltiy_diff                 0.14198    0.07232  459.37681   1.963  0.05021
## covid                           -0.06171    0.19521 1056.98885  -0.316  0.75199
## sib_dummy_MZ                    -0.18996    0.08098  775.80899  -2.346  0.01924
## sib_dummy_DZ                    -0.19057    0.07289  791.23501  -2.614  0.00911
## variabiltiy_diff:sib_dummy_MZ   -0.15112    0.12214  439.81301  -1.237  0.21662
## variabiltiy_diff:sib_dummy_DZ   -0.16019    0.10129  443.28957  -1.582  0.11447
##                                  
## (Intercept)                      
## avg_variabilitiy              ***
## variabiltiy_diff              .  
## covid                            
## sib_dummy_MZ                  *  
## sib_dummy_DZ                  ** 
## variabiltiy_diff:sib_dummy_MZ    
## variabiltiy_diff:sib_dummy_DZ    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  sb__MZ sb__DZ v_:__M
## avg_varblty  0.034                                          
## varblty_dff  0.010  0.006                                   
## covid       -0.128 -0.068 -0.023                            
## sib_dmmy_MZ -0.571  0.024 -0.004  0.014                     
## sib_dmmy_DZ -0.640 -0.031 -0.006  0.046  0.367              
## vrblt_:__MZ -0.006 -0.005 -0.592  0.014  0.002  0.003       
## vrblt_:__DZ -0.006 -0.005 -0.714  0.011  0.003  0.005  0.423
out<- variability_EXT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Externalizing",
         model="Dummy Sib")
abcd_out<- rbind(abcd_out, out)

social jet lag

# jetlag 
jetlag_EXT_pheno<- lmer(EXT_resid~social_jet_lag_wave_2+(1|rel_family_id), data=abcd_all)
summary(jetlag_EXT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ social_jet_lag_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5913.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7367 -0.5355 -0.1115  0.4759  3.6415 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5208   0.7216  
##  Residual                  0.4912   0.7008  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                         Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)             -0.06581    0.02559 1225.35931  -2.571   0.0102 *
## social_jet_lag_wave_2    0.01594    0.02279 2135.81829   0.700   0.4842  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## scl_jt_l__2 0.037
out<- jetlag_EXT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Externalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

jetlag_EXT<- lmer(EXT_resid~avg_jetlag+jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_EXT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_jetlag + jetlag_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5917.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7301 -0.5352 -0.1121  0.4787  3.6404 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5210   0.7218  
##  Residual                  0.4914   0.7010  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)   -0.06604    0.02562 1222.98666  -2.578   0.0101 *
## avg_jetlag     0.01027    0.03289 1260.28471   0.312   0.7550  
## jetlag_diff    0.02114    0.03148 1071.48672   0.672   0.5020  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt
## avg_jetlag  0.053        
## jetlag_diff 0.001  0.004
jetlag_EXT_zyg<- lmer(EXT_resid~avg_jetlag+jetlag_diff+sibDZ_MZ+sib_DZ+sibDZ_MZ*jetlag_diff+sib_DZ*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_EXT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_jetlag + jetlag_diff + sibDZ_MZ + sib_DZ + sibDZ_MZ *  
##     jetlag_diff + sib_DZ * jetlag_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5920.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7647 -0.5141 -0.1105  0.4755  3.6103 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5147   0.7174  
##  Residual                  0.4924   0.7017  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)            -0.09625    0.02723 1170.03470  -3.534 0.000425 ***
## avg_jetlag              0.01020    0.03278 1257.70274   0.311 0.755606    
## jetlag_diff             0.02241    0.03774  961.59704   0.594 0.552781    
## sibDZ_MZ               -0.11387    0.06264 1153.52342  -1.818 0.069326 .  
## sib_DZ                 -0.14204    0.06039 1193.09775  -2.352 0.018832 *  
## jetlag_diff:sibDZ_MZ   -0.05060    0.09093  948.56435  -0.556 0.578016    
## jetlag_diff:sib_DZ      0.05404    0.07788  985.85266   0.694 0.487934    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d sDZ_MZ sib_DZ j_:DZ_
## avg_jetlag   0.049                                   
## jetlag_diff  0.004  0.004                            
## sibDZ_MZ     0.232 -0.011  0.001                     
## sib_DZ       0.224  0.010  0.004 -0.146              
## jtlg_:DZ_MZ  0.001  0.001  0.361  0.004 -0.002       
## jtlg_df:_DZ  0.004  0.001  0.332 -0.003  0.004 -0.207
out<- jetlag_EXT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Externalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

jetlag_EXT_MZ<- lmer(EXT_resid~avg_jetlag+jetlag_diff+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*jetlag_diff+MZ_dummy_sib*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_EXT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_jetlag + jetlag_diff + MZ_dummy_DZ + MZ_dummy_sib +  
##     MZ_dummy_DZ * jetlag_diff + MZ_dummy_sib * jetlag_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5920.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7647 -0.5141 -0.1105  0.4755  3.6103 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5147   0.7174  
##  Residual                  0.4924   0.7017  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)                -0.17217    0.05488 1142.21257  -3.137  0.00175 **
## avg_jetlag                  0.01020    0.03278 1257.70274   0.311  0.75561   
## jetlag_diff                -0.01133    0.08217  940.39949  -0.138  0.89041   
## MZ_dummy_DZ                 0.04285    0.07339 1140.05915   0.584  0.55943   
## MZ_dummy_sib                0.18490    0.06545 1187.58734   2.825  0.00481 **
## jetlag_diff:MZ_dummy_DZ     0.07762    0.10606  937.27783   0.732  0.46443   
## jetlag_diff:MZ_dummy_sib    0.02358    0.09123  977.70678   0.259  0.79607   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d MZ__DZ MZ_dm_ j_:MZ__D
## avg_jetlag   0.016                                     
## jetlag_diff  0.004  0.002                              
## MZ_dummy_DZ -0.747  0.013 -0.003                       
## MZ_dummy_sb -0.838  0.006 -0.004  0.627                
## jtl_:MZ__DZ -0.003  0.000 -0.775  0.005  0.003         
## jtlg_d:MZ__ -0.004 -0.001 -0.901  0.003  0.003  0.698
out<- jetlag_EXT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Externalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

jetlag_EXT_DZ<- lmer(EXT_resid~avg_jetlag+jetlag_diff+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*jetlag_diff+DZ_dummy_sib*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_EXT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_jetlag + jetlag_diff + DZ_dummy_MZ + DZ_dummy_sib +  
##     DZ_dummy_MZ * jetlag_diff + DZ_dummy_sib * jetlag_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5920.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7647 -0.5141 -0.1105  0.4755  3.6103 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5147   0.7174  
##  Residual                  0.4924   0.7017  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)                -0.12931    0.04876 1138.08565  -2.652  0.00812 **
## avg_jetlag                  0.01020    0.03278 1257.70274   0.311  0.75561   
## jetlag_diff                 0.06630    0.06705  932.59179   0.989  0.32304   
## DZ_dummy_MZ                -0.04285    0.07339 1140.05915  -0.584  0.55943   
## DZ_dummy_sib                0.14204    0.06039 1193.09775   2.352  0.01883 * 
## jetlag_diff:DZ_dummy_MZ    -0.07762    0.10606  937.27783  -0.732  0.46443   
## jetlag_diff:DZ_dummy_sib   -0.05404    0.07788  985.85266  -0.694  0.48793   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d DZ__MZ DZ_dm_ j_:DZ__M
## avg_jetlag   0.038                                     
## jetlag_diff  0.007  0.003                              
## DZ_dummy_MZ -0.664 -0.013 -0.004                       
## DZ_dummy_sb -0.807 -0.010 -0.005  0.536                
## jtl_:DZ__MZ -0.004  0.000 -0.632  0.005  0.003         
## jtlg_d:DZ__ -0.006 -0.001 -0.861  0.004  0.004  0.544
out<- jetlag_EXT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Externalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

jetlag_EXT_sib<- lmer(EXT_resid~avg_jetlag+jetlag_diff+DZ_dummy_MZ+sib_dummy_DZ+DZ_dummy_MZ*jetlag_diff+sib_dummy_DZ*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_EXT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_jetlag + jetlag_diff + DZ_dummy_MZ + sib_dummy_DZ +  
##     DZ_dummy_MZ * jetlag_diff + sib_dummy_DZ * jetlag_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5920.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7647 -0.5141 -0.1105  0.4755  3.6103 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5147   0.7174  
##  Residual                  0.4924   0.7017  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)                 0.01273    0.03569 1301.49748   0.357  0.72140   
## avg_jetlag                  0.01020    0.03278 1257.70274   0.311  0.75561   
## jetlag_diff                 0.01226    0.03962 1156.82133   0.309  0.75708   
## DZ_dummy_MZ                -0.18490    0.06545 1187.58733  -2.825  0.00481 **
## sib_dummy_DZ               -0.14204    0.06039 1193.09775  -2.352  0.01883 * 
## jetlag_diff:DZ_dummy_MZ    -0.02358    0.09123  977.70678  -0.259  0.79607   
## jetlag_diff:sib_dummy_DZ    0.05404    0.07788  985.85266   0.694  0.48793   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d DZ__MZ sb__DZ j_:DZ_
## avg_jetlag   0.036                                   
## jetlag_diff -0.003  0.003                            
## DZ_dummy_MZ -0.545 -0.006  0.001                     
## sib_dmmy_DZ -0.590  0.010  0.002  0.322              
## jtl_:DZ__MZ  0.001  0.001 -0.434  0.003 -0.001       
## jtlg_d:__DZ  0.001  0.001 -0.509 -0.001  0.004  0.221
out<- jetlag_EXT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Externalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekend duration (fitbit)

# weekend duration (fitbit)
weekend_dur_EXT_pheno<- lmer(EXT_resid~avg_weekend_dur+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_EXT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekend_dur + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3425.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.21789 -0.53619 -0.09613  0.46480  3.05538 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5469   0.7395  
##  Residual                  0.4398   0.6632  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                   Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)       -0.07884    0.03248  803.49681  -2.428   0.0154 *
## avg_weekend_dur   -0.04270    0.02869 1258.01454  -1.488   0.1370  
## covid              0.02633    0.19719 1057.33661   0.134   0.8938  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wknd_dr -0.043       
## covid       -0.145  0.021
out<- weekend_dur_EXT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekend_dur_EXT<- lmer(EXT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_EXT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3427.9
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.24835 -0.55695 -0.09273  0.46221  3.02440 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5481   0.7403  
##  Residual                  0.4388   0.6624  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                       Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)           -0.08024    0.03251  803.41618  -2.469   0.0138 *
## fam_avg_weekend_dur   -0.01534    0.03613  841.46377  -0.425   0.6712  
## weekend_dur_diff      -0.08937    0.04710  437.73416  -1.897   0.0584 .
## covid                  0.03674    0.19737 1057.34383   0.186   0.8524  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__
## fm_vg_wknd_ -0.056              
## wknd_dr_dff  0.002  0.001       
## covid       -0.146  0.042 -0.019
weekend_dur_EXT_zyg<- lmer(EXT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekend_dur_diff+sib_DZ*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_EXT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekend_dur_diff + sib_DZ *  
##     weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3431.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.21876 -0.54914 -0.08233  0.46307  2.99550 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5388   0.7341  
##  Residual                  0.4417   0.6646  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                             Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)               -1.037e-01  3.369e-02  7.691e+02  -3.079  0.00215 **
## fam_avg_weekend_dur       -8.534e-03  3.611e-02  8.399e+02  -0.236  0.81324   
## weekend_dur_diff          -8.613e-02  5.268e-02  4.286e+02  -1.635  0.10278   
## covid                      1.596e-02  1.969e-01  1.049e+03   0.081  0.93543   
## sibDZ_MZ                  -1.087e-01  7.683e-02  7.421e+02  -1.415  0.15743   
## sib_DZ                    -1.681e-01  7.413e-02  7.852e+02  -2.267  0.02365 * 
## weekend_dur_diff:sibDZ_MZ  2.784e-02  1.303e-01  4.260e+02   0.214  0.83093   
## weekend_dur_diff:sib_DZ   -6.120e-02  1.032e-01  4.338e+02  -0.593  0.55352   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wknd_ -0.077                                          
## wknd_dr_dff  0.000  0.002                                   
## covid       -0.136  0.041 -0.013                            
## sibDZ_MZ     0.233 -0.077 -0.001 -0.007                     
## sib_DZ       0.131 -0.027 -0.002  0.043 -0.087              
## wkn__:DZ_MZ -0.002  0.001  0.437  0.008 -0.002  0.001       
## wknd_d_:_DZ -0.002  0.002  0.055  0.007  0.001 -0.001 -0.033
out<- weekend_dur_EXT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)


weekend_dur_EXT_MZ<- lmer(EXT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekend_dur_diff+MZ_dummy_sib*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_EXT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekend_dur_diff +  
##     MZ_dummy_sib * weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3431.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.21876 -0.54914 -0.08233  0.46307  2.99550 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5388   0.7341  
##  Residual                  0.4417   0.6646  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -1.762e-01  6.754e-02  7.338e+02  -2.609  0.00926
## fam_avg_weekend_dur           -8.534e-03  3.611e-02  8.399e+02  -0.236  0.81324
## weekend_dur_diff              -6.757e-02  1.197e-01  4.246e+02  -0.565  0.57260
## covid                          1.596e-02  1.969e-01  1.049e+03   0.081  0.93543
## MZ_dummy_DZ                    2.469e-02  8.815e-02  7.309e+02   0.280  0.77945
## MZ_dummy_sib                   1.928e-01  8.235e-02  7.726e+02   2.341  0.01950
## weekend_dur_diff:MZ_dummy_DZ  -5.844e-02  1.417e-01  4.233e+02  -0.412  0.68032
## weekend_dur_diff:MZ_dummy_sib  2.759e-03  1.386e-01  4.311e+02   0.020  0.98413
##                                 
## (Intercept)                   **
## fam_avg_weekend_dur             
## weekend_dur_diff                
## covid                           
## MZ_dummy_DZ                     
## MZ_dummy_sib                  * 
## weekend_dur_diff:MZ_dummy_DZ    
## weekend_dur_diff:MZ_dummy_sib   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wknd_ -0.097                                             
## wknd_dr_dff -0.002  0.002                                      
## covid       -0.073  0.041  0.000                               
## MZ_dummy_DZ -0.762  0.056  0.002  0.024                        
## MZ_dummy_sb -0.816  0.084  0.002 -0.013  0.624                 
## wk__:MZ__DZ  0.002  0.000 -0.844 -0.005 -0.002 -0.001          
## wknd__:MZ__  0.003 -0.002 -0.864 -0.011 -0.002 -0.001  0.729
out<- weekend_dur_EXT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_EXT_DZ<- lmer(EXT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekend_dur_diff+DZ_dummy_sib*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_EXT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekend_dur_diff +  
##     DZ_dummy_sib * weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3431.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.21876 -0.54914 -0.08233  0.46307  2.99550 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5388   0.7341  
##  Residual                  0.4417   0.6646  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -1.515e-01  5.706e-02  7.342e+02  -2.656  0.00809
## fam_avg_weekend_dur           -8.534e-03  3.611e-02  8.399e+02  -0.236  0.81324
## weekend_dur_diff              -1.260e-01  7.597e-02  4.201e+02  -1.659  0.09795
## covid                          1.596e-02  1.969e-01  1.049e+03   0.081  0.93543
## DZ_dummy_MZ                   -2.469e-02  8.815e-02  7.309e+02  -0.280  0.77945
## DZ_dummy_sib                   1.681e-01  7.413e-02  7.852e+02   2.267  0.02365
## weekend_dur_diff:DZ_dummy_MZ   5.844e-02  1.417e-01  4.233e+02   0.412  0.68032
## weekend_dur_diff:DZ_dummy_sib  6.120e-02  1.032e-01  4.338e+02   0.593  0.55352
##                                 
## (Intercept)                   **
## fam_avg_weekend_dur             
## weekend_dur_diff              . 
## covid                           
## DZ_dummy_MZ                     
## DZ_dummy_sib                  * 
## weekend_dur_diff:DZ_dummy_MZ    
## weekend_dur_diff:DZ_dummy_sib   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wknd_ -0.028                                             
## wknd_dr_dff -0.002  0.002                                      
## covid       -0.049  0.041 -0.009                               
## DZ_dummy_MZ -0.643 -0.056  0.002 -0.024                        
## DZ_dummy_sb -0.766  0.027  0.002 -0.043  0.496                 
## wk__:DZ__MZ  0.001  0.000 -0.536  0.005 -0.002 -0.001          
## wknd__:DZ__  0.002 -0.002 -0.736 -0.007 -0.001 -0.001  0.394
out<- weekend_dur_EXT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_EXT_sib<- lmer(EXT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekend_dur_diff+sib_dummy_DZ*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_EXT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekend_dur_diff +  
##     sib_dummy_DZ * weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3431.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.21876 -0.54914 -0.08233  0.46307  2.99550 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5388   0.7341  
##  Residual                  0.4417   0.6646  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                    1.654e-02  4.766e-02  8.677e+02   0.347   0.7286
## fam_avg_weekend_dur           -8.534e-03  3.611e-02  8.399e+02  -0.236   0.8132
## weekend_dur_diff              -6.481e-02  6.987e-02  4.509e+02  -0.928   0.3541
## covid                          1.596e-02  1.969e-01  1.049e+03   0.081   0.9354
## sib_dummy_MZ                  -1.928e-01  8.235e-02  7.726e+02  -2.341   0.0195
## sib_dummy_DZ                  -1.681e-01  7.413e-02  7.852e+02  -2.267   0.0236
## weekend_dur_diff:sib_dummy_MZ -2.759e-03  1.386e-01  4.311e+02  -0.020   0.9841
## weekend_dur_diff:sib_dummy_DZ -6.120e-02  1.032e-01  4.338e+02  -0.593   0.5535
##                                
## (Intercept)                    
## fam_avg_weekend_dur            
## weekend_dur_diff               
## covid                          
## sib_dummy_MZ                  *
## sib_dummy_DZ                  *
## weekend_dur_diff:sib_dummy_MZ  
## weekend_dur_diff:sib_dummy_DZ  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wknd_  0.008                                           
## wknd_dr_dff  0.003 -0.001                                    
## covid       -0.126  0.041 -0.021                             
## sib_dmmy_MZ -0.572 -0.084  0.000  0.013                      
## sib_dmmy_DZ -0.638 -0.027 -0.001  0.043  0.369               
## wknd__:__MZ -0.001  0.002 -0.504  0.011 -0.001  0.001        
## wknd__:__DZ -0.001  0.002 -0.677  0.007  0.000 -0.001  0.341
out<- weekend_dur_EXT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekday duration (fitbit)

# weekday duration (fitbit)
weekday_dur_EXT_pheno<- lmer(EXT_resid~avg_weekday_dur+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_EXT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekday_dur + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3462.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2276 -0.5242 -0.1026  0.4658  3.0624 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5509   0.7422  
##  Residual                  0.4376   0.6615  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                   Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)     -7.821e-02  3.237e-02  8.088e+02  -2.416   0.0159 *
## avg_weekday_dur -6.335e-03  2.903e-02  1.277e+03  -0.218   0.8273  
## covid            3.100e-02  1.973e-01  1.068e+03   0.157   0.8752  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wkdy_dr -0.037       
## covid       -0.144  0.013
out<- weekday_dur_EXT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekday_dur_EXT<- lmer(EXT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_EXT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3463.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1248 -0.5237 -0.1056  0.4680  3.0665 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5516   0.7427  
##  Residual                  0.4362   0.6605  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                       Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)           -0.07911    0.03237  809.72111  -2.444   0.0147 *
## fam_avg_weekday_dur    0.02718    0.03558  841.99327   0.764   0.4450  
## weekday_dur_diff      -0.07218    0.04970  446.67600  -1.452   0.1471  
## covid                  0.03119    0.19724 1069.39917   0.158   0.8744  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__
## fm_vg_wkdy_ -0.040              
## wkdy_dr_dff -0.007  0.006       
## covid       -0.144  0.010  0.008
weekday_dur_EXT_zyg<- lmer(EXT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekday_dur_diff+sib_DZ*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_EXT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekday_dur_diff + sib_DZ *  
##     weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3464.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9466 -0.5221 -0.1053  0.4619  3.0166 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5437   0.7374  
##  Residual                  0.4366   0.6608  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                             Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)               -1.037e-01  3.356e-02  7.756e+02  -3.091  0.00207 **
## fam_avg_weekday_dur        3.310e-02  3.550e-02  8.401e+02   0.932  0.35141   
## weekday_dur_diff          -6.005e-02  5.179e-02  4.405e+02  -1.159  0.24692   
## covid                      6.259e-03  1.967e-01  1.063e+03   0.032  0.97462   
## sibDZ_MZ                  -1.129e-01  7.665e-02  7.475e+02  -1.474  0.14104   
## sib_DZ                    -1.802e-01  7.376e-02  7.919e+02  -2.443  0.01479 * 
## weekday_dur_diff:sibDZ_MZ  7.881e-02  1.212e-01  4.354e+02   0.650  0.51580   
## weekday_dur_diff:sib_DZ   -1.468e-01  1.123e-01  4.487e+02  -1.307  0.19172   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wkdy_ -0.058                                          
## wkdy_dr_dff -0.008  0.005                                   
## covid       -0.133  0.009  0.006                            
## sibDZ_MZ     0.235 -0.062 -0.004 -0.005                     
## sib_DZ       0.129 -0.022 -0.001  0.044 -0.086              
## wkd__:DZ_MZ -0.003 -0.003  0.278 -0.003 -0.008  0.001       
## wkdy_d_:_DZ -0.003 -0.006 -0.029  0.010  0.001 -0.005  0.019
out<- weekday_dur_EXT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)


weekday_dur_EXT_MZ<- lmer(EXT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekday_dur_diff+MZ_dummy_sib*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_EXT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekday_dur_diff +  
##     MZ_dummy_sib * weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3464.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9466 -0.5221 -0.1053  0.4619  3.0166 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5437   0.7374  
##  Residual                  0.4366   0.6608  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -1.790e-01  6.740e-02  7.391e+02  -2.656  0.00808
## fam_avg_weekday_dur            3.310e-02  3.550e-02  8.401e+02   0.932  0.35141
## weekday_dur_diff              -7.507e-03  1.074e-01  4.319e+02  -0.070  0.94430
## covid                          6.259e-03  1.967e-01  1.063e+03   0.032  0.97462
## MZ_dummy_DZ                    2.285e-02  8.788e-02  7.367e+02   0.260  0.79497
## MZ_dummy_sib                   2.030e-01  8.214e-02  7.778e+02   2.472  0.01366
## weekday_dur_diff:MZ_dummy_DZ  -1.522e-01  1.326e-01  4.314e+02  -1.148  0.25159
## weekday_dur_diff:MZ_dummy_sib -5.400e-03  1.345e-01  4.439e+02  -0.040  0.96799
##                                 
## (Intercept)                   **
## fam_avg_weekday_dur             
## weekday_dur_diff                
## covid                           
## MZ_dummy_DZ                     
## MZ_dummy_sib                  * 
## weekday_dur_diff:MZ_dummy_DZ    
## weekday_dur_diff:MZ_dummy_sib   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wkdy_ -0.075                                             
## wkdy_dr_dff -0.009  0.000                                      
## covid       -0.070  0.009  0.001                               
## MZ_dummy_DZ -0.764  0.044  0.007  0.022                        
## MZ_dummy_sb -0.816  0.068  0.008 -0.015  0.625                 
## wk__:MZ__DZ  0.007  0.000 -0.810  0.007 -0.008 -0.006          
## wkdy__:MZ__  0.007  0.005 -0.798 -0.001 -0.006 -0.007  0.647
out<- weekday_dur_EXT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_EXT_DZ<- lmer(EXT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekday_dur_diff+DZ_dummy_sib*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_EXT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekday_dur_diff +  
##     DZ_dummy_sib * weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3464.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9466 -0.5221 -0.1053  0.4619  3.0166 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5437   0.7374  
##  Residual                  0.4366   0.6608  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -1.562e-01  5.672e-02  7.406e+02  -2.753  0.00604
## fam_avg_weekday_dur            3.310e-02  3.550e-02  8.401e+02   0.932  0.35141
## weekday_dur_diff              -1.597e-01  7.777e-02  4.307e+02  -2.054  0.04061
## covid                          6.259e-03  1.967e-01  1.063e+03   0.032  0.97462
## DZ_dummy_MZ                   -2.285e-02  8.788e-02  7.367e+02  -0.260  0.79497
## DZ_dummy_sib                   1.802e-01  7.376e-02  7.919e+02   2.443  0.01479
## weekday_dur_diff:DZ_dummy_MZ   1.522e-01  1.326e-01  4.314e+02   1.148  0.25159
## weekday_dur_diff:DZ_dummy_sib  1.468e-01  1.123e-01  4.487e+02   1.307  0.19172
##                                 
## (Intercept)                   **
## fam_avg_weekday_dur             
## weekday_dur_diff              * 
## covid                           
## DZ_dummy_MZ                     
## DZ_dummy_sib                  * 
## weekday_dur_diff:DZ_dummy_MZ    
## weekday_dur_diff:DZ_dummy_sib   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wkdy_ -0.021                                             
## wkdy_dr_dff -0.007  0.001                                      
## covid       -0.048  0.009  0.013                               
## DZ_dummy_MZ -0.642 -0.044  0.004 -0.022                        
## DZ_dummy_sb -0.765  0.022  0.005 -0.044  0.495                 
## wk__:DZ__MZ  0.004  0.000 -0.587 -0.007 -0.008 -0.003          
## wkdy__:DZ__  0.005  0.006 -0.693 -0.010 -0.003 -0.005  0.406
out<- weekday_dur_EXT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_EXT_sib<- lmer(EXT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekday_dur_diff+sib_dummy_DZ*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_EXT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekday_dur_diff +  
##     sib_dummy_DZ * weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3464.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9466 -0.5221 -0.1053  0.4619  3.0166 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5437   0.7374  
##  Residual                  0.4366   0.6608  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                    2.402e-02  4.749e-02  8.749e+02   0.506   0.6132
## fam_avg_weekday_dur            3.310e-02  3.550e-02  8.401e+02   0.932   0.3514
## weekday_dur_diff              -1.291e-02  8.099e-02  4.661e+02  -0.159   0.8735
## covid                          6.259e-03  1.967e-01  1.063e+03   0.032   0.9746
## sib_dummy_MZ                  -2.030e-01  8.214e-02  7.778e+02  -2.472   0.0137
## sib_dummy_DZ                  -1.802e-01  7.376e-02  7.919e+02  -2.443   0.0148
## weekday_dur_diff:sib_dummy_MZ  5.400e-03  1.345e-01  4.439e+02   0.040   0.9680
## weekday_dur_diff:sib_dummy_DZ -1.468e-01  1.123e-01  4.487e+02  -1.307   0.1917
##                                
## (Intercept)                    
## fam_avg_weekday_dur            
## weekday_dur_diff               
## covid                          
## sib_dummy_MZ                  *
## sib_dummy_DZ                  *
## weekday_dur_diff:sib_dummy_MZ  
## weekday_dur_diff:sib_dummy_DZ  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wkdy_  0.010                                           
## wkdy_dr_dff -0.003  0.009                                    
## covid       -0.125  0.009 -0.001                             
## sib_dmmy_MZ -0.572 -0.068  0.001  0.015                      
## sib_dmmy_DZ -0.639 -0.022  0.002  0.044  0.369               
## wkdy__:__MZ  0.002 -0.005 -0.602  0.001 -0.007 -0.001        
## wkdy__:__DZ  0.001 -0.006 -0.721  0.010 -0.001 -0.005  0.434
out<- weekday_dur_EXT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekend duration (MCQ)

# weekend duration (MCQ)
weekend_dur_MCQ_EXT_pheno<- lmer(EXT_resid~weekend_dur_mcq_wave_2+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_EXT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ weekend_dur_mcq_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5914
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7374 -0.5367 -0.1149  0.4756  3.6673 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5208   0.7217  
##  Residual                  0.4913   0.7009  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)            -6.604e-02  2.560e-02  1.226e+03   -2.58    0.010 **
## weekend_dur_mcq_wave_2 -8.748e-03  2.133e-02  2.002e+03   -0.41    0.682   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## wknd_dr___2 -0.041
out<- weekend_dur_MCQ_EXT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_EXT<- lmer(EXT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_EXT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + (1 |  
##     rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5913.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7841 -0.5397 -0.1139  0.4747  3.6565 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5189   0.7203  
##  Residual                  0.4909   0.7006  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)            -0.06880    0.02559 1225.26055  -2.688  0.00728 **
## avg_weekend_dur_mcq     0.04876    0.03354 1263.87665   1.454  0.14624   
## weekend_dur_mcq_diff   -0.04722    0.02748 1040.50524  -1.719  0.08600 . 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___
## avg_wknd_d_ -0.063       
## wknd_dr_mc_ -0.001  0.006
weekend_dur_MCQ_EXT_zyg<- lmer(EXT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+sibDZ_MZ+sib_DZ+weekend_dur_mcq_diff*sibDZ_MZ+weekend_dur_mcq_diff*sib_DZ+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_EXT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + sibDZ_MZ +  
##     sib_DZ + weekend_dur_mcq_diff * sibDZ_MZ + weekend_dur_mcq_diff *  
##     sib_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5918
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8140 -0.5279 -0.1150  0.4907  3.6278 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5126   0.7160  
##  Residual                  0.4921   0.7015  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                     -0.09829    0.02719 1171.33550  -3.615 0.000313
## avg_weekend_dur_mcq              0.04371    0.03346 1261.97315   1.306 0.191719
## weekend_dur_mcq_diff            -0.04456    0.02954  966.49315  -1.509 0.131753
## sibDZ_MZ                        -0.11198    0.06256 1154.27126  -1.790 0.073721
## sib_DZ                          -0.13972    0.06035 1194.32898  -2.315 0.020771
## weekend_dur_mcq_diff:sibDZ_MZ   -0.01073    0.06815  942.33716  -0.157 0.874907
## weekend_dur_mcq_diff:sib_DZ      0.03384    0.06542 1002.51739   0.517 0.605023
##                                  
## (Intercept)                   ***
## avg_weekend_dur_mcq              
## weekend_dur_mcq_diff             
## sibDZ_MZ                      .  
## sib_DZ                        *  
## weekend_dur_mcq_diff:sibDZ_MZ    
## weekend_dur_mcq_diff:sib_DZ      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ sDZ_MZ sib_DZ w___:D
## avg_wknd_d_ -0.044                                   
## wknd_dr_mc_  0.000  0.002                            
## sibDZ_MZ     0.231  0.019  0.000                     
## sib_DZ       0.222  0.039  0.002 -0.145              
## wk___:DZ_MZ  0.000 -0.001  0.238  0.000 -0.001       
## wknd___:_DZ  0.002 -0.012  0.237 -0.001  0.000 -0.154
out<- weekend_dur_MCQ_EXT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_EXT_MZ<- lmer(EXT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+MZ_dummy_DZ+MZ_dummy_sib+weekend_dur_mcq_diff*MZ_dummy_DZ+weekend_dur_mcq_diff*MZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_EXT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + MZ_dummy_DZ +  
##     MZ_dummy_sib + weekend_dur_mcq_diff * MZ_dummy_DZ + weekend_dur_mcq_diff *  
##     MZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5918
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8140 -0.5279 -0.1150  0.4907  3.6278 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5126   0.7160  
##  Residual                  0.4921   0.7015  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                       -1.729e-01  5.480e-02  1.143e+03  -3.156
## avg_weekend_dur_mcq                4.371e-02  3.346e-02  1.262e+03   1.306
## weekend_dur_mcq_diff              -5.171e-02  5.979e-02  9.251e+02  -0.865
## MZ_dummy_DZ                        4.211e-02  7.328e-02  1.141e+03   0.575
## MZ_dummy_sib                       1.818e-01  6.540e-02  1.189e+03   2.780
## weekend_dur_mcq_diff:MZ_dummy_DZ   2.765e-02  8.000e-02  9.293e+02   0.346
## weekend_dur_mcq_diff:MZ_dummy_sib -6.191e-03  7.091e-02  9.848e+02  -0.087
##                                   Pr(>|t|)   
## (Intercept)                        0.00164 **
## avg_weekend_dur_mcq                0.19172   
## weekend_dur_mcq_diff               0.38727   
## MZ_dummy_DZ                        0.56562   
## MZ_dummy_sib                       0.00552 **
## weekend_dur_mcq_diff:MZ_dummy_DZ   0.72967   
## weekend_dur_mcq_diff:MZ_dummy_sib  0.93045   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ MZ__DZ MZ_dm_ w___:MZ__D
## avg_wknd_d_ -0.007                                       
## wknd_dr_mc_  0.000  0.000                                
## MZ_dummy_DZ -0.748 -0.001  0.000                         
## MZ_dummy_sb -0.838 -0.036  0.000  0.627                  
## w___:MZ__DZ  0.000 -0.004 -0.747  0.001  0.000           
## wkn___:MZ__  0.000  0.006 -0.843  0.000 -0.001  0.630
out<- weekend_dur_MCQ_EXT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_EXT_DZ<- lmer(EXT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+DZ_dummy_MZ+DZ_dummy_sib+weekend_dur_mcq_diff*DZ_dummy_MZ+weekend_dur_mcq_diff*DZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_EXT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + DZ_dummy_MZ +  
##     DZ_dummy_sib + weekend_dur_mcq_diff * DZ_dummy_MZ + weekend_dur_mcq_diff *  
##     DZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5918
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8140 -0.5279 -0.1150  0.4907  3.6278 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5126   0.7160  
##  Residual                  0.4921   0.7015  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                         -0.13082    0.04866 1138.32031  -2.688
## avg_weekend_dur_mcq                  0.04371    0.03346 1261.97315   1.306
## weekend_dur_mcq_diff                -0.02406    0.05316  934.71710  -0.453
## DZ_dummy_MZ                         -0.04212    0.07328 1140.71479  -0.575
## DZ_dummy_sib                         0.13972    0.06035 1194.32898   2.315
## weekend_dur_mcq_diff:DZ_dummy_MZ    -0.02765    0.08000  929.31539  -0.346
## weekend_dur_mcq_diff:DZ_dummy_sib   -0.03384    0.06542 1002.51739  -0.517
##                                   Pr(>|t|)   
## (Intercept)                        0.00728 **
## avg_weekend_dur_mcq                0.19172   
## weekend_dur_mcq_diff               0.65090   
## DZ_dummy_MZ                        0.56562   
## DZ_dummy_sib                       0.02077 * 
## weekend_dur_mcq_diff:DZ_dummy_MZ   0.72967   
## weekend_dur_mcq_diff:DZ_dummy_sib  0.60502   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ DZ__MZ DZ_dm_ w___:DZ__M
## avg_wknd_d_ -0.009                                       
## wknd_dr_mc_  0.002 -0.006                                
## DZ_dummy_MZ -0.664  0.001 -0.001                         
## DZ_dummy_sb -0.806 -0.039 -0.001  0.535                  
## w___:DZ__MZ -0.001  0.004 -0.664  0.001  0.001           
## wkn___:DZ__ -0.002  0.012 -0.813  0.001  0.000  0.540
out<- weekend_dur_MCQ_EXT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_EXT_sib<- lmer(EXT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+sib_dummy_MZ+sib_dummy_DZ+weekend_dur_mcq_diff*sib_dummy_MZ+weekend_dur_mcq_diff*sib_dummy_DZ+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_EXT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + sib_dummy_MZ +  
##     sib_dummy_DZ + weekend_dur_mcq_diff * sib_dummy_MZ + weekend_dur_mcq_diff *  
##     sib_dummy_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5918
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.8140 -0.5279 -0.1150  0.4907  3.6278 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5126   0.7160  
##  Residual                  0.4921   0.7015  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                        8.898e-03  3.573e-02  1.305e+03   0.249
## avg_weekend_dur_mcq                4.371e-02  3.346e-02  1.262e+03   1.306
## weekend_dur_mcq_diff              -5.791e-02  3.813e-02  1.150e+03  -1.519
## sib_dummy_MZ                      -1.818e-01  6.540e-02  1.189e+03  -2.780
## sib_dummy_DZ                      -1.397e-01  6.035e-02  1.194e+03  -2.315
## weekend_dur_mcq_diff:sib_dummy_MZ  6.191e-03  7.091e-02  9.848e+02   0.087
## weekend_dur_mcq_diff:sib_dummy_DZ  3.384e-02  6.542e-02  1.003e+03   0.517
##                                   Pr(>|t|)   
## (Intercept)                        0.80337   
## avg_weekend_dur_mcq                0.19172   
## weekend_dur_mcq_diff               0.12908   
## sib_dummy_MZ                       0.00552 **
## sib_dummy_DZ                       0.02077 * 
## weekend_dur_mcq_diff:sib_dummy_MZ  0.93045   
## weekend_dur_mcq_diff:sib_dummy_DZ  0.60502   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ sb__MZ sb__DZ w___:__M
## avg_wknd_d_ -0.078                                     
## wknd_dr_mc_ -0.004  0.012                              
## sib_dmmy_MZ -0.546  0.036  0.002                       
## sib_dmmy_DZ -0.591  0.039  0.002  0.323                
## wkn___:__MZ  0.002 -0.006 -0.538 -0.001 -0.001         
## wkn___:__DZ  0.003 -0.012 -0.583 -0.001  0.000  0.313
out<- weekend_dur_MCQ_EXT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekday duration (MCQ)

# weekday duration (MCQ)
weekday_dur_MCQ_EXT_pheno<- lmer(EXT_resid~weekday_dur_mcq_wave_2+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_EXT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ weekday_dur_mcq_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5906.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7224 -0.5408 -0.1176  0.4849  3.6537 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5224   0.7228  
##  Residual                  0.4878   0.6984  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)              -0.06790    0.02557 1222.83217  -2.655  0.00804 **
## weekday_dur_mcq_wave_2   -0.05746    0.02099 2015.88052  -2.737  0.00625 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## wkdy_dr___2 0.021
out<- weekday_dur_MCQ_EXT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_EXT<- lmer(EXT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_EXT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + (1 |  
##     rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5908.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7176 -0.5425 -0.1200  0.4917  3.6395 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5222   0.7226  
##  Residual                  0.4872   0.6980  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)            -0.06750    0.02557 1223.60066  -2.640  0.00839 **
## avg_weekday_dur_mcq    -0.01483    0.03222 1245.38593  -0.460  0.64539   
## weekday_dur_mcq_diff   -0.08794    0.02730 1007.59183  -3.221  0.00132 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___
## avg_wkdy_d_ 0.020        
## wkdy_dr_mc_ 0.010  0.015
weekday_dur_MCQ_EXT_zyg<- lmer(EXT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+sibDZ_MZ+sib_DZ+weekday_dur_mcq_diff*sibDZ_MZ+weekday_dur_mcq_diff*sib_DZ+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_EXT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + sibDZ_MZ +  
##     sib_DZ + weekday_dur_mcq_diff * sibDZ_MZ + weekday_dur_mcq_diff *  
##     sib_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5910.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7344 -0.5284 -0.1191  0.4915  3.5936 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5160   0.7183  
##  Residual                  0.4875   0.6982  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                     -0.09898    0.02723 1169.51415  -3.635  0.00029
## avg_weekday_dur_mcq             -0.02855    0.03234 1242.04966  -0.883  0.37746
## weekday_dur_mcq_diff            -0.07306    0.02968  965.62714  -2.461  0.01401
## sibDZ_MZ                        -0.11715    0.06278 1153.55577  -1.866  0.06227
## sib_DZ                          -0.14443    0.06052 1192.43900  -2.386  0.01717
## weekday_dur_mcq_diff:sibDZ_MZ    0.02964    0.06963  959.06458   0.426  0.67042
## weekday_dur_mcq_diff:sib_DZ      0.08119    0.06412  975.45979   1.266  0.20574
##                                  
## (Intercept)                   ***
## avg_weekday_dur_mcq              
## weekday_dur_mcq_diff          *  
## sibDZ_MZ                      .  
## sib_DZ                        *  
## weekday_dur_mcq_diff:sibDZ_MZ    
## weekday_dur_mcq_diff:sib_DZ      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ sDZ_MZ sib_DZ w___:D
## avg_wkdy_d_  0.061                                   
## wkdy_dr_mc_  0.005  0.004                            
## sibDZ_MZ     0.236  0.079  0.003                     
## sib_DZ       0.227  0.078 -0.006 -0.139              
## wk___:DZ_MZ  0.002 -0.013  0.285  0.005  0.003       
## wkdy___:_DZ -0.007 -0.018  0.226  0.003  0.003 -0.144
out<- weekday_dur_MCQ_EXT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_EXT_MZ<- lmer(EXT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+MZ_dummy_DZ+MZ_dummy_sib+weekday_dur_mcq_diff*MZ_dummy_DZ+weekday_dur_mcq_diff*MZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_EXT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + MZ_dummy_DZ +  
##     MZ_dummy_sib + weekday_dur_mcq_diff * MZ_dummy_DZ + weekday_dur_mcq_diff *  
##     MZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5910.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7344 -0.5284 -0.1191  0.4915  3.5936 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5160   0.7183  
##  Residual                  0.4875   0.6982  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                         -0.17709    0.05506 1142.04313  -3.217
## avg_weekday_dur_mcq                 -0.02855    0.03234 1242.04966  -0.883
## weekday_dur_mcq_diff                -0.05330    0.06181  954.76025  -0.862
## MZ_dummy_DZ                          0.04494    0.07337 1140.09551   0.612
## MZ_dummy_sib                         0.18937    0.06580 1187.01913   2.878
## weekday_dur_mcq_diff:MZ_dummy_DZ     0.01095    0.08074  945.16462   0.136
## weekday_dur_mcq_diff:MZ_dummy_sib   -0.07024    0.07234  983.23254  -0.971
##                                   Pr(>|t|)   
## (Intercept)                        0.00133 **
## avg_weekday_dur_mcq                0.37746   
## weekday_dur_mcq_diff               0.38867   
## MZ_dummy_DZ                        0.54035   
## MZ_dummy_sib                       0.00408 **
## weekday_dur_mcq_diff:MZ_dummy_DZ   0.89211   
## weekday_dur_mcq_diff:MZ_dummy_sib  0.33180   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ MZ__DZ MZ_dm_ w___:MZ__D
## avg_wkdy_d_  0.090                                       
## wkdy_dr_mc_  0.006 -0.008                                
## MZ_dummy_DZ -0.747 -0.035 -0.004                         
## MZ_dummy_sb -0.840 -0.111 -0.004  0.627                  
## w___:MZ__DZ -0.004  0.004 -0.765  0.002  0.004           
## wkd___:MZ__ -0.004  0.020 -0.855  0.003  0.007  0.654
out<- weekday_dur_MCQ_EXT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_EXT_DZ<- lmer(EXT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+DZ_dummy_MZ+DZ_dummy_sib+weekday_dur_mcq_diff*DZ_dummy_MZ+weekday_dur_mcq_diff*DZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_EXT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + DZ_dummy_MZ +  
##     DZ_dummy_sib + weekday_dur_mcq_diff * DZ_dummy_MZ + weekday_dur_mcq_diff *  
##     DZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5910.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7344 -0.5284 -0.1191  0.4915  3.5936 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5160   0.7183  
##  Residual                  0.4875   0.6982  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                         -0.13215    0.04875 1137.68563  -2.711
## avg_weekday_dur_mcq                 -0.02855    0.03234 1242.04966  -0.883
## weekday_dur_mcq_diff                -0.04235    0.05196  931.69938  -0.815
## DZ_dummy_MZ                         -0.04494    0.07337 1140.09551  -0.612
## DZ_dummy_sib                         0.14443    0.06052 1192.43900   2.386
## weekday_dur_mcq_diff:DZ_dummy_MZ    -0.01095    0.08074  945.16462  -0.136
## weekday_dur_mcq_diff:DZ_dummy_sib   -0.08119    0.06412  975.45979  -1.266
##                                   Pr(>|t|)   
## (Intercept)                        0.00681 **
## avg_weekday_dur_mcq                0.37746   
## weekday_dur_mcq_diff               0.41525   
## DZ_dummy_MZ                        0.54035   
## DZ_dummy_sib                       0.01717 * 
## weekday_dur_mcq_diff:DZ_dummy_MZ   0.89211   
## weekday_dur_mcq_diff:DZ_dummy_sib  0.20574   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ DZ__MZ DZ_dm_ w___:DZ__M
## avg_wkdy_d_  0.049                                       
## wkdy_dr_mc_ -0.003 -0.003                                
## DZ_dummy_MZ -0.661  0.035  0.002                         
## DZ_dummy_sb -0.807 -0.078  0.003  0.531                  
## w___:DZ__MZ  0.002 -0.004 -0.643  0.002 -0.001           
## wkd___:DZ__  0.004  0.018 -0.810 -0.001  0.003  0.521
out<- weekday_dur_MCQ_EXT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_EXT_sib<- lmer(EXT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+sib_dummy_MZ+sib_dummy_DZ+weekday_dur_mcq_diff*sib_dummy_MZ+weekday_dur_mcq_diff*sib_dummy_DZ+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_EXT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## EXT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + sib_dummy_MZ +  
##     sib_dummy_DZ + weekday_dur_mcq_diff * sib_dummy_MZ + weekday_dur_mcq_diff *  
##     sib_dummy_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5910.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7344 -0.5284 -0.1191  0.4915  3.5936 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5160   0.7183  
##  Residual                  0.4875   0.6982  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                          0.01228    0.03572 1301.07874   0.344
## avg_weekday_dur_mcq                 -0.02855    0.03234 1242.04966  -0.883
## weekday_dur_mcq_diff                -0.12354    0.03757 1065.73924  -3.288
## sib_dummy_MZ                        -0.18937    0.06580 1187.01914  -2.878
## sib_dummy_DZ                        -0.14443    0.06052 1192.43900  -2.386
## weekday_dur_mcq_diff:sib_dummy_MZ    0.07024    0.07234  983.23255   0.971
## weekday_dur_mcq_diff:sib_dummy_DZ    0.08119    0.06412  975.45979   1.266
##                                   Pr(>|t|)   
## (Intercept)                        0.73095   
## avg_weekday_dur_mcq                0.37746   
## weekday_dur_mcq_diff               0.00104 **
## sib_dummy_MZ                       0.00408 **
## sib_dummy_DZ                       0.01717 * 
## weekday_dur_mcq_diff:sib_dummy_MZ  0.33180   
## weekday_dur_mcq_diff:sib_dummy_DZ  0.20574   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ sb__MZ sb__DZ w___:__M
## avg_wkdy_d_ -0.066                                     
## wkdy_dr_mc_  0.017  0.026                              
## sib_dmmy_MZ -0.548  0.111 -0.007                       
## sib_dmmy_DZ -0.593  0.078 -0.009  0.328                
## wkd___:__MZ -0.008 -0.020 -0.520  0.007  0.004         
## wkd___:__DZ -0.010 -0.018 -0.586  0.004  0.003  0.305
out<- weekday_dur_MCQ_EXT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Externalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

chronotype

# chrono 
chrono_EXT_pheno<- lmer(EXT_resid~chronotype_wave_2+(1|rel_family_id), data=abcd_all)
summary(chrono_EXT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ chronotype_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5239.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7087 -0.5695 -0.0924  0.4609  3.6615 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4996   0.7068  
##  Residual                  0.5131   0.7163  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)         -0.05863    0.02664 1176.86306  -2.201   0.0280 *
## chronotype_wave_2   -0.03935    0.02167 1769.38706  -1.815   0.0696 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## chrntyp_w_2 -0.084
out<- chrono_EXT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Externalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

chrono_EXT<- lmer(EXT_resid~avg_chrono+chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_EXT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_chrono + chrono_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5243.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.6845 -0.5621 -0.0940  0.4683  3.6385 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5001   0.7072  
##  Residual                  0.5129   0.7162  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)   -0.05711    0.02671 1171.13608  -2.138   0.0327 *
## avg_chrono    -0.05912    0.03180 1215.37191  -1.859   0.0632 .
## chrono_diff   -0.02218    0.02960  808.97615  -0.749   0.4539  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch
## avg_chrono  -0.106       
## chrono_diff -0.016  0.000
chrono_EXT_zyg<- lmer(EXT_resid~avg_chrono+chrono_diff+sibDZ_MZ+sib_DZ+sibDZ_MZ*chrono_diff+sib_DZ*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_EXT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_chrono + chrono_diff + sibDZ_MZ + sib_DZ + sibDZ_MZ *  
##     chrono_diff + sib_DZ * chrono_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5243.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7064 -0.5581 -0.1027  0.4714  3.5839 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4930   0.7022  
##  Residual                  0.5129   0.7162  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)            -0.09162    0.02835 1128.89255  -3.231  0.00127 **
## avg_chrono             -0.05687    0.03167 1212.75654  -1.795  0.07284 . 
## chrono_diff            -0.02550    0.03100  762.62333  -0.822  0.41114   
## sibDZ_MZ               -0.12820    0.06479 1112.22011  -1.979  0.04808 * 
## sib_DZ                 -0.16166    0.06281 1142.34998  -2.574  0.01018 * 
## chrono_diff:sibDZ_MZ    0.06749    0.06973  744.33758   0.968  0.33342   
## chrono_diff:sib_DZ     -0.07500    0.07108  786.85407  -1.055  0.29167   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d sDZ_MZ sib_DZ c_:DZ_
## avg_chrono  -0.106                                   
## chrono_diff -0.009  0.000                            
## sibDZ_MZ     0.225 -0.003  0.000                     
## sib_DZ       0.227 -0.022  0.006 -0.148              
## chrn_:DZ_MZ  0.000  0.001  0.165 -0.008 -0.004       
## chrn_df:_DZ  0.006  0.000  0.221 -0.004 -0.011 -0.147
out<- chrono_EXT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Externalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

chrono_EXT_MZ<- lmer(EXT_resid~avg_chrono+chrono_diff+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*chrono_diff+MZ_dummy_sib*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_EXT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_chrono + chrono_diff + MZ_dummy_DZ + MZ_dummy_sib +  
##     MZ_dummy_DZ * chrono_diff + MZ_dummy_sib * chrono_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5243.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7064 -0.5581 -0.1027  0.4714  3.5839 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4930   0.7022  
##  Residual                  0.5129   0.7162  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)                -0.17709    0.05676 1105.17724  -3.120  0.00185 **
## avg_chrono                 -0.05687    0.03167 1212.75654  -1.795  0.07284 . 
## chrono_diff                 0.01950    0.05999  730.05654   0.325  0.74528   
## MZ_dummy_DZ                 0.04738    0.07606 1100.76548   0.623  0.53349   
## MZ_dummy_sib                0.20903    0.06769 1139.83750   3.088  0.00206 **
## chrono_diff:MZ_dummy_DZ    -0.10499    0.08279  731.78600  -1.268  0.20515   
## chrono_diff:MZ_dummy_sib   -0.02999    0.07346  780.71302  -0.408  0.68322   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d MZ__DZ MZ_dm_ c_:MZ__D
## avg_chrono  -0.055                                     
## chrono_diff -0.006  0.001                              
## MZ_dummy_DZ -0.744 -0.007  0.005                       
## MZ_dummy_sb -0.837  0.013  0.005  0.624                
## chr_:MZ__DZ  0.005 -0.001 -0.725 -0.005 -0.004         
## chrn_d:MZ__  0.005  0.000 -0.817 -0.004 -0.013  0.592
out<- chrono_EXT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Externalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

chrono_EXT_DZ<- lmer(EXT_resid~avg_chrono+chrono_diff+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*chrono_diff+DZ_dummy_sib*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_EXT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_chrono + chrono_diff + DZ_dummy_MZ + DZ_dummy_sib +  
##     DZ_dummy_MZ * chrono_diff + DZ_dummy_sib * chrono_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5243.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7064 -0.5581 -0.1027  0.4714  3.5839 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4930   0.7022  
##  Residual                  0.5129   0.7162  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)                -0.12972    0.05085 1099.69486  -2.551   0.0109 *
## avg_chrono                 -0.05687    0.03167 1212.75654  -1.795   0.0728 .
## chrono_diff                -0.08549    0.05706  733.70402  -1.498   0.1345  
## DZ_dummy_MZ                -0.04738    0.07606 1100.76548  -0.623   0.5335  
## DZ_dummy_sib                0.16166    0.06281 1142.34998   2.574   0.0102 *
## chrono_diff:DZ_dummy_MZ     0.10499    0.08279  731.78600   1.268   0.2052  
## chrono_diff:DZ_dummy_sib    0.07500    0.07108  786.85407   1.055   0.2917  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d DZ__MZ DZ_dm_ c_:DZ__M
## avg_chrono  -0.072                                     
## chrono_diff -0.002  0.000                              
## DZ_dummy_MZ -0.666  0.007  0.002                       
## DZ_dummy_sb -0.807  0.022  0.002  0.539                
## chr_:DZ__MZ  0.002  0.001 -0.689 -0.005 -0.001         
## chrn_d:DZ__  0.002  0.000 -0.803 -0.001 -0.011  0.553
out<- chrono_EXT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Externalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

chrono_EXT_sib<- lmer(EXT_resid~avg_chrono+chrono_diff+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*chrono_diff+sib_dummy_DZ*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_EXT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_chrono + chrono_diff + sib_dummy_MZ + sib_dummy_DZ +  
##     sib_dummy_MZ * chrono_diff + sib_dummy_DZ * chrono_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5243.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.7064 -0.5581 -0.1027  0.4714  3.5839 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.4930   0.7022  
##  Residual                  0.5129   0.7162  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)                 0.03194    0.03708 1228.43664   0.861  0.38923   
## avg_chrono                 -0.05687    0.03167 1212.75654  -1.795  0.07284 . 
## chrono_diff                -0.01049    0.04239  894.61755  -0.247  0.80461   
## sib_dummy_MZ               -0.20903    0.06769 1139.83750  -3.088  0.00206 **
## sib_dummy_DZ               -0.16166    0.06281 1142.34998  -2.574  0.01018 * 
## chrono_diff:sib_dummy_MZ    0.02999    0.07346  780.71302   0.408  0.68322   
## chrono_diff:sib_dummy_DZ   -0.07500    0.07108  786.85407  -1.055  0.29167   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d sb__MZ sb__DZ c_:__M
## avg_chrono  -0.061                                   
## chrono_diff -0.027  0.000                            
## sib_dmmy_MZ -0.545 -0.013  0.015                     
## sib_dmmy_DZ -0.587 -0.022  0.016  0.323              
## chrn_d:__MZ  0.016  0.000 -0.577 -0.013 -0.009       
## chrn_d:__DZ  0.016  0.000 -0.596 -0.009 -0.011  0.344
out<- chrono_EXT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Externalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekend efficiency

weekend_effic_EXT_pheno<- lmer(EXT_resid~avg_weekend_effic+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_EXT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekend_effic + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3427.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2205 -0.5317 -0.1016  0.4667  3.0539 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5430   0.7369  
##  Residual                  0.4433   0.6658  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)         -0.08010    0.03251  805.20198  -2.464   0.0139 *
## avg_weekend_effic   -0.01188    0.03029 1099.56709  -0.392   0.6950  
## covid                0.02852    0.19724 1053.03304   0.145   0.8850  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wknd_ff -0.073       
## covid       -0.147  0.036
out<- weekend_effic_EXT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Externalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekend_effic_EXT<- lmer(EXT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_EXT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3431.3
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.21374 -0.53017 -0.09913  0.46631  3.05581 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5432   0.7370  
##  Residual                  0.4438   0.6662  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                         Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)           -7.963e-02  3.260e-02  7.998e+02  -2.443   0.0148 *
## fam_avg_weekend_effic -1.857e-02  4.384e-02  8.486e+02  -0.423   0.6721  
## weekend_effic_diff    -5.779e-03  4.190e-02  4.358e+02  -0.138   0.8904  
## covid                  2.784e-02  1.973e-01  1.052e+03   0.141   0.8878  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__
## fm_vg_wknd_ -0.101              
## wknd_ffc_df -0.004  0.000       
## covid       -0.147  0.036  0.016
weekend_effic_EXT_zyg<- lmer(EXT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekend_effic_diff+sib_DZ*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_EXT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekend_effic_diff + sib_DZ *  
##     weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3435.3
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.18530 -0.51629 -0.08785  0.46137  3.02123 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5343   0.7309  
##  Residual                  0.4466   0.6682  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                               Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                 -1.028e-01  3.374e-02  7.654e+02  -3.046   0.0024
## fam_avg_weekend_effic       -2.002e-02  4.376e-02  8.452e+02  -0.457   0.6475
## weekend_effic_diff          -6.174e-03  4.590e-02  4.247e+02  -0.135   0.8931
## covid                        5.796e-03  1.969e-01  1.044e+03   0.029   0.9765
## sibDZ_MZ                    -1.085e-01  7.661e-02  7.407e+02  -1.416   0.1572
## sib_DZ                      -1.704e-01  7.412e-02  7.842e+02  -2.299   0.0217
## weekend_effic_diff:sibDZ_MZ  2.148e-02  1.098e-01  4.219e+02   0.196   0.8450
## weekend_effic_diff:sib_DZ   -3.623e-02  9.600e-02  4.295e+02  -0.377   0.7061
##                               
## (Intercept)                 **
## fam_avg_weekend_effic         
## weekend_effic_diff            
## covid                         
## sibDZ_MZ                      
## sib_DZ                      * 
## weekend_effic_diff:sibDZ_MZ   
## weekend_effic_diff:sib_DZ     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wknd_ -0.102                                          
## wknd_ffc_df -0.005  0.000                                   
## covid       -0.136  0.038  0.011                            
## sibDZ_MZ     0.231 -0.048 -0.002 -0.005                     
## sib_DZ       0.124  0.045 -0.002  0.046 -0.091              
## wkn__:DZ_MZ -0.001 -0.001  0.340 -0.007 -0.004  0.001       
## wknd_f_:_DZ -0.002 -0.001  0.176 -0.004  0.002 -0.003 -0.111
out<- weekend_effic_EXT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Externalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekend_effic_EXT_MZ<- lmer(EXT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekend_effic_diff+MZ_dummy_sib*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_EXT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekend_effic_diff +  
##     MZ_dummy_sib * weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3435.3
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.18530 -0.51629 -0.08785  0.46137  3.02123 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5343   0.7309  
##  Residual                  0.4466   0.6682  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                     -1.751e-01  6.742e-02  7.305e+02  -2.597
## fam_avg_weekend_effic           -2.002e-02  4.376e-02  8.452e+02  -0.457
## weekend_effic_diff               8.144e-03  9.871e-02  4.201e+02   0.083
## covid                            5.796e-03  1.969e-01  1.044e+03   0.029
## MZ_dummy_DZ                      2.328e-02  8.809e-02  7.300e+02   0.264
## MZ_dummy_sib                     1.937e-01  8.202e-02  7.710e+02   2.362
## weekend_effic_diff:MZ_dummy_DZ  -3.959e-02  1.246e-01  4.205e+02  -0.318
## weekend_effic_diff:MZ_dummy_sib -3.362e-03  1.148e-01  4.262e+02  -0.029
##                                 Pr(>|t|)   
## (Intercept)                      0.00959 **
## fam_avg_weekend_effic            0.64749   
## weekend_effic_diff               0.93428   
## covid                            0.97652   
## MZ_dummy_DZ                      0.79167   
## MZ_dummy_sib                     0.01843 * 
## weekend_effic_diff:MZ_dummy_DZ   0.75076   
## weekend_effic_diff:MZ_dummy_sib  0.97666   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wknd_ -0.088                                             
## wknd_ffc_df -0.004 -0.001                                      
## covid       -0.072  0.038  0.000                               
## MZ_dummy_DZ -0.763  0.061  0.003  0.024                        
## MZ_dummy_sb -0.813  0.025  0.003 -0.015  0.622                 
## wk__:MZ__DZ  0.003  0.001 -0.792  0.004 -0.004 -0.003          
## wknd__:MZ__  0.003  0.001 -0.860  0.008 -0.003 -0.003  0.681
out<- weekend_effic_EXT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Externalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekend_effic_EXT_DZ<- lmer(EXT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekend_effic_diff+DZ_dummy_sib*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_EXT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekend_effic_diff +  
##     DZ_dummy_sib * weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3435.3
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.18530 -0.51629 -0.08785  0.46137  3.02123 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5343   0.7309  
##  Residual                  0.4466   0.6682  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                     -1.518e-01  5.698e-02  7.328e+02  -2.664
## fam_avg_weekend_effic           -2.002e-02  4.376e-02  8.452e+02  -0.457
## weekend_effic_diff              -3.145e-02  7.598e-02  4.212e+02  -0.414
## covid                            5.796e-03  1.969e-01  1.044e+03   0.029
## DZ_dummy_MZ                     -2.328e-02  8.809e-02  7.300e+02  -0.264
## DZ_dummy_sib                     1.704e-01  7.412e-02  7.842e+02   2.299
## weekend_effic_diff:DZ_dummy_MZ   3.959e-02  1.246e-01  4.205e+02   0.318
## weekend_effic_diff:DZ_dummy_sib  3.623e-02  9.600e-02  4.295e+02   0.377
##                                 Pr(>|t|)   
## (Intercept)                      0.00788 **
## fam_avg_weekend_effic            0.64749   
## weekend_effic_diff               0.67916   
## covid                            0.97652   
## DZ_dummy_MZ                      0.79167   
## DZ_dummy_sib                     0.02174 * 
## weekend_effic_diff:DZ_dummy_MZ   0.75076   
## weekend_effic_diff:DZ_dummy_sib  0.70607   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wknd_ -0.010                                             
## wknd_ffc_df -0.005  0.000                                      
## covid       -0.049  0.038  0.008                               
## DZ_dummy_MZ -0.644 -0.061  0.003 -0.024                        
## DZ_dummy_sb -0.764 -0.045  0.003 -0.046  0.500                 
## wk__:DZ__MZ  0.003 -0.001 -0.610 -0.004 -0.004 -0.002          
## wknd__:DZ__  0.004  0.001 -0.791  0.004 -0.003 -0.003  0.483
out<- weekend_effic_EXT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Externalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekend_effic_EXT_sib<- lmer(EXT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekend_effic_diff+sib_dummy_DZ*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_EXT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekend_effic_diff +  
##     sib_dummy_DZ * weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3435.3
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.18530 -0.51629 -0.08785  0.46137  3.02123 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5343   0.7309  
##  Residual                  0.4466   0.6682  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                      1.861e-02  4.779e-02  8.666e+02   0.389
## fam_avg_weekend_effic           -2.002e-02  4.376e-02  8.452e+02  -0.457
## weekend_effic_diff               4.782e-03  5.869e-02  4.442e+02   0.081
## covid                            5.796e-03  1.969e-01  1.044e+03   0.029
## sib_dummy_MZ                    -1.937e-01  8.202e-02  7.710e+02  -2.362
## sib_dummy_DZ                    -1.704e-01  7.412e-02  7.842e+02  -2.299
## weekend_effic_diff:sib_dummy_MZ  3.362e-03  1.148e-01  4.262e+02   0.029
## weekend_effic_diff:sib_dummy_DZ -3.623e-02  9.600e-02  4.295e+02  -0.377
##                                 Pr(>|t|)  
## (Intercept)                       0.6970  
## fam_avg_weekend_effic             0.6475  
## weekend_effic_diff                0.9351  
## covid                             0.9765  
## sib_dummy_MZ                      0.0184 *
## sib_dummy_DZ                      0.0217 *
## weekend_effic_diff:sib_dummy_MZ   0.9767  
## weekend_effic_diff:sib_dummy_DZ   0.7061  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wknd_ -0.081                                           
## wknd_ffc_df -0.002  0.001                                    
## covid       -0.129  0.038  0.016                             
## sib_dmmy_MZ -0.570 -0.025  0.000  0.015                      
## sib_dmmy_DZ -0.640  0.045  0.001  0.046  0.367               
## wknd__:__MZ  0.001 -0.001 -0.511 -0.008 -0.003  0.000        
## wknd__:__DZ  0.000 -0.001 -0.611 -0.004  0.000 -0.003  0.312
out<- weekend_effic_EXT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Externalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekday efficiency

weekday_effic_EXT_pheno<- lmer(EXT_resid~avg_weekday_effic+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_EXT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ avg_weekday_effic + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3459.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1974 -0.5280 -0.0958  0.4579  3.1272 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5488   0.7408  
##  Residual                  0.4370   0.6611  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)         -0.07625    0.03233  808.77436  -2.359   0.0186 *
## avg_weekday_effic   -0.04906    0.02816 1167.78575  -1.742   0.0817 .
## covid                0.01874    0.19716 1068.15366   0.095   0.9243  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wkdy_ff -0.040       
## covid       -0.145  0.037
out<- weekday_effic_EXT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Externalizing",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekday_effic_EXT<- lmer(EXT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_EXT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3463.2
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.18931 -0.52826 -0.09887  0.46029  3.14016 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5488   0.7408  
##  Residual                  0.4375   0.6615  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                         Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)             -0.07659    0.03236  807.68824  -2.367   0.0182 *
## fam_avg_weekday_effic   -0.04130    0.03964  869.32239  -1.042   0.2978  
## weekday_effic_diff      -0.05715    0.04047  449.54685  -1.412   0.1586  
## covid                    0.01918    0.19723 1067.11883   0.097   0.9225  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__
## fm_vg_wkdy_ -0.054              
## wkdy_ffc_df -0.002 -0.010       
## covid       -0.145  0.033  0.018
weekday_effic_EXT_zyg<- lmer(EXT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekday_effic_diff+sib_DZ*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_EXT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekday_effic_diff + sib_DZ *  
##     weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3456
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0366 -0.5365 -0.1110  0.4828  2.9436 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5505   0.7419  
##  Residual                  0.4274   0.6538  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                               Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                 -9.859e-02  3.362e-02  7.738e+02  -2.933  0.00346
## fam_avg_weekday_effic       -3.578e-02  3.970e-02  8.651e+02  -0.901  0.36767
## weekday_effic_diff          -5.348e-02  4.150e-02  4.375e+02  -1.289  0.19824
## covid                       -8.568e-03  1.966e-01  1.070e+03  -0.044  0.96524
## sibDZ_MZ                    -1.029e-01  7.689e-02  7.461e+02  -1.338  0.18118
## sib_DZ                      -1.767e-01  7.378e-02  7.920e+02  -2.394  0.01688
## weekday_effic_diff:sibDZ_MZ  1.155e-01  9.635e-02  4.300e+02   1.199  0.23130
## weekday_effic_diff:sib_DZ   -2.953e-01  9.104e-02  4.487e+02  -3.244  0.00127
##                               
## (Intercept)                 **
## fam_avg_weekday_effic         
## weekday_effic_diff            
## covid                         
## sibDZ_MZ                      
## sib_DZ                      * 
## weekday_effic_diff:sibDZ_MZ   
## weekday_effic_diff:sib_DZ   **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wkdy_ -0.077                                          
## wkdy_ffc_df -0.002 -0.008                                   
## covid       -0.134  0.033  0.016                            
## sibDZ_MZ     0.238 -0.094  0.002 -0.007                     
## sib_DZ       0.129 -0.013 -0.007  0.043 -0.087              
## wkd__:DZ_MZ  0.003  0.004  0.256 -0.010  0.000  0.004       
## wkdy_f_:_DZ -0.010  0.014  0.064  0.013  0.003 -0.002 -0.041
out<- weekday_effic_EXT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Externalizing",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekday_effic_EXT_MZ<- lmer(EXT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekday_effic_diff+MZ_dummy_sib*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_EXT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekday_effic_diff +  
##     MZ_dummy_sib * weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3456
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0366 -0.5365 -0.1110  0.4828  2.9436 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5505   0.7419  
##  Residual                  0.4274   0.6538  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                     -1.672e-01  6.766e-02  7.371e+02  -2.471
## fam_avg_weekday_effic           -3.578e-02  3.970e-02  8.651e+02  -0.901
## weekday_effic_diff               2.352e-02  8.492e-02  4.247e+02   0.277
## covid                           -8.568e-03  1.966e-01  1.070e+03  -0.044
## MZ_dummy_DZ                      1.458e-02  8.811e-02  7.353e+02   0.165
## MZ_dummy_sib                     1.912e-01  8.235e-02  7.770e+02   2.322
## weekday_effic_diff:MZ_dummy_DZ  -2.632e-01  1.082e-01  4.293e+02  -2.431
## weekday_effic_diff:MZ_dummy_sib  3.216e-02  1.049e-01  4.377e+02   0.307
##                                 Pr(>|t|)  
## (Intercept)                       0.0137 *
## fam_avg_weekday_effic             0.3677  
## weekday_effic_diff                0.7819  
## covid                             0.9652  
## MZ_dummy_DZ                       0.8686  
## MZ_dummy_sib                      0.0205 *
## weekday_effic_diff:MZ_dummy_DZ    0.0155 *
## weekday_effic_diff:MZ_dummy_sib   0.7592  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wkdy_ -0.110                                             
## wkdy_ffc_df  0.001 -0.001                                      
## covid       -0.072  0.033  0.000                               
## MZ_dummy_DZ -0.765  0.077 -0.001  0.024                        
## MZ_dummy_sb -0.817  0.094 -0.001 -0.013  0.627                 
## wk__:MZ__DZ -0.002  0.003 -0.784  0.015 -0.003  0.001          
## wkdy__:MZ__  0.000 -0.010 -0.810  0.004  0.000  0.003  0.635
out<- weekday_effic_EXT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Externalizing",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekday_effic_EXT_DZ<- lmer(EXT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekday_effic_diff+DZ_dummy_sib*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_EXT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekday_effic_diff +  
##     DZ_dummy_sib * weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3456
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0366 -0.5365 -0.1110  0.4828  2.9436 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5505   0.7419  
##  Residual                  0.4274   0.6538  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                     -1.526e-01  5.675e-02  7.410e+02  -2.689
## fam_avg_weekday_effic           -3.578e-02  3.970e-02  8.651e+02  -0.901
## weekday_effic_diff              -2.396e-01  6.713e-02  4.368e+02  -3.570
## covid                           -8.568e-03  1.966e-01  1.070e+03  -0.044
## DZ_dummy_MZ                     -1.458e-02  8.811e-02  7.353e+02  -0.165
## DZ_dummy_sib                     1.767e-01  7.378e-02  7.920e+02   2.394
## weekday_effic_diff:DZ_dummy_MZ   2.632e-01  1.082e-01  4.293e+02   2.431
## weekday_effic_diff:DZ_dummy_sib  2.953e-01  9.104e-02  4.487e+02   3.244
##                                 Pr(>|t|)    
## (Intercept)                     0.007324 ** 
## fam_avg_weekday_effic           0.367669    
## weekday_effic_diff              0.000397 ***
## covid                           0.965241    
## DZ_dummy_MZ                     0.868646    
## DZ_dummy_sib                    0.016877 *  
## weekday_effic_diff:DZ_dummy_MZ  0.015465 *  
## weekday_effic_diff:DZ_dummy_sib 0.001268 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wkdy_ -0.012                                             
## wkdy_ffc_df -0.012  0.003                                      
## covid       -0.048  0.033  0.024                               
## DZ_dummy_MZ -0.641 -0.077  0.006 -0.024                        
## DZ_dummy_sb -0.765  0.013  0.007 -0.043  0.494                 
## wk__:DZ__MZ  0.008 -0.003 -0.620 -0.015 -0.003 -0.005          
## wkdy__:DZ__  0.009 -0.014 -0.737 -0.013 -0.004 -0.002  0.457
out<- weekday_effic_EXT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Externalizing",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekday_effic_EXT_sib<- lmer(EXT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekday_effic_diff+sib_dummy_DZ*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_EXT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: EXT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekday_effic_diff +  
##     sib_dummy_DZ * weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3456
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0366 -0.5365 -0.1110  0.4828  2.9436 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.5505   0.7419  
##  Residual                  0.4274   0.6538  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                      2.404e-02  4.748e-02  8.737e+02   0.506
## fam_avg_weekday_effic           -3.578e-02  3.970e-02  8.651e+02  -0.901
## weekday_effic_diff               5.568e-02  6.151e-02  4.639e+02   0.905
## covid                           -8.568e-03  1.966e-01  1.070e+03  -0.044
## sib_dummy_MZ                    -1.912e-01  8.235e-02  7.770e+02  -2.322
## sib_dummy_DZ                    -1.767e-01  7.378e-02  7.920e+02  -2.394
## weekday_effic_diff:sib_dummy_MZ -3.216e-02  1.049e-01  4.377e+02  -0.307
## weekday_effic_diff:sib_dummy_DZ -2.953e-01  9.104e-02  4.487e+02  -3.244
##                                 Pr(>|t|)   
## (Intercept)                      0.61275   
## fam_avg_weekday_effic            0.36767   
## weekday_effic_diff               0.36578   
## covid                            0.96524   
## sib_dummy_MZ                     0.02048 * 
## sib_dummy_DZ                     0.01688 * 
## weekday_effic_diff:sib_dummy_MZ  0.75922   
## weekday_effic_diff:sib_dummy_DZ  0.00127 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wkdy_  0.007                                           
## wkdy_ffc_df  0.008 -0.018                                    
## covid       -0.125  0.033  0.006                             
## sib_dmmy_MZ -0.570 -0.094 -0.003  0.013                      
## sib_dmmy_DZ -0.639 -0.013 -0.005  0.043  0.367               
## wkdy__:__MZ -0.005  0.010 -0.587 -0.004  0.003  0.003        
## wkdy__:__DZ -0.007  0.014 -0.676  0.013  0.002 -0.002  0.396
out<- weekday_effic_EXT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Externalizing",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

Attention Problems

variability

# variability (fitbit)
variability_ATT_pheno<- lmer(ATT_resid~variability+covid+(1|rel_family_id), data=abcd_all)
summary(variability_ATT_pheno)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ variability + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3484.4
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.86194 -0.69699 -0.09916  0.61917  2.72535 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2906   0.5391  
##  Residual                  0.6267   0.7916  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)   -0.13139    0.02968  803.09488  -4.427 1.09e-05 ***
## variability    0.12399    0.02834 1256.85608   4.375 1.31e-05 ***
## covid         -0.12294    0.18641  912.21602  -0.660     0.51    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) vrblty
## variability  0.045       
## covid       -0.154 -0.071
out<- variability_ATT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Attention Problems",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

variability_ATT<- lmer(ATT_resid~avg_variabilitiy+variabiltiy_diff+covid+(1|rel_family_id), data=abcd_all)
summary(variability_ATT) ### don't need to save this one, just for model comparison
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + (1 |  
##     rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3487.3
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.83343 -0.69661 -0.09523  0.61766  2.69296 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2912   0.5396  
##  Residual                  0.6264   0.7915  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                   Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)       -0.13083    0.02969 803.06106  -4.406 1.20e-05 ***
## avg_variabilitiy   0.13982    0.03332 882.25916   4.196 2.99e-05 ***
## variabiltiy_diff   0.08285    0.05361 483.39448   1.545    0.123    
## covid             -0.12733    0.18652 912.28708  -0.683    0.495    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_
## avg_varblty  0.049              
## varblty_dff  0.006  0.003       
## covid       -0.154 -0.074 -0.016
variability_ATT_zyg<- lmer(ATT_resid~avg_variabilitiy+variabiltiy_diff+covid+sibDZ_MZ+sib_DZ+variabiltiy_diff*sibDZ_MZ+variabiltiy_diff*sib_DZ+(1|rel_family_id), data=abcd_all)
summary(variability_ATT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + sibDZ_MZ +  
##     sib_DZ + variabiltiy_diff * sibDZ_MZ + variabiltiy_diff *  
##     sib_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3488.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7785 -0.6902 -0.1245  0.6340  2.6535 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2817   0.5308  
##  Residual                  0.6293   0.7933  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                             Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)                -0.153884   0.030543 759.082862  -5.038 5.87e-07 ***
## avg_variabilitiy            0.139571   0.033196 880.895671   4.204 2.89e-05 ***
## variabiltiy_diff            0.084789   0.056239 477.480348   1.508   0.1323    
## covid                      -0.148820   0.185844 906.683991  -0.801   0.4235    
## sibDZ_MZ                   -0.132094   0.069351 721.585626  -1.905   0.0572 .  
## sib_DZ                     -0.165768   0.067475 789.661688  -2.457   0.0142 *  
## variabiltiy_diff:sibDZ_MZ   0.007741   0.132407 471.743848   0.058   0.9534    
## variabiltiy_diff:sib_DZ    -0.059206   0.120733 486.628361  -0.490   0.6241    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  sDZ_MZ sib_DZ v_:DZ_
## avg_varblty  0.053                                          
## varblty_dff  0.004  0.002                                   
## covid       -0.145 -0.076 -0.013                            
## sibDZ_MZ     0.223  0.042 -0.003 -0.008                     
## sib_DZ       0.106 -0.032 -0.002  0.050 -0.077              
## vrbl_:DZ_MZ -0.004 -0.004  0.295  0.008  0.000  0.002       
## vrblty_:_DZ -0.003 -0.005 -0.006  0.009  0.001  0.006  0.004
out<- variability_ATT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Attention Problems",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

variability_ATT_MZ<- lmer(ATT_resid~avg_variabilitiy+variabiltiy_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+variabiltiy_diff*MZ_dummy_DZ+variabiltiy_diff*MZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(variability_ATT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## ATT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + MZ_dummy_DZ +  
##     MZ_dummy_sib + variabiltiy_diff * MZ_dummy_DZ + variabiltiy_diff *  
##     MZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3488.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7785 -0.6902 -0.1245  0.6340  2.6535 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2817   0.5308  
##  Residual                  0.6293   0.7933  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                    -0.24195    0.06083 706.15666  -3.978 7.68e-05
## avg_variabilitiy                0.13957    0.03320 880.89567   4.204 2.89e-05
## variabiltiy_diff                0.08995    0.11784 467.87930   0.763  0.44566
## covid                          -0.14882    0.18584 906.68399  -0.801  0.42347
## MZ_dummy_DZ                     0.04921    0.07943 705.72476   0.620  0.53578
## MZ_dummy_sib                    0.21498    0.07474 767.57692   2.876  0.00413
## variabiltiy_diff:MZ_dummy_DZ   -0.03734    0.14529 466.83603  -0.257  0.79727
## variabiltiy_diff:MZ_dummy_sib   0.02186    0.14575 481.79107   0.150  0.88083
##                                  
## (Intercept)                   ***
## avg_variabilitiy              ***
## variabiltiy_diff                 
## covid                            
## MZ_dummy_DZ                      
## MZ_dummy_sib                  ** 
## variabiltiy_diff:MZ_dummy_DZ     
## variabiltiy_diff:MZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  MZ__DZ MZ_dm_ v_:MZ__D
## avg_varblty  0.059                                            
## varblty_dff -0.002 -0.002                                     
## covid       -0.079 -0.076  0.000                              
## MZ_dummy_DZ -0.764 -0.050  0.001  0.029                       
## MZ_dummy_sb -0.807 -0.025  0.001 -0.015  0.618                
## vrb_:MZ__DZ  0.002  0.001 -0.811 -0.004  0.000 -0.001         
## vrblt_:MZ__  0.002  0.006 -0.809 -0.011 -0.001  0.002  0.656
out<- variability_ATT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Attention Problems",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

variability_ATT_DZ<- lmer(ATT_resid~avg_variabilitiy+variabiltiy_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+variabiltiy_diff*DZ_dummy_MZ+variabiltiy_diff*DZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(variability_ATT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## ATT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + DZ_dummy_MZ +  
##     DZ_dummy_sib + variabiltiy_diff * DZ_dummy_MZ + variabiltiy_diff *  
##     DZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3488.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7785 -0.6902 -0.1245  0.6340  2.6535 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2817   0.5308  
##  Residual                  0.6293   0.7933  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                    -0.19274    0.05129 709.57278  -3.758 0.000185
## avg_variabilitiy                0.13957    0.03320 880.89567   4.204 2.89e-05
## variabiltiy_diff                0.05261    0.08499 464.83582   0.619 0.536240
## covid                          -0.14882    0.18584 906.68399  -0.801 0.423470
## DZ_dummy_MZ                    -0.04921    0.07943 705.72476  -0.620 0.535777
## DZ_dummy_sib                    0.16577    0.06748 789.66169   2.457 0.014235
## variabiltiy_diff:DZ_dummy_MZ    0.03734    0.14529 466.83603   0.257 0.797269
## variabiltiy_diff:DZ_dummy_sib   0.05921    0.12073 486.62836   0.490 0.624079
##                                  
## (Intercept)                   ***
## avg_variabilitiy              ***
## variabiltiy_diff                 
## covid                            
## DZ_dummy_MZ                      
## DZ_dummy_sib                  *  
## variabiltiy_diff:DZ_dummy_MZ     
## variabiltiy_diff:DZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  DZ__MZ DZ_dm_ v_:DZ__M
## avg_varblty -0.008                                            
## varblty_dff  0.003  0.000                                     
## covid       -0.049 -0.076 -0.006                              
## DZ_dummy_MZ -0.643  0.050 -0.002 -0.029                       
## DZ_dummy_sb -0.756  0.032 -0.002 -0.050  0.492                
## vrb_:DZ__MZ -0.002 -0.001 -0.585  0.004  0.000  0.001         
## vrblt_:DZ__ -0.002  0.005 -0.704 -0.009  0.002  0.006  0.412
out<- variability_ATT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Attention Problems",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)


variability_ATT_sib<- lmer(ATT_resid~avg_variabilitiy+variabiltiy_diff+covid+sib_dummy_MZ+sib_dummy_DZ+variabiltiy_diff*sib_dummy_MZ+variabiltiy_diff*sib_dummy_DZ+(1|rel_family_id), data=abcd_all)
summary(variability_ATT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## ATT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + sib_dummy_MZ +  
##     sib_dummy_DZ + variabiltiy_diff * sib_dummy_MZ + variabiltiy_diff *  
##     sib_dummy_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3488.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7785 -0.6902 -0.1245  0.6340  2.6535 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2817   0.5308  
##  Residual                  0.6293   0.7933  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                    -0.02697    0.04417 911.84545  -0.611  0.54166
## avg_variabilitiy                0.13957    0.03320 880.89567   4.204 2.89e-05
## variabiltiy_diff                0.11181    0.08576 509.44231   1.304  0.19291
## covid                          -0.14882    0.18584 906.68399  -0.801  0.42347
## sib_dummy_MZ                   -0.21498    0.07474 767.57691  -2.876  0.00413
## sib_dummy_DZ                   -0.16577    0.06748 789.66169  -2.457  0.01424
## variabiltiy_diff:sib_dummy_MZ  -0.02186    0.14575 481.79107  -0.150  0.88083
## variabiltiy_diff:sib_dummy_DZ  -0.05921    0.12073 486.62836  -0.490  0.62408
##                                  
## (Intercept)                      
## avg_variabilitiy              ***
## variabiltiy_diff                 
## covid                            
## sib_dummy_MZ                  ** 
## sib_dummy_DZ                  *  
## variabiltiy_diff:sib_dummy_MZ    
## variabiltiy_diff:sib_dummy_DZ    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  sb__MZ sb__DZ v_:__M
## avg_varblty  0.039                                          
## varblty_dff  0.011  0.007                                   
## covid       -0.134 -0.076 -0.019                            
## sib_dmmy_MZ -0.581  0.025 -0.005  0.015                     
## sib_dmmy_DZ -0.650 -0.032 -0.006  0.050  0.380              
## vrblt_:__MZ -0.006 -0.006 -0.588  0.011  0.002  0.004       
## vrblt_:__DZ -0.007 -0.005 -0.710  0.009  0.003  0.006  0.418
out<- variability_ATT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Attention Problems",
         model="Dummy Sib")
abcd_out<- rbind(abcd_out, out)

social jet lag

# jetlag 
jetlag_ATT_pheno<- lmer(ATT_resid~social_jet_lag_wave_2+(1|rel_family_id), data=abcd_all)
summary(jetlag_ATT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ social_jet_lag_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5924.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9835 -0.7307 -0.0873  0.6547  3.3078 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2822   0.5312  
##  Residual                  0.6481   0.8050  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                         Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)           -1.472e-01  2.312e-02  1.200e+03  -6.366 2.75e-10 ***
## social_jet_lag_wave_2  3.258e-03  2.288e-02  2.147e+03   0.142    0.887    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## scl_jt_l__2 0.041
out<- jetlag_ATT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Attention Problems",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

jetlag_ATT<- lmer(ATT_resid~avg_jetlag+jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_ATT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_jetlag + jetlag_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5929.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9815 -0.7303 -0.0886  0.6550  3.3053 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2823   0.5313  
##  Residual                  0.6484   0.8052  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept) -1.471e-01  2.313e-02  1.198e+03  -6.357 2.91e-10 ***
## avg_jetlag   5.798e-03  2.983e-02  1.248e+03   0.194    0.846    
## jetlag_diff -3.377e-04  3.546e-02  1.122e+03  -0.010    0.992    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt
## avg_jetlag  0.053        
## jetlag_diff 0.001  0.005
jetlag_ATT_zyg<- lmer(ATT_resid~avg_jetlag+jetlag_diff+sibDZ_MZ+sib_DZ+sibDZ_MZ*jetlag_diff+sib_DZ*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_ATT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_jetlag + jetlag_diff + sibDZ_MZ + sib_DZ + sibDZ_MZ *  
##     jetlag_diff + sib_DZ * jetlag_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5936
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0175 -0.7118 -0.0780  0.6334  3.2705 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2793   0.5284  
##  Residual                  0.6495   0.8059  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)          -1.683e-01  2.450e-02  1.134e+03  -6.870 1.05e-11 ***
## avg_jetlag            5.599e-03  2.978e-02  1.246e+03   0.188   0.8509    
## jetlag_diff          -4.897e-03  4.310e-02  9.839e+02  -0.114   0.9096    
## sibDZ_MZ             -8.939e-02  5.624e-02  1.112e+03  -1.589   0.1122    
## sib_DZ               -9.887e-02  5.448e-02  1.165e+03  -1.815   0.0698 .  
## jetlag_diff:sibDZ_MZ  1.506e-02  1.040e-01  9.691e+02   0.145   0.8849    
## jetlag_diff:sib_DZ   -3.268e-02  8.866e-02  1.012e+03  -0.369   0.7125    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d sDZ_MZ sib_DZ j_:DZ_
## avg_jetlag   0.050                                   
## jetlag_diff  0.005  0.005                            
## sibDZ_MZ     0.226 -0.010  0.002                     
## sib_DZ       0.212  0.011  0.004 -0.138              
## jtlg_:DZ_MZ  0.002  0.001  0.366  0.005 -0.003       
## jtlg_df:_DZ  0.004  0.001  0.345 -0.003  0.004 -0.215
out<- jetlag_ATT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Attention Problems",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

jetlag_ATT_MZ<- lmer(ATT_resid~avg_jetlag+jetlag_diff+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*jetlag_diff+MZ_dummy_sib*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_ATT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_jetlag + jetlag_diff + MZ_dummy_DZ + MZ_dummy_sib +  
##     MZ_dummy_DZ * jetlag_diff + MZ_dummy_sib * jetlag_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5936
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0175 -0.7118 -0.0780  0.6334  3.2705 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2793   0.5284  
##  Residual                  0.6495   0.8059  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -2.279e-01  4.921e-02  1.097e+03  -4.631 4.07e-06 ***
## avg_jetlag                5.599e-03  2.978e-02  1.246e+03   0.188   0.8509    
## jetlag_diff               5.141e-03  9.410e-02  9.599e+02   0.055   0.9564    
## MZ_dummy_DZ               3.995e-02  6.579e-02  1.094e+03   0.607   0.5438    
## MZ_dummy_sib              1.388e-01  5.900e-02  1.157e+03   2.353   0.0188 *  
## jetlag_diff:MZ_dummy_DZ  -3.140e-02  1.215e-01  9.560e+02  -0.258   0.7962    
## jetlag_diff:MZ_dummy_sib  1.283e-03  1.040e-01  1.003e+03   0.012   0.9902    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d MZ__DZ MZ_dm_ j_:MZ__D
## avg_jetlag   0.018                                     
## jetlag_diff  0.005  0.003                              
## MZ_dummy_DZ -0.748  0.013 -0.003                       
## MZ_dummy_sb -0.834  0.004 -0.004  0.624                
## jtl_:MZ__DZ -0.004  0.000 -0.774  0.006  0.003         
## jtlg_d:MZ__ -0.004 -0.001 -0.905  0.003  0.003  0.701
out<- jetlag_ATT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Attention Problems",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

jetlag_ATT_DZ<- lmer(ATT_resid~avg_jetlag+jetlag_diff+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*jetlag_diff+DZ_dummy_sib*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_ATT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_jetlag + jetlag_diff + DZ_dummy_MZ + DZ_dummy_sib +  
##     DZ_dummy_MZ * jetlag_diff + DZ_dummy_sib * jetlag_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5936
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0175 -0.7118 -0.0780  0.6334  3.2705 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2793   0.5284  
##  Residual                  0.6495   0.8059  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -1.880e-01  4.370e-02  1.092e+03  -4.301 1.85e-05 ***
## avg_jetlag                5.599e-03  2.978e-02  1.246e+03   0.188   0.8509    
## jetlag_diff              -2.626e-02  7.687e-02  9.500e+02  -0.342   0.7328    
## DZ_dummy_MZ              -3.995e-02  6.579e-02  1.094e+03  -0.607   0.5438    
## DZ_dummy_sib              9.887e-02  5.448e-02  1.165e+03   1.815   0.0698 .  
## jetlag_diff:DZ_dummy_MZ   3.140e-02  1.215e-01  9.560e+02   0.258   0.7962    
## jetlag_diff:DZ_dummy_sib  3.268e-02  8.866e-02  1.012e+03   0.369   0.7125    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d DZ__MZ DZ_dm_ j_:DZ__M
## avg_jetlag   0.039                                     
## jetlag_diff  0.007  0.003                              
## DZ_dummy_MZ -0.664 -0.013 -0.005                       
## DZ_dummy_sb -0.801 -0.011 -0.006  0.532                
## jtl_:DZ__MZ -0.005  0.000 -0.633  0.006  0.004         
## jtlg_d:DZ__ -0.006 -0.001 -0.867  0.004  0.004  0.548
out<- jetlag_ATT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Attention Problems",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

jetlag_ATT_sib<- lmer(ATT_resid~avg_jetlag+jetlag_diff+DZ_dummy_MZ+sib_dummy_DZ+DZ_dummy_MZ*jetlag_diff+sib_dummy_DZ*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_ATT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_jetlag + jetlag_diff + DZ_dummy_MZ + sib_dummy_DZ +  
##     DZ_dummy_MZ * jetlag_diff + sib_dummy_DZ * jetlag_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5936
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0175 -0.7118 -0.0780  0.6334  3.2705 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2793   0.5284  
##  Residual                  0.6495   0.8059  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)              -8.909e-02  3.258e-02  1.306e+03  -2.734  0.00634 **
## avg_jetlag                5.599e-03  2.978e-02  1.246e+03   0.188  0.85090   
## jetlag_diff               6.424e-03  4.418e-02  1.224e+03   0.145  0.88443   
## DZ_dummy_MZ              -1.388e-01  5.900e-02  1.157e+03  -2.353  0.01880 * 
## sib_dummy_DZ             -9.887e-02  5.448e-02  1.165e+03  -1.815  0.06980 . 
## jetlag_diff:DZ_dummy_MZ  -1.283e-03  1.040e-01  1.003e+03  -0.012  0.99015   
## jetlag_diff:sib_dummy_DZ -3.268e-02  8.866e-02  1.012e+03  -0.369  0.71251   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d DZ__MZ sb__DZ j_:DZ_
## avg_jetlag   0.034                                   
## jetlag_diff -0.003  0.003                            
## DZ_dummy_MZ -0.552 -0.004  0.002                     
## sib_dmmy_DZ -0.597  0.011  0.002  0.330              
## jtl_:DZ__MZ  0.001  0.001 -0.425  0.003 -0.001       
## jtlg_d:__DZ  0.002  0.001 -0.498 -0.001  0.004  0.212
out<- jetlag_ATT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Attention Problems",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekend duration (fitbit)

# weekend duration (fitbit)
weekend_dur_ATT_pheno<- lmer(ATT_resid~avg_weekend_dur+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_ATT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_weekend_dur + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3457.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7712 -0.6903 -0.1134  0.6232  2.6863 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.3052   0.5524  
##  Residual                  0.6231   0.7893  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                   Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)       -0.14069    0.03010  793.97071  -4.674 3.47e-06 ***
## avg_weekend_dur   -0.03083    0.02889 1232.05911  -1.067    0.286    
## covid             -0.06682    0.18754  902.50138  -0.356    0.722    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wknd_dr -0.054       
## covid       -0.153  0.033
out<- weekend_dur_ATT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekend_dur_ATT<- lmer(ATT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_ATT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3461.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7780 -0.6836 -0.1178  0.6263  2.6961 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.3053   0.5526  
##  Residual                  0.6234   0.7896  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                      Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)          -0.14125    0.03013 793.37305  -4.689 3.24e-06 ***
## fam_avg_weekend_dur  -0.02139    0.03374 855.82724  -0.634    0.526    
## weekend_dur_diff     -0.05675    0.05583 472.34716  -1.017    0.310    
## covid                -0.06299    0.18772 901.23312  -0.336    0.737    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__
## fm_vg_wknd_ -0.064              
## wknd_dr_dff  0.001  0.001       
## covid       -0.154  0.047 -0.015
weekend_dur_ATT_zyg<- lmer(ATT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekend_dur_diff+sib_DZ*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_ATT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekend_dur_diff + sib_DZ *  
##     weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3460.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7469 -0.6974 -0.1282  0.6146  2.6502 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2979   0.5458  
##  Residual                  0.6240   0.7899  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                             Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)               -1.648e-01  3.103e-02  7.510e+02  -5.311 1.44e-07 ***
## fam_avg_weekend_dur       -1.337e-02  3.371e-02  8.559e+02  -0.397   0.6918    
## weekend_dur_diff          -6.299e-02  6.238e-02  4.620e+02  -1.010   0.3132    
## covid                     -8.256e-02  1.871e-01  8.964e+02  -0.441   0.6591    
## sibDZ_MZ                  -1.355e-01  7.041e-02  7.146e+02  -1.925   0.0547 .  
## sib_DZ                    -1.603e-01  6.851e-02  7.780e+02  -2.340   0.0196 *  
## weekend_dur_diff:sibDZ_MZ -8.802e-04  1.544e-01  4.586e+02  -0.006   0.9955    
## weekend_dur_diff:sib_DZ   -1.641e-01  1.220e-01  4.692e+02  -1.345   0.1794    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wknd_ -0.084                                          
## wknd_dr_dff -0.001  0.002                                   
## covid       -0.145  0.046 -0.010                            
## sibDZ_MZ     0.224 -0.081 -0.001 -0.009                     
## sib_DZ       0.114 -0.029 -0.002  0.046 -0.076              
## wkn__:DZ_MZ -0.002  0.001  0.439  0.007 -0.002  0.001       
## wknd_d_:_DZ -0.002  0.002  0.061  0.006  0.001 -0.001 -0.037
out<- weekend_dur_ATT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)


weekend_dur_ATT_MZ<- lmer(ATT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekend_dur_diff+MZ_dummy_sib*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_ATT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekend_dur_diff +  
##     MZ_dummy_sib * weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3460.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7469 -0.6974 -0.1282  0.6146  2.6502 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2979   0.5458  
##  Residual                  0.6240   0.7899  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                    -0.25517    0.06179 701.33387  -4.130 4.07e-05
## fam_avg_weekend_dur            -0.01337    0.03371 855.94749  -0.397  0.69175
## weekend_dur_diff               -0.06357    0.14188 456.68609  -0.448  0.65432
## covid                          -0.08256    0.18706 896.36700  -0.441  0.65905
## MZ_dummy_DZ                     0.05539    0.08060 697.63272   0.687  0.49221
## MZ_dummy_sib                    0.21566    0.07593 760.03238   2.840  0.00463
## weekend_dur_diff:MZ_dummy_DZ   -0.08116    0.16814 454.87260  -0.483  0.62954
## weekend_dur_diff:MZ_dummy_sib   0.08292    0.16395 465.55828   0.506  0.61327
##                                  
## (Intercept)                   ***
## fam_avg_weekend_dur              
## weekend_dur_diff                 
## covid                            
## MZ_dummy_DZ                      
## MZ_dummy_sib                  ** 
## weekend_dur_diff:MZ_dummy_DZ     
## weekend_dur_diff:MZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wknd_ -0.104                                             
## wknd_dr_dff -0.003  0.002                                      
## covid       -0.079  0.046  0.000                               
## MZ_dummy_DZ -0.762  0.058  0.002  0.027                        
## MZ_dummy_sb -0.808  0.088  0.002 -0.013  0.618                 
## wk__:MZ__DZ  0.002  0.000 -0.844 -0.004 -0.003 -0.002          
## wknd__:MZ__  0.003 -0.002 -0.865 -0.008 -0.002 -0.002  0.730
out<- weekend_dur_ATT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_ATT_DZ<- lmer(ATT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekend_dur_diff+DZ_dummy_sib*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_ATT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekend_dur_diff +  
##     DZ_dummy_sib * weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3460.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7469 -0.6974 -0.1282  0.6146  2.6502 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2979   0.5458  
##  Residual                  0.6240   0.7899  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                    -0.19978    0.05221 701.92460  -3.827 0.000141
## fam_avg_weekend_dur            -0.01337    0.03371 855.94749  -0.397 0.691752
## weekend_dur_diff               -0.14473    0.09022 450.41745  -1.604 0.109362
## covid                          -0.08256    0.18706 896.36700  -0.441 0.659052
## DZ_dummy_MZ                    -0.05539    0.08060 697.63272  -0.687 0.492208
## DZ_dummy_sib                    0.16028    0.06851 778.03377   2.340 0.019559
## weekend_dur_diff:DZ_dummy_MZ    0.08116    0.16814 454.87260   0.483 0.629542
## weekend_dur_diff:DZ_dummy_sib   0.16408    0.12202 469.15987   1.345 0.179363
##                                  
## (Intercept)                   ***
## fam_avg_weekend_dur              
## weekend_dur_diff                 
## covid                            
## DZ_dummy_MZ                      
## DZ_dummy_sib                  *  
## weekend_dur_diff:DZ_dummy_MZ     
## weekend_dur_diff:DZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wknd_ -0.033                                             
## wknd_dr_dff -0.002  0.002                                      
## covid       -0.052  0.046 -0.007                               
## DZ_dummy_MZ -0.642 -0.058  0.002 -0.027                        
## DZ_dummy_sb -0.758  0.029  0.002 -0.046  0.491                 
## wk__:DZ__MZ  0.001  0.000 -0.537  0.004 -0.003 -0.001          
## wknd__:DZ__  0.002 -0.002 -0.739 -0.006 -0.001 -0.001  0.397
out<- weekend_dur_ATT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_ATT_sib<- lmer(ATT_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekend_dur_diff+sib_dummy_DZ*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_ATT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekend_dur_diff +  
##     sib_dummy_DZ * weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3460.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7469 -0.6974 -0.1282  0.6146  2.6502 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2979   0.5458  
##  Residual                  0.6240   0.7899  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                    -0.03951    0.04470 895.06511  -0.884  0.37699
## fam_avg_weekend_dur            -0.01337    0.03371 855.94749  -0.397  0.69175
## weekend_dur_diff                0.01935    0.08216 493.27035   0.235  0.81394
## covid                          -0.08256    0.18706 896.36700  -0.441  0.65905
## sib_dummy_MZ                   -0.21566    0.07593 760.03238  -2.840  0.00463
## sib_dummy_DZ                   -0.16028    0.06851 778.03376  -2.340  0.01956
## weekend_dur_diff:sib_dummy_MZ  -0.08292    0.16395 465.55828  -0.506  0.61327
## weekend_dur_diff:sib_dummy_DZ  -0.16408    0.12202 469.15987  -1.345  0.17936
##                                 
## (Intercept)                     
## fam_avg_weekend_dur             
## weekend_dur_diff                
## covid                           
## sib_dummy_MZ                  **
## sib_dummy_DZ                  * 
## weekend_dur_diff:sib_dummy_MZ   
## weekend_dur_diff:sib_dummy_DZ   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wknd_  0.006                                           
## wknd_dr_dff  0.002 -0.001                                    
## covid       -0.132  0.046 -0.016                             
## sib_dmmy_MZ -0.581 -0.088  0.000  0.013                      
## sib_dmmy_DZ -0.648 -0.029 -0.001  0.046  0.381               
## wknd__:__MZ -0.001  0.002 -0.501  0.008 -0.002  0.000        
## wknd__:__DZ -0.001  0.002 -0.673  0.006  0.000 -0.001  0.337
out<- weekend_dur_ATT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekday duration (fitbit)

# weekday duration (fitbit)
weekday_dur_ATT_pheno<- lmer(ATT_resid~avg_weekday_dur+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_ATT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_weekday_dur + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3501.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7688 -0.6932 -0.1168  0.6227  2.6742 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.3039   0.5513  
##  Residual                  0.6280   0.7925  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                   Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)       -0.13486    0.02999  799.85520  -4.497 7.91e-06 ***
## avg_weekday_dur   -0.03848    0.02904 1213.38899  -1.325    0.185    
## covid             -0.06932    0.18773  908.31453  -0.369    0.712    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wkdy_dr -0.051       
## covid       -0.152  0.015
out<- weekday_dur_ATT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekday_dur_ATT<- lmer(ATT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_ATT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3499.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8578 -0.6816 -0.1216  0.6156  2.6026 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.3057   0.5529  
##  Residual                  0.6237   0.7897  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                       Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)          -0.136093   0.029973 801.486761  -4.541 6.47e-06 ***
## fam_avg_weekday_dur  -0.001226   0.033154 855.537311  -0.037  0.97051    
## weekday_dur_diff     -0.158382   0.059073 483.277774  -2.681  0.00759 ** 
## covid                -0.069076   0.187562 910.916388  -0.368  0.71275    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__
## fm_vg_wkdy_ -0.053              
## wkdy_dr_dff -0.008  0.007       
## covid       -0.151  0.014  0.007
weekday_dur_ATT_zyg<- lmer(ATT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekday_dur_diff+sib_DZ*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_ATT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekday_dur_diff + sib_DZ *  
##     weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3498.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9674 -0.6809 -0.1327  0.6216  2.6451 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2976   0.5455  
##  Residual                  0.6245   0.7903  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                             Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)                -0.160366   0.030868 758.108736  -5.195 2.63e-07 ***
## fam_avg_weekday_dur         0.005573   0.033067 854.420099   0.169   0.8662    
## weekday_dur_diff           -0.139538   0.061630 476.423423  -2.264   0.0240 *  
## covid                      -0.089796   0.186848 905.586338  -0.481   0.6309    
## sibDZ_MZ                   -0.144912   0.070124 718.894460  -2.067   0.0391 *  
## sib_DZ                     -0.155900   0.068086 784.851800  -2.290   0.0223 *  
## weekday_dur_diff:sibDZ_MZ   0.139130   0.144437 469.399255   0.963   0.3359    
## weekday_dur_diff:sib_DZ    -0.127263   0.133274 487.723411  -0.955   0.3401    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wkdy_ -0.070                                          
## wkdy_dr_dff -0.009  0.006                                   
## covid       -0.142  0.013  0.005                            
## sibDZ_MZ     0.225 -0.065 -0.005 -0.006                     
## sib_DZ       0.111 -0.023 -0.002  0.047 -0.075              
## wkd__:DZ_MZ -0.004 -0.004  0.282 -0.002 -0.010  0.001       
## wkdy_d_:_DZ -0.002 -0.007 -0.021  0.008  0.002 -0.005  0.013
out<- weekday_dur_ATT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)


weekday_dur_ATT_MZ<- lmer(ATT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekday_dur_diff+MZ_dummy_sib*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_ATT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekday_dur_diff +  
##     MZ_dummy_sib * weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3498.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9674 -0.6809 -0.1327  0.6216  2.6451 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2976   0.5455  
##  Residual                  0.6245   0.7903  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                    -0.256974   0.061554 705.793883  -4.175 3.36e-05
## fam_avg_weekday_dur             0.005573   0.033067 854.420099   0.169   0.8662
## weekday_dur_diff               -0.046785   0.128147 464.593958  -0.365   0.7152
## covid                          -0.089796   0.186848 905.586338  -0.481   0.6309
## MZ_dummy_DZ                     0.066962   0.080219 702.460414   0.835   0.4041
## MZ_dummy_sib                    0.222862   0.075614 764.521353   2.947   0.0033
## weekday_dur_diff:MZ_dummy_DZ   -0.202761   0.158251 463.979057  -1.281   0.2007
## weekday_dur_diff:MZ_dummy_sib  -0.075498   0.159880 481.141762  -0.472   0.6370
##                                  
## (Intercept)                   ***
## fam_avg_weekday_dur              
## weekday_dur_diff                 
## covid                            
## MZ_dummy_DZ                      
## MZ_dummy_sib                  ** 
## weekday_dur_diff:MZ_dummy_DZ     
## weekday_dur_diff:MZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wkdy_ -0.084                                             
## wkdy_dr_dff -0.011  0.000                                      
## covid       -0.076  0.013  0.001                               
## MZ_dummy_DZ -0.763  0.047  0.008  0.025                        
## MZ_dummy_sb -0.808  0.071  0.009 -0.016  0.620                 
## wk__:MZ__DZ  0.008  0.000 -0.810  0.005 -0.010 -0.007          
## wkdy__:MZ__  0.008  0.006 -0.802 -0.001 -0.006 -0.008  0.649
out<- weekday_dur_ATT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_ATT_DZ<- lmer(ATT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekday_dur_diff+DZ_dummy_sib*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_ATT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekday_dur_diff +  
##     DZ_dummy_sib * weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3498.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9674 -0.6809 -0.1327  0.6216  2.6451 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2976   0.5455  
##  Residual                  0.6245   0.7903  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                    -0.190012   0.051816 707.611295  -3.667 0.000264
## fam_avg_weekday_dur             0.005573   0.033067 854.420099   0.169 0.866189
## weekday_dur_diff               -0.249547   0.092854 462.811099  -2.688 0.007458
## covid                          -0.089796   0.186848 905.586338  -0.481 0.630928
## DZ_dummy_MZ                    -0.066962   0.080219 702.460414  -0.835 0.404149
## DZ_dummy_sib                    0.155900   0.068086 784.851799   2.290 0.022299
## weekday_dur_diff:DZ_dummy_MZ    0.202761   0.158251 463.979057   1.281 0.200739
## weekday_dur_diff:DZ_dummy_sib   0.127263   0.133274 487.723411   0.955 0.340101
##                                  
## (Intercept)                   ***
## fam_avg_weekday_dur              
## weekday_dur_diff              ** 
## covid                            
## DZ_dummy_MZ                      
## DZ_dummy_sib                  *  
## weekday_dur_diff:DZ_dummy_MZ     
## weekday_dur_diff:DZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wkdy_ -0.028                                             
## wkdy_dr_dff -0.008  0.001                                      
## covid       -0.050  0.013  0.010                               
## DZ_dummy_MZ -0.641 -0.047  0.005 -0.025                        
## DZ_dummy_sb -0.757  0.023  0.006 -0.047  0.490                 
## wk__:DZ__MZ  0.005  0.000 -0.587 -0.005 -0.010 -0.003          
## wkdy__:DZ__  0.006  0.007 -0.697 -0.008 -0.004 -0.005  0.409
out<- weekday_dur_ATT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_ATT_sib<- lmer(ATT_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekday_dur_diff+sib_dummy_DZ*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_ATT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekday_dur_diff +  
##     sib_dummy_DZ * weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3498.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9674 -0.6809 -0.1327  0.6216  2.6451 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2976   0.5455  
##  Residual                  0.6245   0.7903  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                    -0.034112   0.044506 904.082492  -0.766   0.4436
## fam_avg_weekday_dur             0.005573   0.033067 854.420099   0.169   0.8662
## weekday_dur_diff               -0.122283   0.095604 512.661498  -1.279   0.2015
## covid                          -0.089796   0.186848 905.586338  -0.481   0.6309
## sib_dummy_MZ                   -0.222862   0.075614 764.521354  -2.947   0.0033
## sib_dummy_DZ                   -0.155900   0.068086 784.851800  -2.290   0.0223
## weekday_dur_diff:sib_dummy_MZ   0.075498   0.159880 481.141762   0.472   0.6370
## weekday_dur_diff:sib_dummy_DZ  -0.127263   0.133274 487.723411  -0.955   0.3401
##                                 
## (Intercept)                     
## fam_avg_weekday_dur             
## weekday_dur_diff                
## covid                           
## sib_dummy_MZ                  **
## sib_dummy_DZ                  * 
## weekday_dur_diff:sib_dummy_MZ   
## weekday_dur_diff:sib_dummy_DZ   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wkdy_  0.003                                           
## wkdy_dr_dff -0.004  0.010                                    
## covid       -0.131  0.013 -0.001                             
## sib_dmmy_MZ -0.581 -0.071  0.001  0.016                      
## sib_dmmy_DZ -0.649 -0.023  0.002  0.047  0.381               
## wkdy__:__MZ  0.002 -0.006 -0.598  0.001 -0.008 -0.001        
## wkdy__:__DZ  0.002 -0.007 -0.717  0.008 -0.001 -0.005  0.429
out<- weekday_dur_ATT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekend duration (MCQ)

# weekend duration (MCQ)
weekend_dur_MCQ_ATT_pheno<- lmer(ATT_resid~weekend_dur_mcq_wave_2+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_ATT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ weekend_dur_mcq_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5922.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9849 -0.7315 -0.0818  0.6567  3.2851 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2820   0.5311  
##  Residual                  0.6473   0.8045  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -0.14901    0.02311 1202.40667  -6.447 1.65e-10 ***
## weekend_dur_mcq_wave_2    0.03349    0.02182 2162.08863   1.535    0.125    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## wknd_dr___2 -0.048
out<- weekend_dur_MCQ_ATT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_ATT<- lmer(ATT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_ATT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + (1 |  
##     rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5926.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9957 -0.7305 -0.0887  0.6588  3.2840 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2818   0.5309  
##  Residual                  0.6476   0.8047  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)            -0.14981    0.02314 1200.26957  -6.475 1.38e-10 ***
## avg_weekend_dur_mcq     0.04981    0.03045 1251.65851   1.636    0.102    
## weekend_dur_mcq_diff    0.01650    0.03107 1082.64408   0.531    0.595    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___
## avg_wknd_d_ -0.066       
## wknd_dr_mc_ -0.001  0.007
weekend_dur_MCQ_ATT_zyg<- lmer(ATT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+sibDZ_MZ+sib_DZ+weekend_dur_mcq_diff*sibDZ_MZ+weekend_dur_mcq_diff*sib_DZ+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_ATT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + sibDZ_MZ +  
##     sib_DZ + weekend_dur_mcq_diff * sibDZ_MZ + weekend_dur_mcq_diff *  
##     sib_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5934.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0263 -0.7172 -0.0837  0.6398  3.2483 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2789   0.5281  
##  Residual                  0.6488   0.8055  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                     -0.17025    0.02448 1134.73721  -6.955 5.95e-12
## avg_weekend_dur_mcq              0.04619    0.03044 1250.43710   1.517   0.1294
## weekend_dur_mcq_diff             0.01487    0.03371  987.41309   0.441   0.6592
## sibDZ_MZ                        -0.08772    0.05621 1112.01508  -1.560   0.1189
## sib_DZ                          -0.09544    0.05449 1165.19103  -1.752   0.0801
## weekend_dur_mcq_diff:sibDZ_MZ   -0.02153    0.07802  959.12389  -0.276   0.7826
## weekend_dur_mcq_diff:sib_DZ      0.01007    0.07430 1030.53647   0.136   0.8922
##                                  
## (Intercept)                   ***
## avg_weekend_dur_mcq              
## weekend_dur_mcq_diff             
## sibDZ_MZ                         
## sib_DZ                        .  
## weekend_dur_mcq_diff:sibDZ_MZ    
## weekend_dur_mcq_diff:sib_DZ      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ sDZ_MZ sib_DZ w___:D
## avg_wknd_d_ -0.047                                   
## wknd_dr_mc_  0.000  0.002                            
## sibDZ_MZ     0.226  0.019  0.000                     
## sib_DZ       0.209  0.041  0.002 -0.137              
## wk___:DZ_MZ  0.000 -0.001  0.247  0.000 -0.001       
## wknd___:_DZ  0.002 -0.013  0.253 -0.001  0.000 -0.164
out<- weekend_dur_MCQ_ATT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_ATT_MZ<- lmer(ATT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+MZ_dummy_DZ+MZ_dummy_sib+weekend_dur_mcq_diff*MZ_dummy_DZ+weekend_dur_mcq_diff*MZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_ATT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## ATT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + MZ_dummy_DZ +  
##     MZ_dummy_sib + weekend_dur_mcq_diff * MZ_dummy_DZ + weekend_dur_mcq_diff *  
##     MZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5934.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0263 -0.7172 -0.0837  0.6398  3.2483 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2789   0.5281  
##  Residual                  0.6488   0.8055  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                       -2.287e-01  4.917e-02  1.097e+03  -4.651
## avg_weekend_dur_mcq                4.619e-02  3.044e-02  1.250e+03   1.517
## weekend_dur_mcq_diff               5.175e-04  6.860e-02  9.392e+02   0.008
## MZ_dummy_DZ                        4.000e-02  6.575e-02  1.094e+03   0.608
## MZ_dummy_sib                       1.354e-01  5.901e-02  1.157e+03   2.295
## weekend_dur_mcq_diff:MZ_dummy_DZ   2.657e-02  9.174e-02  9.446e+02   0.290
## weekend_dur_mcq_diff:MZ_dummy_sib  1.649e-02  8.073e-02  1.009e+03   0.204
##                                   Pr(>|t|)    
## (Intercept)                        3.7e-06 ***
## avg_weekend_dur_mcq                 0.1294    
## weekend_dur_mcq_diff                0.9940    
## MZ_dummy_DZ                         0.5431    
## MZ_dummy_sib                        0.0219 *  
## weekend_dur_mcq_diff:MZ_dummy_DZ    0.7722    
## weekend_dur_mcq_diff:MZ_dummy_sib   0.8382    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ MZ__DZ MZ_dm_ w___:MZ__D
## avg_wknd_d_ -0.009                                       
## wknd_dr_mc_  0.000  0.000                                
## MZ_dummy_DZ -0.748  0.000  0.000                         
## MZ_dummy_sb -0.833 -0.037  0.000  0.623                  
## w___:MZ__DZ  0.000 -0.004 -0.748  0.001  0.000           
## wkn___:MZ__  0.000  0.007 -0.850  0.000 -0.001  0.635
out<- weekend_dur_MCQ_ATT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_ATT_DZ<- lmer(ATT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+DZ_dummy_MZ+DZ_dummy_sib+weekend_dur_mcq_diff*DZ_dummy_MZ+weekend_dur_mcq_diff*DZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_ATT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## ATT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + DZ_dummy_MZ +  
##     DZ_dummy_sib + weekend_dur_mcq_diff * DZ_dummy_MZ + weekend_dur_mcq_diff *  
##     DZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5934.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0263 -0.7172 -0.0837  0.6398  3.2483 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2789   0.5281  
##  Residual                  0.6488   0.8055  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                         -0.18873    0.04364 1091.19825  -4.324
## avg_weekend_dur_mcq                  0.04619    0.03044 1250.43710   1.517
## weekend_dur_mcq_diff                 0.02708    0.06091  951.44568   0.445
## DZ_dummy_MZ                         -0.04000    0.06575 1094.16121  -0.608
## DZ_dummy_sib                         0.09544    0.05449 1165.19103   1.752
## weekend_dur_mcq_diff:DZ_dummy_MZ    -0.02657    0.09174  944.57057  -0.290
## weekend_dur_mcq_diff:DZ_dummy_sib   -0.01007    0.07430 1030.53647  -0.136
##                                   Pr(>|t|)    
## (Intercept)                       1.67e-05 ***
## avg_weekend_dur_mcq                 0.1294    
## weekend_dur_mcq_diff                0.6567    
## DZ_dummy_MZ                         0.5431    
## DZ_dummy_sib                        0.0801 .  
## weekend_dur_mcq_diff:DZ_dummy_MZ    0.7722    
## weekend_dur_mcq_diff:DZ_dummy_sib   0.8922    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ DZ__MZ DZ_dm_ w___:DZ__M
## avg_wknd_d_ -0.009                                       
## wknd_dr_mc_  0.002 -0.006                                
## DZ_dummy_MZ -0.664  0.000 -0.001                         
## DZ_dummy_sb -0.801 -0.041 -0.001  0.532                  
## w___:DZ__MZ -0.001  0.004 -0.664  0.001  0.001           
## wkn___:DZ__ -0.002  0.013 -0.820  0.001  0.000  0.544
out<- weekend_dur_MCQ_ATT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_ATT_sib<- lmer(ATT_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+sib_dummy_MZ+sib_dummy_DZ+weekend_dur_mcq_diff*sib_dummy_MZ+weekend_dur_mcq_diff*sib_dummy_DZ+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_ATT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## ATT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + sib_dummy_MZ +  
##     sib_dummy_DZ + weekend_dur_mcq_diff * sib_dummy_MZ + weekend_dur_mcq_diff *  
##     sib_dummy_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5934.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0263 -0.7172 -0.0837  0.6398  3.2483 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2789   0.5281  
##  Residual                  0.6488   0.8055  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                         -0.09329    0.03265 1309.23554  -2.857
## avg_weekend_dur_mcq                  0.04619    0.03044 1250.43710   1.517
## weekend_dur_mcq_diff                 0.01701    0.04255 1214.38265   0.400
## sib_dummy_MZ                        -0.13544    0.05901 1157.38481  -2.295
## sib_dummy_DZ                        -0.09544    0.05449 1165.19103  -1.752
## weekend_dur_mcq_diff:sib_dummy_MZ   -0.01649    0.08073 1008.50607  -0.204
## weekend_dur_mcq_diff:sib_dummy_DZ    0.01007    0.07430 1030.53647   0.136
##                                   Pr(>|t|)   
## (Intercept)                        0.00434 **
## avg_weekend_dur_mcq                0.12940   
## weekend_dur_mcq_diff               0.68938   
## sib_dummy_MZ                       0.02190 * 
## sib_dummy_DZ                       0.08010 . 
## weekend_dur_mcq_diff:sib_dummy_MZ  0.83816   
## weekend_dur_mcq_diff:sib_dummy_DZ  0.89217   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ sb__MZ sb__DZ w___:__M
## avg_wknd_d_ -0.080                                     
## wknd_dr_mc_ -0.004  0.013                              
## sib_dmmy_MZ -0.553  0.037  0.002                       
## sib_dmmy_DZ -0.599  0.041  0.002  0.331                
## wkn___:__MZ  0.002 -0.007 -0.527 -0.001 -0.001         
## wkn___:__DZ  0.003 -0.013 -0.573 -0.002  0.000  0.302
out<- weekend_dur_MCQ_ATT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekday duration (MCQ)

# weekday duration (MCQ)
weekday_dur_MCQ_ATT_pheno<- lmer(ATT_resid~weekday_dur_mcq_wave_2+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_ATT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ weekday_dur_mcq_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5922.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0315 -0.7240 -0.0866  0.6624  3.3523 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2826   0.5316  
##  Residual                  0.6467   0.8042  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -0.14822    0.02310 1199.23795  -6.417 1.99e-10 ***
## weekday_dur_mcq_wave_2   -0.03595    0.02145 2167.54607  -1.676   0.0938 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## wkdy_dr___2 0.024
out<- weekday_dur_MCQ_ATT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_ATT<- lmer(ATT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_ATT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + (1 |  
##     rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5926.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0527 -0.7214 -0.0898  0.6572  3.3750 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2827   0.5317  
##  Residual                  0.6467   0.8042  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)            -0.14810    0.02310 1198.75685  -6.411 2.07e-10 ***
## avg_weekday_dur_mcq    -0.02035    0.02918 1227.64043  -0.697   0.4857    
## weekday_dur_mcq_diff   -0.05370    0.03108 1043.70592  -1.728   0.0844 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___
## avg_wkdy_d_ 0.022        
## wkdy_dr_mc_ 0.012  0.017
weekday_dur_MCQ_ATT_zyg<- lmer(ATT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+sibDZ_MZ+sib_DZ+weekday_dur_mcq_diff*sibDZ_MZ+weekday_dur_mcq_diff*sib_DZ+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_ATT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + sibDZ_MZ +  
##     sib_DZ + weekday_dur_mcq_diff * sibDZ_MZ + weekday_dur_mcq_diff *  
##     sib_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5933
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0631 -0.7057 -0.0777  0.6378  3.3106 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2796   0.5288  
##  Residual                  0.6476   0.8047  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                     -0.17025    0.02450 1133.13477  -6.949 6.21e-12
## avg_weekday_dur_mcq             -0.02918    0.02934 1224.68467  -0.995   0.3202
## weekday_dur_mcq_diff            -0.06287    0.03399  991.11500  -1.850   0.0646
## sibDZ_MZ                        -0.09404    0.05638 1111.83669  -1.668   0.0956
## sib_DZ                          -0.10244    0.05461 1163.66827  -1.876   0.0609
## weekday_dur_mcq_diff:sibDZ_MZ   -0.03739    0.07979  983.71441  -0.469   0.6394
## weekday_dur_mcq_diff:sib_DZ     -0.03395    0.07333 1002.47784  -0.463   0.6435
##                                  
## (Intercept)                   ***
## avg_weekday_dur_mcq              
## weekday_dur_mcq_diff          .  
## sibDZ_MZ                      .  
## sib_DZ                        .  
## weekday_dur_mcq_diff:sibDZ_MZ    
## weekday_dur_mcq_diff:sib_DZ      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ sDZ_MZ sib_DZ w___:D
## avg_wkdy_d_  0.061                                   
## wkdy_dr_mc_  0.006  0.004                            
## sibDZ_MZ     0.231  0.079  0.003                     
## sib_DZ       0.215  0.078 -0.007 -0.131              
## wk___:DZ_MZ  0.002 -0.014  0.287  0.005  0.003       
## wkdy___:_DZ -0.008 -0.020  0.237  0.003  0.003 -0.151
out<- weekday_dur_MCQ_ATT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_ATT_MZ<- lmer(ATT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+MZ_dummy_DZ+MZ_dummy_sib+weekday_dur_mcq_diff*MZ_dummy_DZ+weekday_dur_mcq_diff*MZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_ATT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## ATT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + MZ_dummy_DZ +  
##     MZ_dummy_sib + weekday_dur_mcq_diff * MZ_dummy_DZ + weekday_dur_mcq_diff *  
##     MZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5933
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0631 -0.7057 -0.0777  0.6378  3.3106 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2796   0.5288  
##  Residual                  0.6476   0.8047  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                         -0.23294    0.04938 1096.43698  -4.718
## avg_weekday_dur_mcq                 -0.02918    0.02934 1224.68467  -0.995
## weekday_dur_mcq_diff                -0.08780    0.07087  978.79606  -1.239
## MZ_dummy_DZ                          0.04282    0.06579 1094.02260   0.651
## MZ_dummy_sib                         0.14526    0.05934 1156.21452   2.448
## weekday_dur_mcq_diff:MZ_dummy_DZ     0.02042    0.09271  966.50778   0.220
## weekday_dur_mcq_diff:MZ_dummy_sib    0.05437    0.08263 1013.36896   0.658
##                                   Pr(>|t|)    
## (Intercept)                       2.69e-06 ***
## avg_weekday_dur_mcq                 0.3202    
## weekday_dur_mcq_diff                0.2157    
## MZ_dummy_DZ                         0.5153    
## MZ_dummy_sib                        0.0145 *  
## weekday_dur_mcq_diff:MZ_dummy_DZ    0.8257    
## weekday_dur_mcq_diff:MZ_dummy_sib   0.5107    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ MZ__DZ MZ_dm_ w___:MZ__D
## avg_wkdy_d_  0.090                                       
## wkdy_dr_mc_  0.006 -0.009                                
## MZ_dummy_DZ -0.748 -0.035 -0.005                         
## MZ_dummy_sb -0.835 -0.111 -0.005  0.623                  
## w___:MZ__DZ -0.005  0.004 -0.764  0.002  0.004           
## wkd___:MZ__ -0.004  0.023 -0.858  0.004  0.008  0.656
out<- weekday_dur_MCQ_ATT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_ATT_DZ<- lmer(ATT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+DZ_dummy_MZ+DZ_dummy_sib+weekday_dur_mcq_diff*DZ_dummy_MZ+weekday_dur_mcq_diff*DZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_ATT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## ATT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + DZ_dummy_MZ +  
##     DZ_dummy_sib + weekday_dur_mcq_diff * DZ_dummy_MZ + weekday_dur_mcq_diff *  
##     DZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5933
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0631 -0.7057 -0.0777  0.6378  3.3106 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2796   0.5288  
##  Residual                  0.6476   0.8047  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                         -0.19012    0.04370 1091.04774  -4.351
## avg_weekday_dur_mcq                 -0.02918    0.02934 1224.68467  -0.995
## weekday_dur_mcq_diff                -0.06738    0.05977  949.45881  -1.127
## DZ_dummy_MZ                         -0.04282    0.06579 1094.02260  -0.651
## DZ_dummy_sib                         0.10244    0.05461 1163.66827   1.876
## weekday_dur_mcq_diff:DZ_dummy_MZ    -0.02042    0.09271  966.50778  -0.220
## weekday_dur_mcq_diff:DZ_dummy_sib    0.03395    0.07333 1002.47784   0.463
##                                   Pr(>|t|)    
## (Intercept)                       1.48e-05 ***
## avg_weekday_dur_mcq                 0.3202    
## weekday_dur_mcq_diff                0.2599    
## DZ_dummy_MZ                         0.5153    
## DZ_dummy_sib                        0.0609 .  
## weekday_dur_mcq_diff:DZ_dummy_MZ    0.8257    
## weekday_dur_mcq_diff:DZ_dummy_sib   0.6435    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ DZ__MZ DZ_dm_ w___:DZ__M
## avg_wkdy_d_  0.049                                       
## wkdy_dr_mc_ -0.004 -0.004                                
## DZ_dummy_MZ -0.661  0.035  0.002                         
## DZ_dummy_sb -0.802 -0.078  0.003  0.527                  
## w___:DZ__MZ  0.002 -0.004 -0.645  0.002 -0.002           
## wkd___:DZ__  0.004  0.020 -0.815 -0.001  0.003  0.525
out<- weekday_dur_MCQ_ATT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_ATT_sib<- lmer(ATT_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+sib_dummy_MZ+sib_dummy_DZ+weekday_dur_mcq_diff*sib_dummy_MZ+weekday_dur_mcq_diff*sib_dummy_DZ+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_ATT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## ATT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + sib_dummy_MZ +  
##     sib_dummy_DZ + weekday_dur_mcq_diff * sib_dummy_MZ + weekday_dur_mcq_diff *  
##     sib_dummy_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5933
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0631 -0.7057 -0.0777  0.6378  3.3106 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2796   0.5288  
##  Residual                  0.6476   0.8047  
## Number of obs: 2171, groups:  rel_family_id, 1253
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                         -0.08768    0.03262 1305.58243  -2.688
## avg_weekday_dur_mcq                 -0.02918    0.02934 1224.68467  -0.995
## weekday_dur_mcq_diff                -0.03343    0.04246 1117.18999  -0.787
## sib_dummy_MZ                        -0.14526    0.05934 1156.21452  -2.448
## sib_dummy_DZ                        -0.10244    0.05461 1163.66827  -1.876
## weekday_dur_mcq_diff:sib_dummy_MZ   -0.05437    0.08263 1013.36896  -0.658
## weekday_dur_mcq_diff:sib_dummy_DZ   -0.03395    0.07333 1002.47784  -0.463
##                                   Pr(>|t|)   
## (Intercept)                        0.00728 **
## avg_weekday_dur_mcq                0.32015   
## weekday_dur_mcq_diff               0.43125   
## sib_dummy_MZ                       0.01451 * 
## sib_dummy_DZ                       0.06095 . 
## weekday_dur_mcq_diff:sib_dummy_MZ  0.51071   
## weekday_dur_mcq_diff:sib_dummy_DZ  0.64348   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ sb__MZ sb__DZ w___:__M
## avg_wkdy_d_ -0.065                                     
## wkdy_dr_mc_  0.019  0.029                              
## sib_dmmy_MZ -0.555  0.111 -0.008                       
## sib_dmmy_DZ -0.600  0.078 -0.010  0.336                
## wkd___:__MZ -0.009 -0.023 -0.514  0.008  0.005         
## wkd___:__DZ -0.011 -0.020 -0.579  0.004  0.003  0.298
out<- weekday_dur_MCQ_ATT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Attention Problems",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

chronotype

# chrono 
chrono_ATT_pheno<- lmer(ATT_resid~chronotype_wave_2+(1|rel_family_id), data=abcd_all)
summary(chrono_ATT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ chronotype_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5202.5
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.78274 -0.73984 -0.07492  0.67237  2.76426 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2644   0.5142  
##  Residual                  0.6599   0.8124  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)         -0.15338    0.02422 1142.09351  -6.333 3.46e-10 ***
## chronotype_wave_2   -0.01342    0.02184 1897.07203  -0.615    0.539    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## chrntyp_w_2 -0.094
out<- chrono_ATT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Attention Problems",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

chrono_ATT<- lmer(ATT_resid~avg_chrono+chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_ATT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_chrono + chrono_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5204.7
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.80098 -0.73192 -0.07079  0.66460  2.78559 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2647   0.5145  
##  Residual                  0.6591   0.8118  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)   -0.15125    0.02426 1137.65907  -6.234 6.39e-10 ***
## avg_chrono    -0.04167    0.02903 1198.50051  -1.435    0.151    
## chrono_diff    0.02337    0.03311  848.73200   0.706    0.480    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch
## avg_chrono  -0.110       
## chrono_diff -0.017  0.001
chrono_ATT_zyg<- lmer(ATT_resid~avg_chrono+chrono_diff+sibDZ_MZ+sib_DZ+sibDZ_MZ*chrono_diff+sib_DZ*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_ATT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_chrono + chrono_diff + sibDZ_MZ + sib_DZ + sibDZ_MZ *  
##     chrono_diff + sib_DZ * chrono_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5210.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.84048 -0.72781 -0.06079  0.64698  2.73666 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2616   0.5115  
##  Residual                  0.6596   0.8121  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)          -1.749e-01  2.570e-02  1.084e+03  -6.805 1.67e-11 ***
## avg_chrono           -3.984e-02  2.898e-02  1.196e+03  -1.375   0.1694    
## chrono_diff           1.469e-02  3.493e-02  7.876e+02   0.421   0.6742    
## sibDZ_MZ             -8.860e-02  5.862e-02  1.061e+03  -1.511   0.1310    
## sib_DZ               -1.163e-01  5.702e-02  1.102e+03  -2.040   0.0416 *  
## chrono_diff:sibDZ_MZ  9.752e-03  7.878e-02  7.658e+02   0.124   0.9015    
## chrono_diff:sib_DZ   -7.185e-02  7.978e-02  8.169e+02  -0.901   0.3681    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d sDZ_MZ sib_DZ c_:DZ_
## avg_chrono  -0.111                                   
## chrono_diff -0.010  0.000                            
## sibDZ_MZ     0.221 -0.005  0.000                     
## sib_DZ       0.218 -0.023  0.007 -0.142              
## chrn_:DZ_MZ  0.000  0.001  0.173 -0.008 -0.004       
## chrn_df:_DZ  0.006  0.000  0.236 -0.004 -0.012 -0.157
out<- chrono_ATT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Attention Problems",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

chrono_ATT_MZ<- lmer(ATT_resid~avg_chrono+chrono_diff+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*chrono_diff+MZ_dummy_sib*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_ATT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_chrono + chrono_diff + MZ_dummy_DZ + MZ_dummy_sib +  
##     MZ_dummy_DZ * chrono_diff + MZ_dummy_sib * chrono_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5210.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.84048 -0.72781 -0.06079  0.64698  2.73666 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2616   0.5115  
##  Residual                  0.6596   0.8121  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)                -0.23397    0.05131 1051.72616  -4.560 5.72e-06 ***
## avg_chrono                 -0.03984    0.02898 1195.52617  -1.375   0.1694    
## chrono_diff                 0.02119    0.06793  749.04297   0.312   0.7551    
## MZ_dummy_DZ                 0.03045    0.06872 1045.82832   0.443   0.6578    
## MZ_dummy_sib                0.14675    0.06144 1098.35624   2.389   0.0171 *  
## chrono_diff:MZ_dummy_DZ    -0.04568    0.09372  751.24295  -0.487   0.6261    
## chrono_diff:MZ_dummy_sib    0.02617    0.08253  809.15879   0.317   0.7512    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d MZ__DZ MZ_dm_ c_:MZ__D
## avg_chrono  -0.059                                     
## chrono_diff -0.007  0.001                              
## MZ_dummy_DZ -0.744 -0.005  0.005                       
## MZ_dummy_sb -0.833  0.016  0.006  0.621                
## chr_:MZ__DZ  0.005 -0.001 -0.725 -0.005 -0.004         
## chrn_d:MZ__  0.006  0.000 -0.823 -0.004 -0.014  0.597
out<- chrono_ATT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Attention Problems",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

chrono_ATT_DZ<- lmer(ATT_resid~avg_chrono+chrono_diff+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*chrono_diff+DZ_dummy_sib*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_ATT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_chrono + chrono_diff + DZ_dummy_MZ + DZ_dummy_sib +  
##     DZ_dummy_MZ * chrono_diff + DZ_dummy_sib * chrono_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5210.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.84048 -0.72781 -0.06079  0.64698  2.73666 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2616   0.5115  
##  Residual                  0.6596   0.8121  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)                -0.20352    0.04594 1044.59000  -4.430 1.04e-05 ***
## avg_chrono                 -0.03984    0.02898 1195.52617  -1.375   0.1694    
## chrono_diff                -0.02448    0.06457  753.68730  -0.379   0.7047    
## DZ_dummy_MZ                -0.03045    0.06872 1045.82832  -0.443   0.6578    
## DZ_dummy_sib                0.11630    0.05702 1101.91162   2.040   0.0416 *  
## chrono_diff:DZ_dummy_MZ     0.04568    0.09372  751.24295   0.487   0.6261    
## chrono_diff:DZ_dummy_sib    0.07185    0.07978  816.90793   0.901   0.3681    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d DZ__MZ DZ_dm_ c_:DZ__M
## avg_chrono  -0.074                                     
## chrono_diff -0.003  0.000                              
## DZ_dummy_MZ -0.665  0.005  0.002                       
## DZ_dummy_sb -0.803  0.023  0.002  0.536                
## chr_:DZ__MZ  0.002  0.001 -0.689 -0.005 -0.001         
## chrn_d:DZ__  0.002  0.000 -0.809 -0.001 -0.012  0.558
out<- chrono_ATT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Attention Problems",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

chrono_ATT_sib<- lmer(ATT_resid~avg_chrono+chrono_diff+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*chrono_diff+sib_dummy_DZ*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_ATT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_chrono + chrono_diff + sib_dummy_MZ + sib_dummy_DZ +  
##     sib_dummy_MZ * chrono_diff + sib_dummy_DZ * chrono_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 5210.6
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.84048 -0.72781 -0.06079  0.64698  2.73666 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2616   0.5115  
##  Residual                  0.6596   0.8121  
## Number of obs: 1904, groups:  rel_family_id, 1197
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)                -0.08722    0.03398 1216.62792  -2.567   0.0104 *
## avg_chrono                 -0.03984    0.02898 1195.52617  -1.375   0.1694  
## chrono_diff                 0.04736    0.04687  953.62436   1.011   0.3125  
## sib_dummy_MZ               -0.14675    0.06144 1098.35624  -2.389   0.0171 *
## sib_dummy_DZ               -0.11630    0.05702 1101.91162  -2.040   0.0416 *
## chrono_diff:sib_dummy_MZ   -0.02617    0.08253  809.15879  -0.317   0.7512  
## chrono_diff:sib_dummy_DZ   -0.07185    0.07978  816.90793  -0.901   0.3681  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d sb__MZ sb__DZ c_:__M
## avg_chrono  -0.061                                   
## chrono_diff -0.030  0.000                            
## sib_dmmy_MZ -0.550 -0.016  0.016                     
## sib_dmmy_DZ -0.592 -0.023  0.018  0.329              
## chrn_d:__MZ  0.017  0.000 -0.568 -0.014 -0.010       
## chrn_d:__DZ  0.018  0.000 -0.587 -0.010 -0.012  0.334
out<- chrono_ATT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Attention Problems",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekend efficiency

weekend_effic_ATT_pheno<- lmer(ATT_resid~avg_weekend_effic+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_ATT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_weekend_effic + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3458.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7899 -0.6949 -0.1194  0.6203  2.6652 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.3053   0.5526  
##  Residual                  0.6237   0.7898  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)       -1.425e-01  3.016e-02  7.926e+02  -4.723 2.74e-06 ***
## avg_weekend_effic  4.459e-04  3.157e-02  1.243e+03   0.014    0.989    
## covid             -6.019e-02  1.876e-01  8.998e+02  -0.321    0.748    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wknd_ff -0.079       
## covid       -0.154  0.035
out<- weekend_effic_ATT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Attention Problems",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekend_effic_ATT<- lmer(ATT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_ATT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3462
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7774 -0.6945 -0.1180  0.6238  2.6028 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.3051   0.5524  
##  Residual                  0.6242   0.7901  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                        Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)            -0.14115    0.03022 787.92162  -4.671 3.53e-06 ***
## fam_avg_weekend_effic  -0.01887    0.04102 865.97110  -0.460    0.646    
## weekend_effic_diff      0.02850    0.04946 469.22647   0.576    0.565    
## covid                  -0.06186    0.18766 898.88688  -0.330    0.742    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__
## fm_vg_wknd_ -0.099              
## wknd_ffc_df -0.004  0.000       
## covid       -0.154  0.035  0.013
weekend_effic_ATT_zyg<- lmer(ATT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekend_effic_diff+sib_DZ*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_ATT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekend_effic_diff + sib_DZ *  
##     weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3461.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7514 -0.6929 -0.1286  0.6295  2.6575 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2973   0.5453  
##  Residual                  0.6243   0.7901  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                              Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                  -0.16450    0.03108 745.77810  -5.293 1.58e-07 ***
## fam_avg_weekend_effic        -0.01898    0.04089 863.44631  -0.464   0.6427    
## weekend_effic_diff            0.03360    0.05416 456.33869   0.620   0.5353    
## covid                        -0.08252    0.18694 893.96524  -0.441   0.6590    
## sibDZ_MZ                     -0.13657    0.07026 713.65337  -1.944   0.0523 .  
## sib_DZ                       -0.16239    0.06852 776.87933  -2.370   0.0180 *  
## weekend_effic_diff:sibDZ_MZ   0.13383    0.12962 452.49055   1.032   0.3024    
## weekend_effic_diff:sib_DZ    -0.14768    0.11309 463.03941  -1.306   0.1923    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wknd_ -0.102                                          
## wknd_ffc_df -0.005  0.000                                   
## covid       -0.144  0.037  0.009                            
## sibDZ_MZ     0.222 -0.050 -0.002 -0.007                     
## sib_DZ       0.107  0.042 -0.002  0.049 -0.080              
## wkn__:DZ_MZ -0.001 -0.001  0.342 -0.005 -0.004  0.001       
## wknd_f_:_DZ -0.002 -0.001  0.181 -0.003  0.002 -0.003 -0.113
out<- weekend_effic_ATT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Attention Problems",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekend_effic_ATT_MZ<- lmer(ATT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekend_effic_diff+MZ_dummy_sib*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_ATT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekend_effic_diff +  
##     MZ_dummy_sib * weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3461.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7514 -0.6929 -0.1286  0.6295  2.6575 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2973   0.5453  
##  Residual                  0.6243   0.7901  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                  Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                      -0.25555    0.06169 697.56618  -4.142 3.86e-05
## fam_avg_weekend_effic            -0.01898    0.04089 863.44631  -0.464  0.64268
## weekend_effic_diff                0.12281    0.11664 450.02322   1.053  0.29292
## covid                            -0.08252    0.18694 893.96524  -0.441  0.65902
## MZ_dummy_DZ                       0.05537    0.08060 697.51646   0.687  0.49232
## MZ_dummy_sib                      0.21776    0.07565 758.31951   2.879  0.00411
## weekend_effic_diff:MZ_dummy_DZ   -0.20766    0.14717 450.62826  -1.411  0.15891
## weekend_effic_diff:MZ_dummy_sib  -0.05999    0.13543 458.36836  -0.443  0.65802
##                                    
## (Intercept)                     ***
## fam_avg_weekend_effic              
## weekend_effic_diff                 
## covid                              
## MZ_dummy_DZ                        
## MZ_dummy_sib                    ** 
## weekend_effic_diff:MZ_dummy_DZ     
## weekend_effic_diff:MZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wknd_ -0.090                                             
## wknd_ffc_df -0.005 -0.001                                      
## covid       -0.078  0.037  0.000                               
## MZ_dummy_DZ -0.762  0.062  0.004  0.027                        
## MZ_dummy_sb -0.806  0.027  0.004 -0.016  0.617                 
## wk__:MZ__DZ  0.004  0.001 -0.793  0.004 -0.005 -0.003          
## wknd__:MZ__  0.004  0.001 -0.861  0.006 -0.003 -0.003  0.683
out<- weekend_effic_ATT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Attention Problems",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekend_effic_ATT_DZ<- lmer(ATT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekend_effic_diff+DZ_dummy_sib*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_ATT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekend_effic_diff +  
##     DZ_dummy_sib * weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3461.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7514 -0.6929 -0.1286  0.6295  2.6575 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2973   0.5453  
##  Residual                  0.6243   0.7901  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                  Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                      -0.20017    0.05217 700.94229  -3.837 0.000136
## fam_avg_weekend_effic            -0.01898    0.04089 863.44631  -0.464 0.642678
## weekend_effic_diff               -0.08485    0.08975 451.65189  -0.945 0.344941
## covid                            -0.08252    0.18694 893.96524  -0.441 0.659018
## DZ_dummy_MZ                      -0.05537    0.08060 697.51646  -0.687 0.492324
## DZ_dummy_sib                      0.16239    0.06852 776.87932   2.370 0.018043
## weekend_effic_diff:DZ_dummy_MZ    0.20766    0.14717 450.62826   1.411 0.158914
## weekend_effic_diff:DZ_dummy_sib   0.14768    0.11309 463.03941   1.306 0.192265
##                                    
## (Intercept)                     ***
## fam_avg_weekend_effic              
## weekend_effic_diff                 
## covid                              
## DZ_dummy_MZ                        
## DZ_dummy_sib                    *  
## weekend_effic_diff:DZ_dummy_MZ     
## weekend_effic_diff:DZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wknd_ -0.010                                             
## wknd_ffc_df -0.006  0.000                                      
## covid       -0.051  0.037  0.006                               
## DZ_dummy_MZ -0.644 -0.062  0.003 -0.027                        
## DZ_dummy_sb -0.756 -0.042  0.004 -0.049  0.495                 
## wk__:DZ__MZ  0.004 -0.001 -0.610 -0.004 -0.005 -0.002          
## wknd__:DZ__  0.004  0.001 -0.794  0.003 -0.003 -0.003  0.484
out<- weekend_effic_ATT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Attention Problems",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekend_effic_ATT_sib<- lmer(ATT_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekend_effic_diff+sib_dummy_DZ*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_ATT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekend_effic_diff +  
##     sib_dummy_DZ * weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3461.1
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7514 -0.6929 -0.1286  0.6295  2.6575 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2973   0.5453  
##  Residual                  0.6243   0.7901  
## Number of obs: 1266, groups:  rel_family_id, 833
## 
## Fixed effects:
##                                  Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                      -0.03779    0.04482 892.48001  -0.843  0.39943
## fam_avg_weekend_effic            -0.01898    0.04089 863.44631  -0.464  0.64268
## weekend_effic_diff                0.06283    0.06882 483.40012   0.913  0.36175
## covid                            -0.08252    0.18694 893.96524  -0.441  0.65902
## sib_dummy_MZ                     -0.21776    0.07565 758.31951  -2.879  0.00411
## sib_dummy_DZ                     -0.16239    0.06852 776.87932  -2.370  0.01804
## weekend_effic_diff:sib_dummy_MZ   0.05999    0.13543 458.36836   0.443  0.65802
## weekend_effic_diff:sib_dummy_DZ  -0.14768    0.11309 463.03941  -1.306  0.19226
##                                   
## (Intercept)                       
## fam_avg_weekend_effic             
## weekend_effic_diff                
## covid                             
## sib_dummy_MZ                    **
## sib_dummy_DZ                    * 
## weekend_effic_diff:sib_dummy_MZ   
## weekend_effic_diff:sib_dummy_DZ   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wknd_ -0.077                                           
## wknd_ffc_df -0.001  0.001                                    
## covid       -0.134  0.037  0.013                             
## sib_dmmy_MZ -0.579 -0.027  0.000  0.016                      
## sib_dmmy_DZ -0.648  0.042  0.000  0.049  0.378               
## wknd__:__MZ  0.001 -0.001 -0.508 -0.006 -0.003  0.000        
## wknd__:__DZ  0.000 -0.001 -0.608 -0.003  0.000 -0.003  0.309
out<- weekend_effic_ATT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Attention Problems",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekday efficiency

weekday_effic_ATT_pheno<- lmer(ATT_resid~avg_weekday_effic+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_ATT_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ avg_weekday_effic + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3501.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7553 -0.6964 -0.1164  0.6269  2.6917 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.3007   0.5483  
##  Residual                  0.6304   0.7940  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)         -0.13500    0.02995  798.66768  -4.508 7.52e-06 ***
## avg_weekday_effic   -0.04101    0.02926 1272.36481  -1.402    0.161    
## covid               -0.07489    0.18764  907.91452  -0.399    0.690    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wkdy_ff -0.047       
## covid       -0.152  0.037
out<- weekday_effic_ATT_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Attention Problems",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekday_effic_ATT<- lmer(ATT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_ATT)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3504.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7434 -0.6965 -0.1240  0.6214  2.7066 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.3004   0.5481  
##  Residual                  0.6310   0.7943  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                        Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)            -0.13572    0.02997 798.03516  -4.529 6.84e-06 ***
## fam_avg_weekday_effic  -0.02563    0.03717 898.07277  -0.690    0.491    
## weekday_effic_diff     -0.06673    0.04824 488.99617  -1.383    0.167    
## covid                  -0.07361    0.18767 907.26968  -0.392    0.695    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__
## fm_vg_wkdy_ -0.059              
## wkdy_ffc_df -0.001 -0.013       
## covid       -0.153  0.035  0.014
weekday_effic_ATT_zyg<- lmer(ATT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekday_effic_diff+sib_DZ*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_ATT_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekday_effic_diff + sib_DZ *  
##     weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3499.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7385 -0.6923 -0.1229  0.6291  2.6351 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2972   0.5452  
##  Residual                  0.6244   0.7902  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                              Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                  -0.15851    0.03089 754.19101  -5.132 3.64e-07 ***
## fam_avg_weekday_effic        -0.01752    0.03715 895.37492  -0.471   0.6374    
## weekday_effic_diff           -0.05649    0.04993 474.45442  -1.131   0.2585    
## covid                        -0.09851    0.18692 905.20733  -0.527   0.5983    
## sibDZ_MZ                     -0.14166    0.07025 716.61259  -2.016   0.0441 *  
## sib_DZ                       -0.15409    0.06806 786.14029  -2.264   0.0239 *  
## weekday_effic_diff:sibDZ_MZ   0.16724    0.11622 463.87486   1.439   0.1508    
## weekday_effic_diff:sib_DZ    -0.25980    0.10911 490.76152  -2.381   0.0176 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wkdy_ -0.081                                          
## wkdy_ffc_df -0.002 -0.009                                   
## covid       -0.143  0.034  0.012                            
## sibDZ_MZ     0.228 -0.093  0.003 -0.008                     
## sib_DZ       0.111 -0.020 -0.008  0.047 -0.075              
## wkd__:DZ_MZ  0.003  0.004  0.263 -0.008  0.000  0.005       
## wkdy_f_:_DZ -0.011  0.017  0.070  0.011  0.004 -0.002 -0.045
out<- weekday_effic_ATT_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Attention Problems",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekday_effic_ATT_MZ<- lmer(ATT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekday_effic_diff+MZ_dummy_sib*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_ATT_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekday_effic_diff +  
##     MZ_dummy_sib * weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3499.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7385 -0.6923 -0.1229  0.6291  2.6351 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2972   0.5452  
##  Residual                  0.6244   0.7902  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                  Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                      -0.25295    0.06169 701.55752  -4.100 4.61e-05
## fam_avg_weekday_effic            -0.01752    0.03715 895.37492  -0.471  0.63742
## weekday_effic_diff                0.05500    0.10263 456.51711   0.536  0.59224
## covid                            -0.09851    0.18692 905.20733  -0.527  0.59831
## MZ_dummy_DZ                       0.06462    0.08032 699.76054   0.805  0.42137
## MZ_dummy_sib                      0.21870    0.07574 764.03143   2.887  0.00399
## weekday_effic_diff:MZ_dummy_DZ   -0.29714    0.13060 463.01743  -2.275  0.02335
## weekday_effic_diff:MZ_dummy_sib  -0.03734    0.12614 474.66579  -0.296  0.76733
##                                    
## (Intercept)                     ***
## fam_avg_weekday_effic              
## weekday_effic_diff                 
## covid                              
## MZ_dummy_DZ                        
## MZ_dummy_sib                    ** 
## weekday_effic_diff:MZ_dummy_DZ  *  
## weekday_effic_diff:MZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wkdy_ -0.111                                             
## wkdy_ffc_df  0.002 -0.001                                      
## covid       -0.078  0.034  0.000                               
## MZ_dummy_DZ -0.764  0.072 -0.001  0.027                        
## MZ_dummy_sb -0.809  0.095 -0.001 -0.013  0.621                 
## wk__:MZ__DZ -0.002  0.003 -0.786  0.012 -0.004  0.001          
## wkdy__:MZ__  0.000 -0.011 -0.814  0.002  0.000  0.003  0.639
out<- weekday_effic_ATT_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Attention Problems",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekday_effic_ATT_DZ<- lmer(ATT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekday_effic_diff+DZ_dummy_sib*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_ATT_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekday_effic_diff +  
##     DZ_dummy_sib * weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3499.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7385 -0.6923 -0.1229  0.6291  2.6351 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2972   0.5452  
##  Residual                  0.6244   0.7902  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                  Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                      -0.18834    0.05179 707.69881  -3.636 0.000297
## fam_avg_weekday_effic            -0.01752    0.03715 895.37492  -0.471 0.637416
## weekday_effic_diff               -0.24214    0.08078 473.75376  -2.998 0.002865
## covid                            -0.09851    0.18692 905.20733  -0.527 0.598310
## DZ_dummy_MZ                      -0.06462    0.08032 699.76054  -0.805 0.421371
## DZ_dummy_sib                      0.15409    0.06806 786.14029   2.264 0.023857
## weekday_effic_diff:DZ_dummy_MZ    0.29714    0.13060 463.01743   2.275 0.023355
## weekday_effic_diff:DZ_dummy_sib   0.25980    0.10911 490.76152   2.381 0.017639
##                                    
## (Intercept)                     ***
## fam_avg_weekday_effic              
## weekday_effic_diff              ** 
## covid                              
## DZ_dummy_MZ                        
## DZ_dummy_sib                    *  
## weekday_effic_diff:DZ_dummy_MZ  *  
## weekday_effic_diff:DZ_dummy_sib *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wkdy_ -0.020                                             
## wkdy_ffc_df -0.014  0.004                                      
## covid       -0.051  0.034  0.019                               
## DZ_dummy_MZ -0.640 -0.072  0.007 -0.027                        
## DZ_dummy_sb -0.757  0.020  0.009 -0.047  0.489                 
## wk__:DZ__MZ  0.009 -0.003 -0.619 -0.012 -0.004 -0.005          
## wkdy__:DZ__  0.010 -0.017 -0.740 -0.011 -0.005 -0.002  0.458
out<- weekday_effic_ATT_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Attention Problems",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekday_effic_ATT_sib<- lmer(ATT_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekday_effic_diff+sib_dummy_DZ*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_ATT_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: ATT_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekday_effic_diff +  
##     sib_dummy_DZ * weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3499.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7385 -0.6923 -0.1229  0.6291  2.6351 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2972   0.5452  
##  Residual                  0.6244   0.7902  
## Number of obs: 1280, groups:  rel_family_id, 839
## 
## Fixed effects:
##                                  Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                      -0.03425    0.04450 904.69956  -0.770  0.44168
## fam_avg_weekday_effic            -0.01752    0.03715 895.37492  -0.471  0.63742
## weekday_effic_diff                0.01766    0.07334 512.71295   0.241  0.80980
## covid                            -0.09851    0.18692 905.20733  -0.527  0.59831
## sib_dummy_MZ                     -0.21870    0.07574 764.03143  -2.887  0.00399
## sib_dummy_DZ                     -0.15409    0.06806 786.14029  -2.264  0.02386
## weekday_effic_diff:sib_dummy_MZ   0.03734    0.12614 474.66579   0.296  0.76733
## weekday_effic_diff:sib_dummy_DZ  -0.25980    0.10911 490.76152  -2.381  0.01764
##                                   
## (Intercept)                       
## fam_avg_weekday_effic             
## weekday_effic_diff                
## covid                             
## sib_dummy_MZ                    **
## sib_dummy_DZ                    * 
## weekday_effic_diff:sib_dummy_MZ   
## weekday_effic_diff:sib_dummy_DZ * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wkdy_  0.008                                           
## wkdy_ffc_df  0.010 -0.021                                    
## covid       -0.131  0.034  0.004                             
## sib_dmmy_MZ -0.580 -0.095 -0.004  0.013                      
## sib_dmmy_DZ -0.649 -0.020 -0.006  0.047  0.380               
## wkdy__:__MZ -0.006  0.011 -0.581 -0.002  0.003  0.004        
## wkdy__:__DZ -0.008  0.017 -0.672  0.011  0.003 -0.002  0.391
out<- weekday_effic_ATT_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Attention Problems",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

Psychosis

variability

# variability (fitbit)
variability_PSYCH_pheno<- lmer(PSYCH_resid~variability+covid+(1|rel_family_id), data=abcd_all)
summary(variability_PSYCH_pheno)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ variability + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3654.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8645 -0.5515 -0.3336  0.5467  3.7364 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2352   0.4850  
##  Residual                  0.6039   0.7771  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)   -0.05297    0.02707  868.00919  -1.956 0.050733 .  
## variability    0.08588    0.02578 1359.24430   3.331 0.000889 ***
## covid         -0.07608    0.17691  975.63392  -0.430 0.667267    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) vrblty
## variability  0.038       
## covid       -0.149 -0.068
out<- variability_PSYCH_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Psychosis",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

variability_PSYCH<- lmer(PSYCH_resid~avg_variabilitiy+variabiltiy_diff+covid+(1|rel_family_id), data=abcd_all)
summary(variability_PSYCH) ### don't need to save this one, just for model comparison
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_variabilitiy + variabiltiy_diff + covid + (1 |  
##     rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3657.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8555 -0.5504 -0.3340  0.5508  3.6912 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2349   0.4847  
##  Residual                  0.6040   0.7772  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                   Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)       -0.05242    0.02707 868.10866  -1.936 0.053157 .  
## avg_variabilitiy   0.10328    0.03030 967.71255   3.409 0.000679 ***
## variabiltiy_diff   0.04024    0.04909 533.81072   0.820 0.412660    
## covid             -0.08106    0.17694 975.35507  -0.458 0.646972    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_
## avg_varblty  0.042              
## varblty_dff  0.004  0.000       
## covid       -0.149 -0.071 -0.014
variability_PSYCH_zyg<- lmer(PSYCH_resid~avg_variabilitiy+variabiltiy_diff+covid+sibDZ_MZ+sib_DZ+variabiltiy_diff*sibDZ_MZ+variabiltiy_diff*sib_DZ+(1|rel_family_id), data=abcd_all)
summary(variability_PSYCH_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## PSYCH_resid ~ avg_variabilitiy + variabiltiy_diff + covid + sibDZ_MZ +  
##     sib_DZ + variabiltiy_diff * sibDZ_MZ + variabiltiy_diff *  
##     sib_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3664.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8564 -0.5520 -0.3208  0.5430  3.7334 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2309   0.4805  
##  Residual                  0.6067   0.7789  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                            Estimate Std. Error        df t value Pr(>|t|)    
## (Intercept)                -0.06746    0.02805 823.62056  -2.405 0.016375 *  
## avg_variabilitiy            0.10157    0.03030 964.84587   3.352 0.000833 ***
## variabiltiy_diff            0.04368    0.05258 529.78934   0.831 0.406496    
## covid                      -0.08737    0.17687 970.30342  -0.494 0.621460    
## sibDZ_MZ                   -0.10156    0.06412 787.86285  -1.584 0.113631    
## sib_DZ                     -0.07085    0.06151 853.92144  -1.152 0.249740    
## variabiltiy_diff:sibDZ_MZ   0.01990    0.12633 529.13059   0.158 0.874887    
## variabiltiy_diff:sib_DZ     0.10061    0.10907 530.79735   0.922 0.356722    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  sDZ_MZ sib_DZ v_:DZ_
## avg_varblty  0.051                                          
## varblty_dff  0.002 -0.001                                   
## covid       -0.141 -0.073 -0.010                            
## sibDZ_MZ     0.239  0.055 -0.002 -0.012                     
## sib_DZ       0.102 -0.030 -0.001  0.049 -0.074              
## vrbl_:DZ_MZ -0.003 -0.002  0.353  0.007 -0.001  0.001       
## vrblty_:_DZ -0.002 -0.003  0.005  0.007  0.000  0.003 -0.003
out<- variability_PSYCH_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Psychosis",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

variability_PSYCH_MZ<- lmer(PSYCH_resid~avg_variabilitiy+variabiltiy_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+variabiltiy_diff*MZ_dummy_DZ+variabiltiy_diff*MZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(variability_PSYCH_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## PSYCH_resid ~ avg_variabilitiy + variabiltiy_diff + covid + MZ_dummy_DZ +  
##     MZ_dummy_sib + variabiltiy_diff * MZ_dummy_DZ + variabiltiy_diff *  
##     MZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3664.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8564 -0.5520 -0.3208  0.5430  3.7334 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2309   0.4805  
##  Residual                  0.6067   0.7789  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                                Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                    -0.13517    0.05646 773.83349  -2.394 0.016899
## avg_variabilitiy                0.10157    0.03030 964.84587   3.352 0.000833
## variabiltiy_diff                0.05695    0.11395 528.70994   0.500 0.617454
## covid                          -0.08737    0.17687 970.30342  -0.494 0.621460
## MZ_dummy_DZ                     0.06614    0.07315 772.69406   0.904 0.366201
## MZ_dummy_sib                    0.13698    0.06903 831.37703   1.985 0.047522
## variabiltiy_diff:MZ_dummy_DZ    0.03040    0.13775 527.75052   0.221 0.825399
## variabiltiy_diff:MZ_dummy_sib  -0.07021    0.13745 531.04662  -0.511 0.609729
##                                  
## (Intercept)                   *  
## avg_variabilitiy              ***
## variabiltiy_diff                 
## covid                            
## MZ_dummy_DZ                      
## MZ_dummy_sib                  *  
## variabiltiy_diff:MZ_dummy_DZ     
## variabiltiy_diff:MZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  MZ__DZ MZ_dm_ v_:MZ__D
## avg_varblty  0.067                                            
## varblty_dff -0.002 -0.002                                     
## covid       -0.079 -0.073  0.000                              
## MZ_dummy_DZ -0.770 -0.061  0.001  0.031                       
## MZ_dummy_sb -0.811 -0.038  0.001 -0.011  0.627                
## vrb_:MZ__DZ  0.002  0.001 -0.827 -0.003 -0.001 -0.001         
## vrblt_:MZ__  0.002  0.003 -0.829 -0.009 -0.001  0.001  0.686
out<- variability_PSYCH_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Psychosis",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

variability_PSYCH_DZ<- lmer(PSYCH_resid~avg_variabilitiy+variabiltiy_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+variabiltiy_diff*DZ_dummy_MZ+variabiltiy_diff*DZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(variability_PSYCH_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## PSYCH_resid ~ avg_variabilitiy + variabiltiy_diff + covid + DZ_dummy_MZ +  
##     DZ_dummy_sib + variabiltiy_diff * DZ_dummy_MZ + variabiltiy_diff *  
##     DZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3664.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8564 -0.5520 -0.3208  0.5430  3.7334 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2309   0.4805  
##  Residual                  0.6067   0.7789  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                                Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                    -0.06903    0.04666 775.28319  -1.480 0.139393
## avg_variabilitiy                0.10157    0.03030 964.84587   3.352 0.000833
## variabiltiy_diff                0.08735    0.07739 525.67238   1.129 0.259533
## covid                          -0.08737    0.17687 970.30342  -0.494 0.621460
## DZ_dummy_MZ                    -0.06614    0.07315 772.69406  -0.904 0.366201
## DZ_dummy_sib                    0.07085    0.06151 853.92145   1.152 0.249740
## variabiltiy_diff:DZ_dummy_MZ   -0.03040    0.13775 527.75052  -0.221 0.825399
## variabiltiy_diff:DZ_dummy_sib  -0.10061    0.10907 530.79735  -0.922 0.356722
##                                  
## (Intercept)                      
## avg_variabilitiy              ***
## variabiltiy_diff                 
## covid                            
## DZ_dummy_MZ                      
## DZ_dummy_sib                     
## variabiltiy_diff:DZ_dummy_MZ     
## variabiltiy_diff:DZ_dummy_sib    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  DZ__MZ DZ_dm_ v_:DZ__M
## avg_varblty -0.015                                            
## varblty_dff  0.002 -0.001                                     
## covid       -0.047 -0.073 -0.005                              
## DZ_dummy_MZ -0.636  0.061 -0.001 -0.031                       
## DZ_dummy_sb -0.755  0.030 -0.001 -0.049  0.486                
## vrb_:DZ__MZ -0.001 -0.001 -0.562  0.003 -0.001  0.000         
## vrblt_:DZ__ -0.001  0.003 -0.709 -0.007  0.001  0.003  0.399
out<- variability_PSYCH_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Psychosis",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)


variability_PSYCH_sib<- lmer(PSYCH_resid~avg_variabilitiy+variabiltiy_diff+covid+sib_dummy_MZ+sib_dummy_DZ+variabiltiy_diff*sib_dummy_MZ+variabiltiy_diff*sib_dummy_DZ+(1|rel_family_id), data=abcd_all)
summary(variability_PSYCH_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## PSYCH_resid ~ avg_variabilitiy + variabiltiy_diff + covid + sib_dummy_MZ +  
##     sib_dummy_DZ + variabiltiy_diff * sib_dummy_MZ + variabiltiy_diff *  
##     sib_dummy_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3664.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8564 -0.5520 -0.3208  0.5430  3.7334 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2309   0.4805  
##  Residual                  0.6067   0.7789  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                     0.001815   0.040352 970.746108   0.045 0.964125
## avg_variabilitiy                0.101574   0.030302 964.845869   3.352 0.000833
## variabiltiy_diff               -0.013257   0.076861 536.230394  -0.172 0.863129
## covid                          -0.087365   0.176873 970.303423  -0.494 0.621460
## sib_dummy_MZ                   -0.136984   0.069025 831.377030  -1.985 0.047522
## sib_dummy_DZ                   -0.070846   0.061511 853.921445  -1.152 0.249740
## variabiltiy_diff:sib_dummy_MZ   0.070205   0.137451 531.046621   0.511 0.609729
## variabiltiy_diff:sib_dummy_DZ   0.100608   0.109068 530.797350   0.922 0.356722
##                                  
## (Intercept)                      
## avg_variabilitiy              ***
## variabiltiy_diff                 
## covid                            
## sib_dummy_MZ                  *  
## sib_dummy_DZ                     
## variabiltiy_diff:sib_dummy_MZ    
## variabiltiy_diff:sib_dummy_DZ    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_vr vrblt_ covid  sb__MZ sb__DZ v_:__M
## avg_varblty  0.029                                          
## varblty_dff  0.007  0.002                                   
## covid       -0.129 -0.073 -0.016                            
## sib_dmmy_MZ -0.575  0.038 -0.003  0.011                     
## sib_dmmy_DZ -0.652 -0.030 -0.004  0.049  0.377              
## vrblt_:__MZ -0.004 -0.003 -0.559  0.009  0.001  0.002       
## vrblt_:__DZ -0.004 -0.003 -0.705  0.007  0.002  0.003  0.394
out<- variability_PSYCH_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Variability",
         sleep="Variability",
         Psychiatric="Psychosis",
         model="Dummy Sib")
abcd_out<- rbind(abcd_out, out)

social jet lag

# jetlag 
jetlag_PSYCH_pheno<- lmer(PSYCH_resid~social_jet_lag_wave_2+(1|rel_family_id), data=abcd_all)
summary(jetlag_PSYCH_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ social_jet_lag_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7271.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9115 -0.5829 -0.3446  0.6048  3.5319 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2431   0.4930  
##  Residual                  0.6754   0.8218  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                         Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)             -0.02241    0.02064 1417.98165  -1.086    0.278    
## social_jet_lag_wave_2    0.07934    0.02000 2613.52771   3.967 7.46e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## scl_jt_l__2 0.034
out<- jetlag_PSYCH_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Psychosis",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

jetlag_PSYCH<- lmer(PSYCH_resid~avg_jetlag+jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_PSYCH)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_jetlag + jetlag_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7275
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9162 -0.5760 -0.3420  0.6069  3.5219 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2429   0.4929  
##  Residual                  0.6756   0.8219  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)   -0.02180    0.02065 1417.01269  -1.056 0.291211    
## avg_jetlag     0.09437    0.02582 1470.40976   3.655 0.000266 ***
## jetlag_diff    0.05754    0.03102 1407.75685   1.855 0.063867 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt
## avg_jetlag   0.047       
## jetlag_diff -0.003  0.016
jetlag_PSYCH_zyg<- lmer(PSYCH_resid~avg_jetlag+jetlag_diff+sibDZ_MZ+sib_DZ+sibDZ_MZ*jetlag_diff+sib_DZ*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_PSYCH_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_jetlag + jetlag_diff + sibDZ_MZ + sib_DZ +  
##     sibDZ_MZ * jetlag_diff + sib_DZ * jetlag_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7288.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9220 -0.5776 -0.3424  0.6022  3.5303 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2434   0.4934  
##  Residual                  0.6761   0.8223  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)          -2.410e-02  2.231e-02  1.395e+03  -1.080 0.280161    
## avg_jetlag            9.381e-02  2.584e-02  1.468e+03   3.630 0.000293 ***
## jetlag_diff           7.402e-02  4.040e-02  1.302e+03   1.832 0.067167 .  
## sibDZ_MZ              3.523e-03  5.166e-02  1.389e+03   0.068 0.945629    
## sib_DZ               -2.118e-02  4.901e-02  1.400e+03  -0.432 0.665614    
## jetlag_diff:sibDZ_MZ -1.183e-02  9.928e-02  1.289e+03  -0.119 0.905164    
## jetlag_diff:sib_DZ    7.599e-02  8.027e-02  1.329e+03   0.947 0.344008    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d sDZ_MZ sib_DZ j_:DZ_
## avg_jetlag   0.050                                   
## jetlag_diff -0.001  0.006                            
## sibDZ_MZ     0.251 -0.002  0.002                     
## sib_DZ       0.239  0.025  0.000 -0.154              
## jtlg_:DZ_MZ  0.001 -0.001  0.418  0.000  0.000       
## jtlg_df:_DZ -0.001 -0.011  0.376  0.000 -0.004 -0.230
out<- jetlag_PSYCH_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Psychosis",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

jetlag_PSYCH_MZ<- lmer(PSYCH_resid~avg_jetlag+jetlag_diff+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*jetlag_diff+MZ_dummy_sib*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_PSYCH_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_jetlag + jetlag_diff + MZ_dummy_DZ + MZ_dummy_sib +  
##     MZ_dummy_DZ * jetlag_diff + MZ_dummy_sib * jetlag_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7288.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9220 -0.5776 -0.3424  0.6022  3.5303 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2434   0.4934  
##  Residual                  0.6761   0.8223  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -2.176e-02  4.549e-02  1.386e+03  -0.478 0.632569    
## avg_jetlag                9.381e-02  2.584e-02  1.468e+03   3.630 0.000293 ***
## jetlag_diff               6.613e-02  9.081e-02  1.281e+03   0.728 0.466610    
## MZ_dummy_DZ              -1.412e-02  6.049e-02  1.382e+03  -0.233 0.815530    
## MZ_dummy_sib              7.069e-03  5.365e-02  1.401e+03   0.132 0.895192    
## jetlag_diff:MZ_dummy_DZ   4.983e-02  1.153e-01  1.287e+03   0.432 0.665779    
## jetlag_diff:MZ_dummy_sib -2.616e-02  9.817e-02  1.306e+03  -0.267 0.789894    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d MZ__DZ MZ_dm_ j_:MZ__D
## avg_jetlag   0.023                                     
## jetlag_diff  0.001  0.002                              
## MZ_dummy_DZ -0.751  0.012 -0.001                       
## MZ_dummy_sb -0.848 -0.010 -0.001  0.637                
## jtl_:MZ__DZ -0.001 -0.003 -0.787 -0.001  0.001         
## jtlg_d:MZ__ -0.001  0.005 -0.925  0.001  0.000  0.728
out<- jetlag_PSYCH_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Psychosis",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

jetlag_PSYCH_DZ<- lmer(PSYCH_resid~avg_jetlag+jetlag_diff+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*jetlag_diff+DZ_dummy_sib*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_PSYCH_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_jetlag + jetlag_diff + DZ_dummy_MZ + DZ_dummy_sib +  
##     DZ_dummy_MZ * jetlag_diff + DZ_dummy_sib * jetlag_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7288.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9220 -0.5776 -0.3424  0.6022  3.5303 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2434   0.4934  
##  Residual                  0.6761   0.8223  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)                -0.03587    0.03992 1379.46792  -0.899 0.369068    
## avg_jetlag                  0.09381    0.02585 1468.20805   3.630 0.000293 ***
## jetlag_diff                 0.11596    0.07108 1295.50020   1.631 0.103069    
## DZ_dummy_MZ                 0.01412    0.06049 1382.44504   0.233 0.815530    
## DZ_dummy_sib                0.02118    0.04901 1399.69434   0.432 0.665614    
## jetlag_diff:DZ_dummy_MZ    -0.04982    0.11532 1286.62147  -0.432 0.665779    
## jetlag_diff:DZ_dummy_sib   -0.07599    0.08027 1329.38267  -0.947 0.344008    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d DZ__MZ DZ_dm_ j_:DZ__M
## avg_jetlag   0.044                                     
## jetlag_diff -0.003 -0.002                              
## DZ_dummy_MZ -0.659 -0.012  0.002                       
## DZ_dummy_sb -0.814 -0.025  0.002  0.537                
## jtl_:DZ__MZ  0.002  0.003 -0.616 -0.001 -0.001         
## jtlg_d:DZ__  0.003  0.011 -0.886 -0.002 -0.004  0.546
out<- jetlag_PSYCH_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Psychosis",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

jetlag_PSYCH_sib<- lmer(PSYCH_resid~avg_jetlag+jetlag_diff+DZ_dummy_MZ+sib_dummy_DZ+DZ_dummy_MZ*jetlag_diff+sib_dummy_DZ*jetlag_diff+(1|rel_family_id), data=abcd_all)
summary(jetlag_PSYCH_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_jetlag + jetlag_diff + DZ_dummy_MZ + sib_dummy_DZ +  
##     DZ_dummy_MZ * jetlag_diff + sib_dummy_DZ * jetlag_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7288.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9220 -0.5776 -0.3424  0.6022  3.5303 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2434   0.4934  
##  Residual                  0.6761   0.8223  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -1.469e-02  2.846e-02  1.443e+03  -0.516 0.605904    
## avg_jetlag                9.381e-02  2.584e-02  1.468e+03   3.630 0.000293 ***
## jetlag_diff               3.997e-02  3.730e-02  1.460e+03   1.072 0.284056    
## DZ_dummy_MZ              -7.069e-03  5.365e-02  1.401e+03  -0.132 0.895192    
## sib_dummy_DZ             -2.118e-02  4.901e-02  1.400e+03  -0.432 0.665614    
## jetlag_diff:DZ_dummy_MZ   2.616e-02  9.817e-02  1.306e+03   0.267 0.789894    
## jetlag_diff:sib_dummy_DZ  7.599e-02  8.027e-02  1.329e+03   0.947 0.344008    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_jt jtlg_d DZ__MZ sb__DZ j_:DZ_
## avg_jetlag   0.019                                   
## jetlag_diff -0.004  0.019                            
## DZ_dummy_MZ -0.530  0.010  0.003                     
## sib_dmmy_DZ -0.580  0.025  0.003  0.308              
## jtl_:DZ__MZ  0.002 -0.005 -0.380  0.000 -0.001       
## jtlg_d:__DZ  0.002 -0.011 -0.465 -0.001 -0.004  0.177
out<- jetlag_PSYCH_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Social Jet Lag",
         sleep="Variability",
         Psychiatric="Psychosis",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekend duration (fitbit)

# weekend duration (fitbit)
weekend_dur_PSYCH_pheno<- lmer(PSYCH_resid~avg_weekend_dur+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_PSYCH_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_weekend_dur + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3610
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8263 -0.5511 -0.3489  0.5582  3.6442 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2255   0.4748  
##  Residual                  0.6071   0.7792  
## Number of obs: 1370, groups:  rel_family_id, 893
## 
## Fixed effects:
##                   Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)       -0.05522    0.02705  864.65361  -2.041  0.04151 * 
## avg_weekend_dur   -0.08058    0.02604 1333.29328  -3.094  0.00201 **
## covid             -0.05109    0.17561  959.27130  -0.291  0.77115   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wknd_dr -0.055       
## covid       -0.149  0.033
out<- weekend_dur_PSYCH_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekend_dur_PSYCH<- lmer(PSYCH_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_PSYCH)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3613.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8655 -0.5514 -0.3507  0.5638  3.6514 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2251   0.4744  
##  Residual                  0.6077   0.7796  
## Number of obs: 1370, groups:  rel_family_id, 893
## 
## Fixed effects:
##                      Estimate Std. Error        df t value Pr(>|t|)   
## (Intercept)          -0.05455    0.02707 864.61388  -2.015  0.04416 * 
## fam_avg_weekend_dur  -0.09123    0.03034 946.88733  -3.007  0.00271 **
## weekend_dur_diff     -0.05097    0.05056 535.80246  -1.008  0.31382   
## covid                -0.05539    0.17572 958.02749  -0.315  0.75266   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__
## fm_vg_wknd_ -0.066              
## wknd_dr_dff  0.002  0.003       
## covid       -0.150  0.047 -0.013
weekend_dur_PSYCH_zyg<- lmer(PSYCH_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekend_dur_diff+sib_DZ*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_PSYCH_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekend_dur_diff + sib_DZ *  
##     weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3622.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8255 -0.5570 -0.3370  0.5579  3.7486 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2228   0.4721  
##  Residual                  0.6100   0.7810  
## Number of obs: 1370, groups:  rel_family_id, 893
## 
## Fixed effects:
##                            Estimate Std. Error        df t value Pr(>|t|)   
## (Intercept)                -0.06718    0.02810 822.43353  -2.391  0.01704 * 
## fam_avg_weekend_dur        -0.08623    0.03048 945.80357  -2.829  0.00476 **
## weekend_dur_diff           -0.03383    0.05896 528.96403  -0.574  0.56638   
## covid                      -0.05926    0.17582 954.03821  -0.337  0.73616   
## sibDZ_MZ                   -0.08954    0.06411 784.37848  -1.397  0.16293   
## sib_DZ                     -0.04938    0.06160 847.53332  -0.802  0.42300   
## weekend_dur_diff:sibDZ_MZ   0.09341    0.14873 528.50470   0.628  0.53023   
## weekend_dur_diff:sib_DZ    -0.02366    0.11053 529.92008  -0.214  0.83055   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wknd_ -0.090                                          
## wknd_dr_dff  0.000  0.003                                   
## covid       -0.141  0.045 -0.008                            
## sibDZ_MZ     0.239 -0.084 -0.002 -0.011                     
## sib_DZ       0.109 -0.046 -0.003  0.045 -0.070              
## wkn__:DZ_MZ -0.002  0.001  0.492  0.005 -0.002  0.002       
## wknd_d_:_DZ -0.004  0.002  0.108  0.004  0.002  0.000 -0.064
out<- weekend_dur_PSYCH_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)


weekend_dur_PSYCH_MZ<- lmer(PSYCH_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekend_dur_diff+MZ_dummy_sib*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_PSYCH_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekend_dur_diff +  
##     MZ_dummy_sib * weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3622.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8255 -0.5570 -0.3370  0.5579  3.7486 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2228   0.4721  
##  Residual                  0.6100   0.7810  
## Number of obs: 1370, groups:  rel_family_id, 893
## 
## Fixed effects:
##                                Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                    -0.12687    0.05649 773.23349  -2.246  0.02500
## fam_avg_weekend_dur            -0.08623    0.03048 945.80357  -2.829  0.00476
## weekend_dur_diff                0.02845    0.13808 528.24800   0.206  0.83685
## covid                          -0.05926    0.17582 954.03821  -0.337  0.73616
## MZ_dummy_DZ                     0.06485    0.07304 767.50075   0.888  0.37487
## MZ_dummy_sib                    0.11423    0.06916 828.62587   1.652  0.09899
## weekend_dur_diff:MZ_dummy_DZ   -0.10524    0.16194 526.49274  -0.650  0.51606
## weekend_dur_diff:MZ_dummy_sib  -0.08158    0.15531 531.06228  -0.525  0.59962
##                                 
## (Intercept)                   * 
## fam_avg_weekend_dur           **
## weekend_dur_diff                
## covid                           
## MZ_dummy_DZ                     
## MZ_dummy_sib                  . 
## weekend_dur_diff:MZ_dummy_DZ    
## weekend_dur_diff:MZ_dummy_sib   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wknd_ -0.108                                             
## wknd_dr_dff -0.003  0.002                                      
## covid       -0.079  0.045  0.000                               
## MZ_dummy_DZ -0.768  0.054  0.002  0.029                        
## MZ_dummy_sb -0.812  0.099  0.002 -0.010  0.626                 
## wk__:MZ__DZ  0.002  0.000 -0.853 -0.003 -0.003 -0.002          
## wknd__:MZ__  0.003 -0.001 -0.889 -0.007 -0.002  0.000  0.758
out<- weekend_dur_PSYCH_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_PSYCH_DZ<- lmer(PSYCH_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekend_dur_diff+DZ_dummy_sib*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_PSYCH_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekend_dur_diff +  
##     DZ_dummy_sib * weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3622.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8255 -0.5570 -0.3370  0.5579  3.7486 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2228   0.4721  
##  Residual                  0.6100   0.7810  
## Number of obs: 1370, groups:  rel_family_id, 893
## 
## Fixed effects:
##                                Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                    -0.06202    0.04678 772.32552  -1.326  0.18531
## fam_avg_weekend_dur            -0.08623    0.03048 945.80357  -2.829  0.00476
## weekend_dur_diff               -0.07680    0.08462 521.84120  -0.908  0.36456
## covid                          -0.05926    0.17582 954.03821  -0.337  0.73616
## DZ_dummy_MZ                    -0.06485    0.07304 767.50075  -0.888  0.37487
## DZ_dummy_sib                    0.04938    0.06160 847.53332   0.802  0.42300
## weekend_dur_diff:DZ_dummy_MZ    0.10524    0.16194 526.49274   0.650  0.51606
## weekend_dur_diff:DZ_dummy_sib   0.02366    0.11053 529.92008   0.214  0.83055
##                                 
## (Intercept)                     
## fam_avg_weekend_dur           **
## weekend_dur_diff                
## covid                           
## DZ_dummy_MZ                     
## DZ_dummy_sib                    
## weekend_dur_diff:DZ_dummy_MZ    
## weekend_dur_diff:DZ_dummy_sib   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wknd_ -0.046                                             
## wknd_dr_dff -0.004  0.003                                      
## covid       -0.051  0.045 -0.006                               
## DZ_dummy_MZ -0.634 -0.054  0.003 -0.029                        
## DZ_dummy_sb -0.756  0.046  0.004 -0.045  0.483                 
## wk__:DZ__MZ  0.002  0.000 -0.523  0.003 -0.003 -0.002          
## wknd__:DZ__  0.004 -0.002 -0.766 -0.004 -0.002  0.000  0.400
out<- weekend_dur_PSYCH_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_PSYCH_sib<- lmer(PSYCH_resid~fam_avg_weekend_dur+weekend_dur_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekend_dur_diff+sib_dummy_DZ*weekend_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_PSYCH_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekend_dur_diff +  
##     sib_dummy_DZ * weekend_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3622.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8255 -0.5570 -0.3370  0.5579  3.7486 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2228   0.4721  
##  Residual                  0.6100   0.7810  
## Number of obs: 1370, groups:  rel_family_id, 893
## 
## Fixed effects:
##                                Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                    -0.01264    0.04033 960.64817  -0.313  0.75400
## fam_avg_weekend_dur            -0.08623    0.03048 945.80357  -2.829  0.00476
## weekend_dur_diff               -0.05313    0.07111 541.82915  -0.747  0.45528
## covid                          -0.05926    0.17582 954.03821  -0.337  0.73616
## sib_dummy_MZ                   -0.11423    0.06916 828.62587  -1.652  0.09899
## sib_dummy_DZ                   -0.04938    0.06160 847.53332  -0.802  0.42300
## weekend_dur_diff:sib_dummy_MZ   0.08158    0.15531 531.06228   0.525  0.59962
## weekend_dur_diff:sib_dummy_DZ  -0.02366    0.11053 529.92008  -0.214  0.83055
##                                 
## (Intercept)                     
## fam_avg_weekend_dur           **
## weekend_dur_diff                
## covid                           
## sib_dummy_MZ                  . 
## sib_dummy_DZ                    
## weekend_dur_diff:sib_dummy_MZ   
## weekend_dur_diff:sib_dummy_DZ   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wknd_  0.017                                           
## wknd_dr_dff  0.007  0.000                                    
## covid       -0.127  0.045 -0.014                             
## sib_dmmy_MZ -0.577 -0.099 -0.003  0.010                      
## sib_dmmy_DZ -0.651 -0.046 -0.004  0.045  0.381               
## wknd__:__MZ -0.003  0.001 -0.458  0.007  0.000  0.002        
## wknd__:__DZ -0.004  0.002 -0.643  0.004  0.002  0.000  0.295
out<- weekend_dur_PSYCH_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekday duration (fitbit)

# weekday duration (fitbit)
weekday_dur_PSYCH_pheno<- lmer(PSYCH_resid~avg_weekday_dur+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_PSYCH_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_weekday_dur + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3658
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7866 -0.5460 -0.3418  0.5483  3.6078 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2406   0.4905  
##  Residual                  0.6015   0.7756  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                   Estimate Std. Error         df t value Pr(>|t|)   
## (Intercept)       -0.05395    0.02715  868.25263  -1.987  0.04722 * 
## avg_weekday_dur   -0.07276    0.02615 1306.69212  -2.783  0.00547 **
## covid             -0.04217    0.17702  973.85159  -0.238  0.81175   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wkdy_dr -0.031       
## covid       -0.147  0.012
out<- weekday_dur_PSYCH_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekday_dur_PSYCH<- lmer(PSYCH_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_PSYCH)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3661.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7964 -0.5482 -0.3419  0.5455  3.6078 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2404   0.4903  
##  Residual                  0.6021   0.7760  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                      Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)          -0.05408    0.02716 868.27113  -1.991   0.0468 *
## fam_avg_weekday_dur  -0.06741    0.02979 937.40975  -2.263   0.0239 *
## weekday_dur_diff     -0.09060    0.05422 539.20267  -1.671   0.0953 .
## covid                -0.04215    0.17705 973.29856  -0.238   0.8119  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__
## fm_vg_wkdy_ -0.033              
## wkdy_dr_dff -0.004  0.005       
## covid       -0.147  0.011  0.006
weekday_dur_PSYCH_zyg<- lmer(PSYCH_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekday_dur_diff+sib_DZ*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_PSYCH_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekday_dur_diff + sib_DZ *  
##     weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3668.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8451 -0.5577 -0.3300  0.5414  3.6637 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2369   0.4867  
##  Residual                  0.6045   0.7775  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                             Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)                -0.068828   0.028162 825.824802  -2.444   0.0147 *
## fam_avg_weekday_dur        -0.062703   0.029849 935.688365  -2.101   0.0359 *
## weekday_dur_diff           -0.071145   0.057189 534.797832  -1.244   0.2140  
## covid                      -0.049101   0.176992 968.572268  -0.277   0.7815  
## sibDZ_MZ                   -0.102815   0.064482 788.854960  -1.594   0.1112  
## sib_DZ                     -0.060816   0.061737 852.884884  -0.985   0.3249  
## weekday_dur_diff:sibDZ_MZ   0.145182   0.135358 532.337682   1.073   0.2839  
## weekday_dur_diff:sib_DZ     0.005553   0.121730 538.919287   0.046   0.9636  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wkdy_ -0.055                                          
## wkdy_dr_dff -0.007  0.004                                   
## covid       -0.137  0.010  0.004                            
## sibDZ_MZ     0.241 -0.079 -0.006 -0.008                     
## sib_DZ       0.106 -0.028 -0.001  0.046 -0.071              
## wkd__:DZ_MZ -0.005 -0.002  0.310 -0.002 -0.008  0.001       
## wkdy_d_:_DZ -0.002 -0.003 -0.031  0.007  0.001 -0.001  0.019
out<- weekday_dur_PSYCH_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)


weekday_dur_PSYCH_MZ<- lmer(PSYCH_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekday_dur_diff+MZ_dummy_sib*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_PSYCH_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekday_dur_diff +  
##     MZ_dummy_sib * weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3668.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8451 -0.5577 -0.3300  0.5414  3.6637 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2369   0.4867  
##  Residual                  0.6045   0.7775  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                                Estimate Std. Error        df t value Pr(>|t|)  
## (Intercept)                    -0.13737    0.05678 777.14067  -2.419   0.0158 *
## fam_avg_weekday_dur            -0.06270    0.02985 935.68837  -2.101   0.0359 *
## weekday_dur_diff                0.02564    0.12090 530.69103   0.212   0.8321  
## covid                          -0.04910    0.17699 968.57227  -0.277   0.7815  
## MZ_dummy_DZ                     0.07241    0.07343 772.63231   0.986   0.3244  
## MZ_dummy_sib                    0.13322    0.06949 832.56037   1.917   0.0556 .
## weekday_dur_diff:MZ_dummy_DZ   -0.14241    0.14733 528.74272  -0.967   0.3342  
## weekday_dur_diff:MZ_dummy_sib  -0.14796    0.14949 538.04551  -0.990   0.3227  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wkdy_ -0.087                                             
## wkdy_dr_dff -0.010  0.000                                      
## covid       -0.074  0.010  0.001                               
## MZ_dummy_DZ -0.770  0.057  0.008  0.027                        
## MZ_dummy_sb -0.813  0.085  0.008 -0.013  0.628                 
## wk__:MZ__DZ  0.008  0.001 -0.821  0.004 -0.008 -0.007          
## wkdy__:MZ__  0.008  0.003 -0.809 -0.001 -0.006 -0.007  0.664
out<- weekday_dur_PSYCH_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_PSYCH_DZ<- lmer(PSYCH_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekday_dur_diff+DZ_dummy_sib*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_PSYCH_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekday_dur_diff +  
##     DZ_dummy_sib * weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3668.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8451 -0.5577 -0.3300  0.5414  3.6637 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2369   0.4867  
##  Residual                  0.6045   0.7775  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                    -0.064964   0.046844 776.267955  -1.387   0.1659
## fam_avg_weekday_dur            -0.062703   0.029849 935.688365  -2.101   0.0359
## weekday_dur_diff               -0.116763   0.084190 524.752108  -1.387   0.1661
## covid                          -0.049101   0.176992 968.572268  -0.277   0.7815
## DZ_dummy_MZ                    -0.072407   0.073431 772.632315  -0.986   0.3244
## DZ_dummy_sib                    0.060816   0.061737 852.884884   0.985   0.3249
## weekday_dur_diff:DZ_dummy_MZ    0.142406   0.147326 528.742719   0.967   0.3342
## weekday_dur_diff:DZ_dummy_sib  -0.005553   0.121730 538.919287  -0.046   0.9636
##                                
## (Intercept)                    
## fam_avg_weekday_dur           *
## weekday_dur_diff               
## covid                          
## DZ_dummy_MZ                    
## DZ_dummy_sib                   
## weekday_dur_diff:DZ_dummy_MZ   
## weekday_dur_diff:DZ_dummy_sib  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wkdy_ -0.016                                             
## wkdy_dr_dff -0.004  0.002                                      
## covid       -0.048  0.010  0.009                               
## DZ_dummy_MZ -0.634 -0.057  0.002 -0.027                        
## DZ_dummy_sb -0.755  0.028  0.002 -0.046  0.482                 
## wk__:DZ__MZ  0.002 -0.001 -0.571 -0.004 -0.008 -0.001          
## wkdy__:DZ__  0.003  0.003 -0.692 -0.007 -0.001 -0.001  0.395
out<- weekday_dur_PSYCH_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_PSYCH_sib<- lmer(PSYCH_resid~fam_avg_weekday_dur+weekday_dur_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekday_dur_diff+sib_dummy_DZ*weekday_dur_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_PSYCH_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekday_dur_diff +  
##     sib_dummy_DZ * weekday_dur_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3668.6
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8451 -0.5577 -0.3300  0.5414  3.6637 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2369   0.4867  
##  Residual                  0.6045   0.7775  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                    -0.004149   0.040483 966.222147  -0.102   0.9184
## fam_avg_weekday_dur            -0.062703   0.029849 935.688365  -2.101   0.0359
## weekday_dur_diff               -0.122316   0.087922 552.276620  -1.391   0.1647
## covid                          -0.049101   0.176992 968.572269  -0.277   0.7815
## sib_dummy_MZ                   -0.133222   0.069495 832.560374  -1.917   0.0556
## sib_dummy_DZ                   -0.060816   0.061737 852.884884  -0.985   0.3249
## weekday_dur_diff:sib_dummy_MZ   0.147959   0.149491 538.045514   0.990   0.3227
## weekday_dur_diff:sib_dummy_DZ   0.005553   0.121730 538.919287   0.046   0.9636
##                                
## (Intercept)                    
## fam_avg_weekday_dur           *
## weekday_dur_diff               
## covid                          
## sib_dummy_MZ                  .
## sib_dummy_DZ                   
## weekday_dur_diff:sib_dummy_MZ  
## weekday_dur_diff:sib_dummy_DZ  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wkdy_  0.024                                           
## wkdy_dr_dff  0.000  0.006                                    
## covid       -0.127  0.010 -0.001                             
## sib_dmmy_MZ -0.577 -0.085 -0.001  0.013                      
## sib_dmmy_DZ -0.651 -0.028  0.000  0.046  0.379               
## wkdy__:__MZ  0.000 -0.003 -0.588  0.001 -0.007  0.000        
## wkdy__:__DZ -0.001 -0.003 -0.722  0.007  0.000 -0.001  0.425
out<- weekday_dur_PSYCH_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekend duration (MCQ)

# weekend duration (MCQ)
weekend_dur_MCQ_PSYCH_pheno<- lmer(PSYCH_resid~weekend_dur_mcq_wave_2+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_PSYCH_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ weekend_dur_mcq_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7272.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8331 -0.5792 -0.3522  0.6042  3.5570 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2446   0.4945  
##  Residual                  0.6746   0.8214  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -0.02199    0.02066 1418.61738  -1.064 0.287452    
## weekend_dur_mcq_wave_2   -0.07422    0.01941 2652.27074  -3.824 0.000134 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## wknd_dr___2 -0.041
out<- weekend_dur_MCQ_PSYCH_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_PSYCH<- lmer(PSYCH_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_PSYCH)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + (1 |  
##     rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7275.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8352 -0.5803 -0.3482  0.6059  3.5415 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2442   0.4942  
##  Residual                  0.6748   0.8215  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)            -0.02100    0.02068 1415.86750  -1.016 0.309964    
## avg_weekend_dur_mcq    -0.09608    0.02773 1483.53364  -3.465 0.000546 ***
## weekend_dur_mcq_diff   -0.05314    0.02724 1314.74320  -1.951 0.051268 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___
## avg_wknd_d_ -0.059       
## wknd_dr_mc_  0.001 -0.003
weekend_dur_MCQ_PSYCH_zyg<- lmer(PSYCH_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+sibDZ_MZ+sib_DZ+weekend_dur_mcq_diff*sibDZ_MZ+weekend_dur_mcq_diff*sib_DZ+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_PSYCH_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + sibDZ_MZ +  
##     sib_DZ + weekend_dur_mcq_diff * sibDZ_MZ + weekend_dur_mcq_diff *  
##     sib_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7289.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8499 -0.5814 -0.3450  0.6071  3.5649 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2449   0.4949  
##  Residual                  0.6751   0.8216  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                   -2.508e-02  2.232e-02  1.394e+03  -1.124 0.261250
## avg_weekend_dur_mcq           -9.662e-02  2.778e-02  1.481e+03  -3.478 0.000519
## weekend_dur_mcq_diff          -5.987e-02  3.105e-02  1.283e+03  -1.928 0.054055
## sibDZ_MZ                       2.045e-03  5.170e-02  1.389e+03   0.040 0.968450
## sib_DZ                        -3.306e-02  4.907e-02  1.400e+03  -0.674 0.500550
## weekend_dur_mcq_diff:sibDZ_MZ  4.213e-02  7.214e-02  1.276e+03   0.584 0.559267
## weekend_dur_mcq_diff:sib_DZ   -6.870e-02  6.805e-02  1.294e+03  -1.010 0.312877
##                                  
## (Intercept)                      
## avg_weekend_dur_mcq           ***
## weekend_dur_mcq_diff          .  
## sibDZ_MZ                         
## sib_DZ                           
## weekend_dur_mcq_diff:sibDZ_MZ    
## weekend_dur_mcq_diff:sib_DZ      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ sDZ_MZ sib_DZ w___:D
## avg_wknd_d_ -0.040                                   
## wknd_dr_mc_  0.001 -0.004                            
## sibDZ_MZ     0.251  0.011 -0.005                     
## sib_DZ       0.237  0.040  0.004 -0.154              
## wk___:DZ_MZ -0.005  0.003  0.258 -0.003 -0.002       
## wknd___:_DZ  0.004 -0.008  0.339 -0.003  0.005 -0.219
out<- weekend_dur_MCQ_PSYCH_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_PSYCH_MZ<- lmer(PSYCH_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+MZ_dummy_DZ+MZ_dummy_sib+weekend_dur_mcq_diff*MZ_dummy_DZ+weekend_dur_mcq_diff*MZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_PSYCH_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## PSYCH_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + MZ_dummy_DZ +  
##     MZ_dummy_sib + weekend_dur_mcq_diff * MZ_dummy_DZ + weekend_dur_mcq_diff *  
##     MZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7289.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8499 -0.5814 -0.3450  0.6071  3.5649 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2449   0.4949  
##  Residual                  0.6751   0.8216  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                       -2.372e-02  4.552e-02  1.386e+03  -0.521
## avg_weekend_dur_mcq               -9.662e-02  2.778e-02  1.481e+03  -3.478
## weekend_dur_mcq_diff              -3.178e-02  6.361e-02  1.271e+03  -0.500
## MZ_dummy_DZ                       -1.858e-02  6.054e-02  1.383e+03  -0.307
## MZ_dummy_sib                       1.449e-02  5.371e-02  1.401e+03   0.270
## weekend_dur_mcq_diff:MZ_dummy_DZ  -7.648e-02  8.622e-02  1.274e+03  -0.887
## weekend_dur_mcq_diff:MZ_dummy_sib -7.785e-03  7.272e-02  1.286e+03  -0.107
##                                   Pr(>|t|)    
## (Intercept)                       0.602370    
## avg_weekend_dur_mcq               0.000519 ***
## weekend_dur_mcq_diff              0.617460    
## MZ_dummy_DZ                       0.758995    
## MZ_dummy_sib                      0.787420    
## weekend_dur_mcq_diff:MZ_dummy_DZ  0.375218    
## weekend_dur_mcq_diff:MZ_dummy_sib 0.914765    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ MZ__DZ MZ_dm_ w___:MZ__D
## avg_wknd_d_ -0.011                                       
## wknd_dr_mc_ -0.005  0.001                                
## MZ_dummy_DZ -0.752  0.007  0.004                         
## MZ_dummy_sb -0.847 -0.029  0.004  0.637                  
## w___:MZ__DZ  0.004 -0.006 -0.738  0.001 -0.003           
## wkn___:MZ__  0.004  0.000 -0.875 -0.003 -0.004  0.645
out<- weekend_dur_MCQ_PSYCH_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_PSYCH_DZ<- lmer(PSYCH_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+DZ_dummy_MZ+DZ_dummy_sib+weekend_dur_mcq_diff*DZ_dummy_MZ+weekend_dur_mcq_diff*DZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_PSYCH_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## PSYCH_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + DZ_dummy_MZ +  
##     DZ_dummy_sib + weekend_dur_mcq_diff * DZ_dummy_MZ + weekend_dur_mcq_diff *  
##     DZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7289.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8499 -0.5814 -0.3450  0.6071  3.5649 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2449   0.4949  
##  Residual                  0.6751   0.8216  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                         -0.04230    0.03992 1379.49375  -1.060
## avg_weekend_dur_mcq                 -0.09662    0.02778 1480.56877  -3.478
## weekend_dur_mcq_diff                -0.10826    0.05821 1277.88539  -1.860
## DZ_dummy_MZ                          0.01858    0.06054 1383.16505   0.307
## DZ_dummy_sib                         0.03306    0.04907 1400.05248   0.674
## weekend_dur_mcq_diff:DZ_dummy_MZ     0.07648    0.08622 1273.96884   0.887
## weekend_dur_mcq_diff:DZ_dummy_sib    0.06870    0.06805 1293.91772   1.010
##                                   Pr(>|t|)    
## (Intercept)                       0.289481    
## avg_weekend_dur_mcq               0.000519 ***
## weekend_dur_mcq_diff              0.063121 .  
## DZ_dummy_MZ                       0.758995    
## DZ_dummy_sib                      0.500550    
## weekend_dur_mcq_diff:DZ_dummy_MZ  0.375218    
## weekend_dur_mcq_diff:DZ_dummy_sib 0.312877    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ DZ__MZ DZ_dm_ w___:DZ__M
## avg_wknd_d_ -0.003                                       
## wknd_dr_mc_  0.008 -0.008                                
## DZ_dummy_MZ -0.659 -0.007 -0.005                         
## DZ_dummy_sb -0.813 -0.040 -0.006  0.537                  
## w___:DZ__MZ -0.005  0.006 -0.675  0.001  0.004           
## wkn___:DZ__ -0.007  0.008 -0.855  0.004  0.005  0.577
out<- weekend_dur_MCQ_PSYCH_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekend_dur_MCQ_PSYCH_sib<- lmer(PSYCH_resid~avg_weekend_dur_mcq+weekend_dur_mcq_diff+sib_dummy_MZ+sib_dummy_DZ+weekend_dur_mcq_diff*sib_dummy_MZ+weekend_dur_mcq_diff*sib_dummy_DZ+(1|rel_family_id), data=abcd_all)
summary(weekend_dur_MCQ_PSYCH_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## PSYCH_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + sib_dummy_MZ +  
##     sib_dummy_DZ + weekend_dur_mcq_diff * sib_dummy_MZ + weekend_dur_mcq_diff *  
##     sib_dummy_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7289.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8499 -0.5814 -0.3450  0.6071  3.5649 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2449   0.4949  
##  Residual                  0.6751   0.8216  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                       -9.233e-03  2.855e-02  1.442e+03  -0.323
## avg_weekend_dur_mcq               -9.662e-02  2.778e-02  1.481e+03  -3.478
## weekend_dur_mcq_diff              -3.956e-02  3.524e-02  1.339e+03  -1.123
## sib_dummy_MZ                      -1.449e-02  5.371e-02  1.401e+03  -0.270
## sib_dummy_DZ                      -3.306e-02  4.907e-02  1.400e+03  -0.674
## weekend_dur_mcq_diff:sib_dummy_MZ  7.785e-03  7.272e-02  1.286e+03   0.107
## weekend_dur_mcq_diff:sib_dummy_DZ -6.870e-02  6.805e-02  1.294e+03  -1.010
##                                   Pr(>|t|)    
## (Intercept)                       0.746440    
## avg_weekend_dur_mcq               0.000519 ***
## weekend_dur_mcq_diff              0.261840    
## sib_dummy_MZ                      0.787420    
## sib_dummy_DZ                      0.500550    
## weekend_dur_mcq_diff:sib_dummy_MZ 0.914765    
## weekend_dur_mcq_diff:sib_dummy_DZ 0.312877    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkn___ sb__MZ sb__DZ w___:__M
## avg_wknd_d_ -0.073                                     
## wknd_dr_mc_  0.000  0.001                              
## sib_dmmy_MZ -0.531  0.029  0.000                       
## sib_dmmy_DZ -0.582  0.040  0.000  0.309                
## wkn___:__MZ  0.000  0.000 -0.485 -0.004  0.000         
## wkn___:__DZ  0.000 -0.008 -0.518  0.000  0.005  0.251
out<- weekend_dur_MCQ_PSYCH_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekend Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekday duration (MCQ)

# weekday duration (MCQ)
weekday_dur_MCQ_PSYCH_pheno<- lmer(PSYCH_resid~weekday_dur_mcq_wave_2+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_PSYCH_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ weekday_dur_mcq_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7215.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0684 -0.5755 -0.3216  0.6079  3.5277 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2368   0.4866  
##  Residual                  0.6622   0.8138  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                          Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -0.02512    0.02040 1419.68293  -1.232    0.218    
## weekday_dur_mcq_wave_2   -0.15977    0.01871 2664.17148  -8.538   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## wkdy_dr___2 -0.001
out<- weekday_dur_MCQ_PSYCH_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_PSYCH<- lmer(PSYCH_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_PSYCH)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + (1 |  
##     rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7219.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0544 -0.5713 -0.3175  0.6118  3.5041 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2369   0.4867  
##  Residual                  0.6623   0.8138  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)            -0.02514    0.02040 1419.27256  -1.232    0.218    
## avg_weekday_dur_mcq    -0.17307    0.02541 1453.80062  -6.810 1.42e-11 ***
## weekday_dur_mcq_diff   -0.14387    0.02779 1318.07504  -5.177 2.61e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___
## avg_wkdy_d_  0.001       
## wkdy_dr_mc_ -0.001 -0.004
weekday_dur_MCQ_PSYCH_zyg<- lmer(PSYCH_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+sibDZ_MZ+sib_DZ+weekday_dur_mcq_diff*sibDZ_MZ+weekday_dur_mcq_diff*sib_DZ+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_PSYCH_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + sibDZ_MZ +  
##     sib_DZ + weekday_dur_mcq_diff * sibDZ_MZ + weekday_dur_mcq_diff *  
##     sib_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7224.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0234 -0.5730 -0.3102  0.6099  3.4138 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2389   0.4888  
##  Residual                  0.6588   0.8117  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                                 Estimate Std. Error         df t value Pr(>|t|)
## (Intercept)                     -0.03434    0.02205 1396.53366  -1.558  0.11957
## avg_weekday_dur_mcq             -0.17602    0.02557 1453.53745  -6.883 8.71e-12
## weekday_dur_mcq_diff            -0.17394    0.03156 1300.09132  -5.512 4.27e-08
## sibDZ_MZ                        -0.02429    0.05121 1393.37500  -0.474  0.63541
## sib_DZ                          -0.04787    0.04855 1405.17812  -0.986  0.32435
## weekday_dur_mcq_diff:sibDZ_MZ    0.01689    0.07513 1302.17075   0.225  0.82219
## weekday_dur_mcq_diff:sib_DZ     -0.19561    0.06650 1296.61127  -2.941  0.00332
##                                  
## (Intercept)                      
## avg_weekday_dur_mcq           ***
## weekday_dur_mcq_diff          ***
## sibDZ_MZ                         
## sib_DZ                           
## weekday_dur_mcq_diff:sibDZ_MZ    
## weekday_dur_mcq_diff:sib_DZ   ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ sDZ_MZ sib_DZ w___:D
## avg_wkdy_d_  0.043                                   
## wkdy_dr_mc_  0.001 -0.006                            
## sibDZ_MZ     0.254  0.075  0.007                     
## sib_DZ       0.241  0.070 -0.003 -0.148              
## wk___:DZ_MZ  0.007 -0.005  0.327  0.005  0.001       
## wkdy___:_DZ -0.003 -0.002  0.284  0.002 -0.005 -0.179
out<- weekday_dur_MCQ_PSYCH_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_PSYCH_MZ<- lmer(PSYCH_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+MZ_dummy_DZ+MZ_dummy_sib+weekday_dur_mcq_diff*MZ_dummy_DZ+weekday_dur_mcq_diff*MZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_PSYCH_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## PSYCH_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + MZ_dummy_DZ +  
##     MZ_dummy_sib + weekday_dur_mcq_diff * MZ_dummy_DZ + weekday_dur_mcq_diff *  
##     MZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7224.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0234 -0.5730 -0.3102  0.6099  3.4138 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2389   0.4888  
##  Residual                  0.6588   0.8117  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                       -5.053e-02  4.510e-02  1.389e+03  -1.121
## avg_weekday_dur_mcq               -1.760e-01  2.557e-02  1.454e+03  -6.883
## weekday_dur_mcq_diff              -1.627e-01  6.738e-02  1.304e+03  -2.415
## MZ_dummy_DZ                        3.515e-04  5.984e-02  1.387e+03   0.006
## MZ_dummy_sib                       4.822e-02  5.332e-02  1.407e+03   0.904
## weekday_dur_mcq_diff:MZ_dummy_DZ  -1.147e-01  8.743e-02  1.294e+03  -1.312
## weekday_dur_mcq_diff:MZ_dummy_sib  8.092e-02  7.653e-02  1.310e+03   1.057
##                                   Pr(>|t|)    
## (Intercept)                         0.2627    
## avg_weekday_dur_mcq               8.71e-12 ***
## weekday_dur_mcq_diff                0.0159 *  
## MZ_dummy_DZ                         0.9953    
## MZ_dummy_sib                        0.3660    
## weekday_dur_mcq_diff:MZ_dummy_DZ    0.1898    
## weekday_dur_mcq_diff:MZ_dummy_sib   0.2906    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ MZ__DZ MZ_dm_ w___:MZ__D
## avg_wkdy_d_  0.077                                       
## wkdy_dr_mc_  0.008 -0.007                                
## MZ_dummy_DZ -0.752 -0.035 -0.006                         
## MZ_dummy_sb -0.849 -0.103 -0.007  0.637                  
## w___:MZ__DZ -0.006  0.003 -0.771  0.002  0.005           
## wkd___:MZ__ -0.007  0.006 -0.880  0.005  0.005  0.678
out<- weekday_dur_MCQ_PSYCH_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_PSYCH_DZ<- lmer(PSYCH_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+DZ_dummy_MZ+DZ_dummy_sib+weekday_dur_mcq_diff*DZ_dummy_MZ+weekday_dur_mcq_diff*DZ_dummy_sib+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_PSYCH_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## PSYCH_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + DZ_dummy_MZ +  
##     DZ_dummy_sib + weekday_dur_mcq_diff * DZ_dummy_MZ + weekday_dur_mcq_diff *  
##     DZ_dummy_sib + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7224.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0234 -0.5730 -0.3102  0.6099  3.4138 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2389   0.4888  
##  Residual                  0.6588   0.8117  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                       -5.018e-02  3.945e-02  1.383e+03  -1.272
## avg_weekday_dur_mcq               -1.760e-01  2.557e-02  1.454e+03  -6.883
## weekday_dur_mcq_diff              -2.774e-01  5.572e-02  1.281e+03  -4.978
## DZ_dummy_MZ                       -3.515e-04  5.984e-02  1.387e+03  -0.006
## DZ_dummy_sib                       4.787e-02  4.855e-02  1.405e+03   0.986
## weekday_dur_mcq_diff:DZ_dummy_MZ   1.147e-01  8.743e-02  1.294e+03   1.312
## weekday_dur_mcq_diff:DZ_dummy_sib  1.956e-01  6.650e-02  1.297e+03   2.941
##                                   Pr(>|t|)    
## (Intercept)                        0.20361    
## avg_weekday_dur_mcq               8.71e-12 ***
## weekday_dur_mcq_diff              7.31e-07 ***
## DZ_dummy_MZ                        0.99531    
## DZ_dummy_sib                       0.32435    
## weekday_dur_mcq_diff:DZ_dummy_MZ   0.18981    
## weekday_dur_mcq_diff:DZ_dummy_sib  0.00332 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ DZ__MZ DZ_dm_ w___:DZ__M
## avg_wkdy_d_  0.035                                       
## wkdy_dr_mc_ -0.007 -0.003                                
## DZ_dummy_MZ -0.657  0.035  0.004                         
## DZ_dummy_sb -0.814 -0.070  0.006  0.533                  
## w___:DZ__MZ  0.004 -0.003 -0.637  0.002 -0.003           
## wkd___:DZ__  0.006  0.002 -0.838 -0.004 -0.005  0.534
out<- weekday_dur_MCQ_PSYCH_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekday_dur_MCQ_PSYCH_sib<- lmer(PSYCH_resid~avg_weekday_dur_mcq+weekday_dur_mcq_diff+sib_dummy_MZ+sib_dummy_DZ+weekday_dur_mcq_diff*sib_dummy_MZ+weekday_dur_mcq_diff*sib_dummy_DZ+(1|rel_family_id), data=abcd_all)
summary(weekday_dur_MCQ_PSYCH_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## PSYCH_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + sib_dummy_MZ +  
##     sib_dummy_DZ + weekday_dur_mcq_diff * sib_dummy_MZ + weekday_dur_mcq_diff *  
##     sib_dummy_DZ + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 7224.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.0234 -0.5730 -0.3102  0.6099  3.4138 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2389   0.4888  
##  Residual                  0.6588   0.8117  
## Number of obs: 2670, groups:  rel_family_id, 1448
## 
## Fixed effects:
##                                     Estimate Std. Error         df t value
## (Intercept)                       -2.312e-03  2.820e-02  1.448e+03  -0.082
## avg_weekday_dur_mcq               -1.760e-01  2.557e-02  1.454e+03  -6.883
## weekday_dur_mcq_diff              -8.176e-02  3.630e-02  1.334e+03  -2.252
## sib_dummy_MZ                      -4.822e-02  5.332e-02  1.407e+03  -0.904
## sib_dummy_DZ                      -4.787e-02  4.855e-02  1.405e+03  -0.986
## weekday_dur_mcq_diff:sib_dummy_MZ -8.092e-02  7.653e-02  1.310e+03  -1.057
## weekday_dur_mcq_diff:sib_dummy_DZ -1.956e-01  6.650e-02  1.297e+03  -2.941
##                                   Pr(>|t|)    
## (Intercept)                        0.93467    
## avg_weekday_dur_mcq               8.71e-12 ***
## weekday_dur_mcq_diff               0.02446 *  
## sib_dummy_MZ                       0.36598    
## sib_dummy_DZ                       0.32435    
## weekday_dur_mcq_diff:sib_dummy_MZ  0.29056    
## weekday_dur_mcq_diff:sib_dummy_DZ  0.00332 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg___ wkd___ sb__MZ sb__DZ w___:__M
## avg_wkdy_d_ -0.072                                     
## wkdy_dr_mc_ -0.002  0.000                              
## sib_dmmy_MZ -0.534  0.103  0.001                       
## sib_dmmy_DZ -0.583  0.070  0.001  0.313                
## wkd___:__MZ  0.002 -0.006 -0.474  0.005 -0.001         
## wkd___:__DZ  0.001 -0.002 -0.546 -0.001 -0.005  0.259
out<- weekday_dur_MCQ_PSYCH_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Weekday Duration",
         sleep="Duration",
         Psychiatric="Psychosis",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

chronotype

# chrono 
chrono_PSYCH_pheno<- lmer(PSYCH_resid~chronotype_wave_2+(1|rel_family_id), data=abcd_all)
summary(chrono_PSYCH_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ chronotype_wave_2 + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 6310.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8703 -0.5830 -0.3122  0.5856  3.5383 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2715   0.5211  
##  Residual                  0.6496   0.8060  
## Number of obs: 2317, groups:  rel_family_id, 1388
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)         -0.01605    0.02209 1341.80242  -0.727    0.468    
## chronotype_wave_2   -0.10600    0.01971 2306.13491  -5.377 8.32e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr)
## chrntyp_w_2 -0.054
out<- chrono_PSYCH_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Psychosis",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

chrono_PSYCH<- lmer(PSYCH_resid~avg_chrono+chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_PSYCH)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_chrono + chrono_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 6310.8
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8951 -0.5840 -0.3060  0.5913  3.5241 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2702   0.5198  
##  Residual                  0.6495   0.8059  
## Number of obs: 2317, groups:  rel_family_id, 1388
## 
## Fixed effects:
##               Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)   -0.01424    0.02208 1339.87628  -0.645   0.5190    
## avg_chrono    -0.14162    0.02640 1423.23800  -5.365 9.43e-08 ***
## chrono_diff   -0.06131    0.02960 1013.62574  -2.071   0.0386 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch
## avg_chrono  -0.067       
## chrono_diff -0.006  0.000
chrono_PSYCH_zyg<- lmer(PSYCH_resid~avg_chrono+chrono_diff+sibDZ_MZ+sib_DZ+sibDZ_MZ*chrono_diff+sib_DZ*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_PSYCH_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_chrono + chrono_diff + sibDZ_MZ + sib_DZ +  
##     sibDZ_MZ * chrono_diff + sib_DZ * chrono_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 6324.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8944 -0.5852 -0.3021  0.5879  3.5212 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2706   0.5202  
##  Residual                  0.6501   0.8063  
## Number of obs: 2317, groups:  rel_family_id, 1388
## 
## Fixed effects:
##                        Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)          -1.409e-02  2.385e-02  1.321e+03  -0.591   0.5547    
## avg_chrono           -1.416e-01  2.644e-02  1.424e+03  -5.356 9.89e-08 ***
## chrono_diff          -5.920e-02  3.212e-02  9.946e+02  -1.843   0.0656 .  
## sibDZ_MZ             -6.465e-03  5.504e-02  1.315e+03  -0.117   0.9065    
## sib_DZ                7.616e-03  5.245e-02  1.324e+03   0.145   0.8846    
## chrono_diff:sibDZ_MZ  7.900e-02  7.358e-02  9.895e+02   1.074   0.2832    
## chrono_diff:sib_DZ   -5.106e-02  7.184e-02  1.002e+03  -0.711   0.4774    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d sDZ_MZ sib_DZ c_:DZ_
## avg_chrono  -0.081                                   
## chrono_diff -0.005  0.000                            
## sibDZ_MZ     0.248 -0.031 -0.002                     
## sib_DZ       0.242 -0.032  0.000 -0.155              
## chrn_:DZ_MZ -0.002  0.001  0.218 -0.006  0.000       
## chrn_df:_DZ  0.000  0.000  0.276  0.000 -0.004 -0.181
out<- chrono_PSYCH_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Psychosis",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

chrono_PSYCH_MZ<- lmer(PSYCH_resid~avg_chrono+chrono_diff+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*chrono_diff+MZ_dummy_sib*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_PSYCH_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_chrono + chrono_diff + MZ_dummy_DZ + MZ_dummy_sib +  
##     MZ_dummy_DZ * chrono_diff + MZ_dummy_sib * chrono_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 6324.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8944 -0.5852 -0.3021  0.5879  3.5212 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2706   0.5202  
##  Residual                  0.6501   0.8063  
## Number of obs: 2317, groups:  rel_family_id, 1388
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -1.840e-02  4.846e-02  1.315e+03  -0.380    0.704    
## avg_chrono               -1.416e-01  2.644e-02  1.424e+03  -5.356 9.89e-08 ***
## chrono_diff              -6.537e-03  6.421e-02  9.857e+02  -0.102    0.919    
## MZ_dummy_DZ               1.027e-02  6.453e-02  1.308e+03   0.159    0.874    
## MZ_dummy_sib              2.657e-03  5.718e-02  1.328e+03   0.046    0.963    
## chrono_diff:MZ_dummy_DZ  -1.045e-01  8.751e-02  9.866e+02  -1.194    0.233    
## chrono_diff:MZ_dummy_sib -5.347e-02  7.583e-02  9.990e+02  -0.705    0.481    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d MZ__DZ MZ_dm_ c_:MZ__D
## avg_chrono  -0.063                                     
## chrono_diff -0.007  0.001                              
## MZ_dummy_DZ -0.749  0.013  0.005                       
## MZ_dummy_sb -0.847  0.045  0.006  0.635                
## chr_:MZ__DZ  0.005  0.000 -0.734 -0.005 -0.004         
## chrn_d:MZ__  0.006 -0.001 -0.847 -0.004 -0.007  0.621
out<- chrono_PSYCH_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Psychosis",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

chrono_PSYCH_DZ<- lmer(PSYCH_resid~avg_chrono+chrono_diff+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*chrono_diff+DZ_dummy_sib*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_PSYCH_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_chrono + chrono_diff + DZ_dummy_MZ + DZ_dummy_sib +  
##     DZ_dummy_MZ * chrono_diff + DZ_dummy_sib * chrono_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 6324.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8944 -0.5852 -0.3021  0.5879  3.5212 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2706   0.5202  
##  Residual                  0.6501   0.8063  
## Number of obs: 2317, groups:  rel_family_id, 1388
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -8.130e-03  4.276e-02  1.305e+03  -0.190   0.8492    
## avg_chrono               -1.416e-01  2.644e-02  1.424e+03  -5.356 9.89e-08 ***
## chrono_diff              -1.111e-01  5.946e-02  9.876e+02  -1.868   0.0621 .  
## DZ_dummy_MZ              -1.027e-02  6.453e-02  1.308e+03  -0.159   0.8735    
## DZ_dummy_sib             -7.616e-03  5.245e-02  1.324e+03  -0.145   0.8846    
## chrono_diff:DZ_dummy_MZ   1.045e-01  8.751e-02  9.866e+02   1.194   0.2326    
## chrono_diff:DZ_dummy_sib  5.106e-02  7.184e-02  1.002e+03   0.711   0.4774    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d DZ__MZ DZ_dm_ c_:DZ__M
## avg_chrono  -0.051                                     
## chrono_diff -0.003  0.000                              
## DZ_dummy_MZ -0.660 -0.013  0.002                       
## DZ_dummy_sb -0.815  0.032  0.003  0.538                
## chr_:DZ__MZ  0.002  0.000 -0.679 -0.005 -0.002         
## chrn_d:DZ__  0.003  0.000 -0.828 -0.002 -0.004  0.562
out<- chrono_PSYCH_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Psychosis",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

chrono_PSYCH_sib<- lmer(PSYCH_resid~avg_chrono+chrono_diff+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*chrono_diff+sib_dummy_DZ*chrono_diff+(1|rel_family_id), data=abcd_all)
summary(chrono_PSYCH_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: 
## PSYCH_resid ~ avg_chrono + chrono_diff + sib_dummy_MZ + sib_dummy_DZ +  
##     sib_dummy_MZ * chrono_diff + sib_dummy_DZ * chrono_diff +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 6324.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8944 -0.5852 -0.3021  0.5879  3.5212 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2706   0.5202  
##  Residual                  0.6501   0.8063  
## Number of obs: 2317, groups:  rel_family_id, 1388
## 
## Fixed effects:
##                            Estimate Std. Error         df t value Pr(>|t|)    
## (Intercept)              -1.575e-02  3.040e-02  1.362e+03  -0.518    0.605    
## avg_chrono               -1.416e-01  2.644e-02  1.424e+03  -5.356 9.89e-08 ***
## chrono_diff              -6.001e-02  4.033e-02  1.034e+03  -1.488    0.137    
## sib_dummy_MZ             -2.657e-03  5.718e-02  1.328e+03  -0.046    0.963    
## sib_dummy_DZ              7.616e-03  5.245e-02  1.324e+03   0.145    0.885    
## chrono_diff:sib_dummy_MZ  5.347e-02  7.583e-02  9.990e+02   0.705    0.481    
## chrono_diff:sib_dummy_DZ -5.106e-02  7.184e-02  1.002e+03  -0.711    0.477    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_ch chrn_d sb__MZ sb__DZ c_:__M
## avg_chrono  -0.017                                   
## chrono_diff -0.007 -0.001                            
## sib_dmmy_MZ -0.531 -0.045  0.004                     
## sib_dmmy_DZ -0.579 -0.032  0.004  0.310              
## chrn_d:__MZ  0.004  0.001 -0.532 -0.007 -0.002       
## chrn_d:__DZ  0.004  0.000 -0.561 -0.002 -0.004  0.299
out<- chrono_PSYCH_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Chronotype",
         sleep="Chronotype",
         Psychiatric="Psychosis",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekend efficiency

weekend_effic_PSYCH_pheno<- lmer(PSYCH_resid~avg_weekend_effic+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_PSYCH_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_weekend_effic + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3619.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6960 -0.5436 -0.3701  0.5566  3.7775 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2306   0.4802  
##  Residual                  0.6084   0.7800  
## Number of obs: 1370, groups:  rel_family_id, 893
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)         -0.05900    0.02723  863.43630  -2.167   0.0305 *
## avg_weekend_effic   -0.01033    0.02910 1355.74735  -0.355   0.7226  
## covid               -0.03511    0.17643  958.65639  -0.199   0.8423  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wknd_ff -0.083       
## covid       -0.149  0.033
out<- weekend_effic_PSYCH_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Psychosis",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekend_effic_PSYCH<- lmer(PSYCH_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_PSYCH)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3622.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6959 -0.5444 -0.3687  0.5539  3.7809 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2304   0.4800  
##  Residual                  0.6091   0.7805  
## Number of obs: 1370, groups:  rel_family_id, 893
## 
## Fixed effects:
##                         Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)           -5.849e-02  2.729e-02  8.589e+02  -2.143   0.0324 *
## fam_avg_weekend_effic -1.752e-02  3.728e-02  9.538e+02  -0.470   0.6385  
## weekend_effic_diff     8.054e-04  4.642e-02  5.325e+02   0.017   0.9862  
## covid                 -3.577e-02  1.765e-01  9.575e+02  -0.203   0.8394  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__
## fm_vg_wknd_ -0.103              
## wknd_ffc_df -0.003  0.003       
## covid       -0.150  0.034  0.012
weekend_effic_PSYCH_zyg<- lmer(PSYCH_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekend_effic_diff+sib_DZ*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_PSYCH_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekend_effic_diff + sib_DZ *  
##     weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3628.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6797 -0.5572 -0.3564  0.5599  3.7730 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2272   0.4767  
##  Residual                  0.6101   0.7811  
## Number of obs: 1370, groups:  rel_family_id, 893
## 
## Fixed effects:
##                              Estimate Std. Error        df t value Pr(>|t|)   
## (Intercept)                  -0.07303    0.02825 816.98209  -2.586   0.0099 **
## fam_avg_weekend_effic        -0.01662    0.03726 951.16126  -0.446   0.6556   
## weekend_effic_diff            0.03050    0.05140 523.05927   0.593   0.5531   
## covid                        -0.04349    0.17635 953.80184  -0.247   0.8052   
## sibDZ_MZ                     -0.10396    0.06418 784.40693  -1.620   0.1057   
## sib_DZ                       -0.05879    0.06180 847.06679  -0.951   0.3417   
## weekend_effic_diff:sibDZ_MZ   0.20871    0.12431 521.14237   1.679   0.0938 . 
## weekend_effic_diff:sib_DZ    -0.04265    0.10532 526.51630  -0.405   0.6857   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wknd_ -0.105                                          
## wknd_ffc_df -0.004  0.002                                   
## covid       -0.141  0.035  0.008                            
## sibDZ_MZ     0.236 -0.040 -0.003 -0.009                     
## sib_DZ       0.102  0.036  0.001  0.048 -0.075              
## wkn__:DZ_MZ -0.002 -0.002  0.372 -0.005 -0.004 -0.001       
## wknd_f_:_DZ  0.001 -0.002  0.170 -0.003  0.000  0.000 -0.105
out<- weekend_effic_PSYCH_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Psychosis",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekend_effic_PSYCH_MZ<- lmer(PSYCH_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekend_effic_diff+MZ_dummy_sib*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_PSYCH_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekend_effic_diff +  
##     MZ_dummy_sib * weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3628.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6797 -0.5572 -0.3564  0.5599  3.7730 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2272   0.4767  
##  Residual                  0.6101   0.7811  
## Number of obs: 1370, groups:  rel_family_id, 893
## 
## Fixed effects:
##                                  Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                      -0.14234    0.05657 769.86305  -2.516   0.0121
## fam_avg_weekend_effic            -0.01662    0.03726 951.16126  -0.446   0.6556
## weekend_effic_diff                0.16964    0.11261 519.95223   1.507   0.1325
## covid                            -0.04349    0.17635 953.80184  -0.247   0.8052
## MZ_dummy_DZ                       0.07456    0.07330 768.70112   1.017   0.3094
## MZ_dummy_sib                      0.13335    0.06910 827.45360   1.930   0.0540
## weekend_effic_diff:MZ_dummy_DZ   -0.23004    0.14002 519.50125  -1.643   0.1010
## weekend_effic_diff:MZ_dummy_sib  -0.18739    0.12979 524.82996  -1.444   0.1494
##                                  
## (Intercept)                     *
## fam_avg_weekend_effic            
## weekend_effic_diff               
## covid                            
## MZ_dummy_DZ                      
## MZ_dummy_sib                    .
## weekend_effic_diff:MZ_dummy_DZ   
## weekend_effic_diff:MZ_dummy_sib  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wknd_ -0.082                                             
## wknd_ffc_df -0.005 -0.001                                      
## covid       -0.077  0.035  0.000                               
## MZ_dummy_DZ -0.768  0.050  0.004  0.028                        
## MZ_dummy_sb -0.809  0.021  0.004 -0.013  0.625                 
## wk__:MZ__DZ  0.004  0.001 -0.804  0.003 -0.003 -0.003          
## wknd__:MZ__  0.004  0.003 -0.868  0.006 -0.003 -0.004  0.698
out<- weekend_effic_PSYCH_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Psychosis",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekend_effic_PSYCH_DZ<- lmer(PSYCH_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekend_effic_diff+DZ_dummy_sib*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_PSYCH_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekend_effic_diff +  
##     DZ_dummy_sib * weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3628.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6797 -0.5572 -0.3564  0.5599  3.7730 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2272   0.4767  
##  Residual                  0.6101   0.7811  
## Number of obs: 1370, groups:  rel_family_id, 893
## 
## Fixed effects:
##                                  Estimate Std. Error        df t value Pr(>|t|)
## (Intercept)                      -0.06777    0.04692 770.92173  -1.444    0.149
## fam_avg_weekend_effic            -0.01662    0.03726 951.16126  -0.446    0.656
## weekend_effic_diff               -0.06040    0.08323 518.67807  -0.726    0.468
## covid                            -0.04349    0.17635 953.80184  -0.247    0.805
## DZ_dummy_MZ                      -0.07456    0.07330 768.70112  -1.017    0.309
## DZ_dummy_sib                      0.05879    0.06180 847.06679   0.951    0.342
## weekend_effic_diff:DZ_dummy_MZ    0.23004    0.14002 519.50125   1.643    0.101
## weekend_effic_diff:DZ_dummy_sib   0.04265    0.10532 526.51630   0.405    0.686
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wknd_ -0.022                                             
## wknd_ffc_df  0.000  0.001                                      
## covid       -0.049  0.035  0.005                               
## DZ_dummy_MZ -0.636 -0.050  0.000 -0.028                        
## DZ_dummy_sb -0.754 -0.036 -0.001 -0.048  0.488                 
## wk__:DZ__MZ  0.000 -0.001 -0.594 -0.003 -0.003  0.000          
## wknd__:DZ__ -0.001  0.002 -0.790  0.003  0.000  0.000  0.470
out<- weekend_effic_PSYCH_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Psychosis",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekend_effic_PSYCH_sib<- lmer(PSYCH_resid~fam_avg_weekend_effic+weekend_effic_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekend_effic_diff+sib_dummy_DZ*weekend_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekend_effic_PSYCH_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekend_effic + weekend_effic_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekend_effic_diff +  
##     sib_dummy_DZ * weekend_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3628.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6797 -0.5572 -0.3564  0.5599  3.7730 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2272   0.4767  
##  Residual                  0.6101   0.7811  
## Number of obs: 1370, groups:  rel_family_id, 893
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                      -0.008983   0.040588 960.084284  -0.221
## fam_avg_weekend_effic            -0.016620   0.037255 951.161257  -0.446
## weekend_effic_diff               -0.017747   0.064540 540.024408  -0.275
## covid                            -0.043494   0.176352 953.801842  -0.247
## sib_dummy_MZ                     -0.133352   0.069095 827.453598  -1.930
## sib_dummy_DZ                     -0.058791   0.061796 847.066792  -0.951
## weekend_effic_diff:sib_dummy_MZ   0.187390   0.129790 524.829956   1.444
## weekend_effic_diff:sib_dummy_DZ  -0.042649   0.105317 526.516296  -0.405
##                                 Pr(>|t|)  
## (Intercept)                        0.825  
## fam_avg_weekend_effic              0.656  
## weekend_effic_diff                 0.783  
## covid                              0.805  
## sib_dummy_MZ                       0.054 .
## sib_dummy_DZ                       0.342  
## weekend_effic_diff:sib_dummy_MZ    0.149  
## weekend_effic_diff:sib_dummy_DZ    0.686  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wknd__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wknd_ -0.079                                           
## wknd_ffc_df -0.003  0.005                                    
## covid       -0.130  0.035  0.012                             
## sib_dmmy_MZ -0.574 -0.021  0.001  0.013                      
## sib_dmmy_DZ -0.651  0.036  0.002  0.048  0.377               
## wknd__:__MZ  0.002 -0.003 -0.497 -0.006 -0.004 -0.001        
## wknd__:__DZ  0.001 -0.002 -0.613 -0.003  0.000  0.000  0.305
out<- weekend_effic_PSYCH_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekend Efficiency",
         sleep="Efficiency",
         Psychiatric="Psychosis",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

weekday efficiency

weekday_effic_PSYCH_pheno<- lmer(PSYCH_resid~avg_weekday_effic+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_PSYCH_pheno) ### NOT sig
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ avg_weekday_effic + covid + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3665.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7295 -0.5395 -0.3648  0.5327  3.7550 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2427   0.4926  
##  Residual                  0.6042   0.7773  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                     Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)       -5.587e-02  2.725e-02  8.693e+02  -2.051   0.0406 *
## avg_weekday_effic -9.868e-03  2.637e-02  1.377e+03  -0.374   0.7083  
## covid             -3.845e-02  1.776e-01  9.757e+02  -0.216   0.8287  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) avg_w_
## avg_wkdy_ff -0.043       
## covid       -0.148  0.034
out<- weekday_effic_PSYCH_pheno %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Psychosis",
         model="Phenotypic")

abcd_out<- rbind(abcd_out, out)

weekday_effic_PSYCH<- lmer(PSYCH_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_PSYCH)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3669.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7251 -0.5394 -0.3651  0.5328  3.7517 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2425   0.4924  
##  Residual                  0.6050   0.7778  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                         Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)            -0.055967   0.027272 868.910242  -2.052   0.0405 *
## fam_avg_weekday_effic  -0.008098   0.033435 984.874807  -0.242   0.8087  
## weekday_effic_diff     -0.012855   0.043484 551.725843  -0.296   0.7676  
## covid                  -0.038288   0.177689 974.988958  -0.215   0.8294  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__
## fm_vg_wkdy_ -0.058              
## wkdy_ffc_df  0.004 -0.010       
## covid       -0.148  0.033  0.012
weekday_effic_PSYCH_zyg<- lmer(PSYCH_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+sibDZ_MZ+sib_DZ+sibDZ_MZ*weekday_effic_diff+sib_DZ*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_PSYCH_zyg)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     sibDZ_MZ + sib_DZ + sibDZ_MZ * weekday_effic_diff + sib_DZ *  
##     weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3675.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7198 -0.5539 -0.3474  0.5428  3.7236 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2388   0.4887  
##  Residual                  0.6064   0.7787  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                               Estimate Std. Error         df t value Pr(>|t|)  
## (Intercept)                  -0.071842   0.028285 824.718923  -2.540   0.0113 *
## fam_avg_weekday_effic        -0.002053   0.033525 980.604391  -0.061   0.9512  
## weekday_effic_diff            0.010354   0.046532 538.995715   0.223   0.8240  
## covid                        -0.046692   0.177538 970.178271  -0.263   0.7926  
## sibDZ_MZ                     -0.112898   0.064729 787.559270  -1.744   0.0815 .
## sib_DZ                       -0.064131   0.061883 854.849129  -1.036   0.3003  
## weekday_effic_diff:sibDZ_MZ   0.144836   0.111655 529.266270   1.297   0.1951  
## weekday_effic_diff:sib_DZ    -0.060756   0.096744 556.622847  -0.628   0.5303  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sDZ_MZ sib_DZ w__:DZ
## fm_vg_wkdy_ -0.081                                          
## wkdy_ffc_df  0.003 -0.008                                   
## covid       -0.139  0.033  0.008                            
## sibDZ_MZ     0.243 -0.093  0.000 -0.011                     
## sib_DZ       0.105 -0.013 -0.009  0.046 -0.072              
## wkd__:DZ_MZ  0.000  0.003  0.349 -0.005  0.002  0.005       
## wkdy_f_:_DZ -0.012  0.014 -0.041  0.008  0.005  0.006  0.025
out<- weekday_effic_PSYCH_zyg %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Psychosis",
         model="Between Within")

abcd_out<- rbind(abcd_out, out)

weekday_effic_PSYCH_MZ<- lmer(PSYCH_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+MZ_dummy_DZ+MZ_dummy_sib+MZ_dummy_DZ*weekday_effic_diff+MZ_dummy_sib*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_PSYCH_MZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     MZ_dummy_DZ + MZ_dummy_sib + MZ_dummy_DZ * weekday_effic_diff +  
##     MZ_dummy_sib * weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3675.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7198 -0.5539 -0.3474  0.5428  3.7236 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2388   0.4887  
##  Residual                  0.6064   0.7787  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                      -0.147107   0.057056 774.065911  -2.578
## fam_avg_weekday_effic            -0.002053   0.033525 980.604391  -0.061
## weekday_effic_diff                0.106911   0.100634 523.119633   1.062
## covid                            -0.046692   0.177538 970.178271  -0.263
## MZ_dummy_DZ                       0.080833   0.073713 771.496513   1.097
## MZ_dummy_sib                      0.144964   0.069719 832.316240   2.079
## weekday_effic_diff:MZ_dummy_DZ   -0.175214   0.120547 527.059613  -1.453
## weekday_effic_diff:MZ_dummy_sib  -0.114458   0.122808 539.758227  -0.932
##                                 Pr(>|t|)  
## (Intercept)                       0.0101 *
## fam_avg_weekday_effic             0.9512  
## weekday_effic_diff                0.2886  
## covid                             0.7926  
## MZ_dummy_DZ                       0.2732  
## MZ_dummy_sib                      0.0379 *
## weekday_effic_diff:MZ_dummy_DZ    0.1467  
## weekday_effic_diff:MZ_dummy_sib   0.3517  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  MZ__DZ MZ_dm_ w__:MZ__D
## fm_vg_wkdy_ -0.110                                             
## wkdy_ffc_df  0.002 -0.001                                      
## covid       -0.077  0.033  0.000                               
## MZ_dummy_DZ -0.771  0.076 -0.001  0.029                        
## MZ_dummy_sb -0.813  0.092 -0.001 -0.011  0.629                 
## wk__:MZ__DZ -0.002  0.002 -0.835  0.008 -0.001  0.001          
## wkdy__:MZ__  0.000 -0.008 -0.819  0.002  0.000  0.007  0.684
out<- weekday_effic_PSYCH_MZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Psychosis",
         model="Dummy MZ")

abcd_out<- rbind(abcd_out, out)

weekday_effic_PSYCH_DZ<- lmer(PSYCH_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+DZ_dummy_MZ+DZ_dummy_sib+DZ_dummy_MZ*weekday_effic_diff+DZ_dummy_sib*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_PSYCH_DZ)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     DZ_dummy_MZ + DZ_dummy_sib + DZ_dummy_MZ * weekday_effic_diff +  
##     DZ_dummy_sib * weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3675.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7198 -0.5539 -0.3474  0.5428  3.7236 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2388   0.4887  
##  Residual                  0.6064   0.7787  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                      -0.066274   0.046967 777.802825  -1.411
## fam_avg_weekday_effic            -0.002053   0.033525 980.604391  -0.061
## weekday_effic_diff               -0.068303   0.066366 536.257700  -1.029
## covid                            -0.046692   0.177538 970.178271  -0.263
## DZ_dummy_MZ                      -0.080833   0.073713 771.496513  -1.097
## DZ_dummy_sib                      0.064131   0.061883 854.849129   1.036
## weekday_effic_diff:DZ_dummy_MZ    0.175214   0.120547 527.059613   1.453
## weekday_effic_diff:DZ_dummy_sib   0.060756   0.096744 556.622847   0.628
##                                 Pr(>|t|)
## (Intercept)                        0.159
## fam_avg_weekday_effic              0.951
## weekday_effic_diff                 0.304
## covid                              0.793
## DZ_dummy_MZ                        0.273
## DZ_dummy_sib                       0.300
## weekday_effic_diff:DZ_dummy_MZ     0.147
## weekday_effic_diff:DZ_dummy_sib    0.530
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  DZ__MZ DZ_dm_ w__:DZ__M
## fm_vg_wkdy_ -0.015                                             
## wkdy_ffc_df -0.008  0.002                                      
## covid       -0.049  0.033  0.015                               
## DZ_dummy_MZ -0.633 -0.076  0.004 -0.029                        
## DZ_dummy_sb -0.755  0.013  0.005 -0.046  0.483                 
## wk__:DZ__MZ  0.005 -0.002 -0.551 -0.008 -0.001 -0.003          
## wkdy__:DZ__  0.006 -0.014 -0.686 -0.008 -0.002  0.006  0.378
out<- weekday_effic_PSYCH_DZ %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Psychosis",
         model="Dummy DZ")

abcd_out<- rbind(abcd_out, out)

weekday_effic_PSYCH_sib<- lmer(PSYCH_resid~fam_avg_weekday_effic+weekday_effic_diff+covid+sib_dummy_MZ+sib_dummy_DZ+sib_dummy_MZ*weekday_effic_diff+sib_dummy_DZ*weekday_effic_diff+(1|rel_family_id), data=abcd_all)
summary(weekday_effic_PSYCH_sib)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: PSYCH_resid ~ fam_avg_weekday_effic + weekday_effic_diff + covid +  
##     sib_dummy_MZ + sib_dummy_DZ + sib_dummy_MZ * weekday_effic_diff +  
##     sib_dummy_DZ * weekday_effic_diff + (1 | rel_family_id)
##    Data: abcd_all
## 
## REML criterion at convergence: 3675.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7198 -0.5539 -0.3474  0.5428  3.7236 
## 
## Random effects:
##  Groups        Name        Variance Std.Dev.
##  rel_family_id (Intercept) 0.2388   0.4887  
##  Residual                  0.6064   0.7787  
## Number of obs: 1384, groups:  rel_family_id, 899
## 
## Fixed effects:
##                                   Estimate Std. Error         df t value
## (Intercept)                      -0.002143   0.040580 969.399986  -0.053
## fam_avg_weekday_effic            -0.002053   0.033525 980.604391  -0.061
## weekday_effic_diff               -0.007546   0.070392 575.691279  -0.107
## covid                            -0.046692   0.177538 970.178271  -0.263
## sib_dummy_MZ                     -0.144964   0.069719 832.316239  -2.079
## sib_dummy_DZ                     -0.064131   0.061883 854.849129  -1.036
## weekday_effic_diff:sib_dummy_MZ   0.114458   0.122808 539.758227   0.932
## weekday_effic_diff:sib_dummy_DZ  -0.060756   0.096744 556.622847  -0.628
##                                 Pr(>|t|)  
## (Intercept)                       0.9579  
## fam_avg_weekday_effic             0.9512  
## weekday_effic_diff                0.9147  
## covid                             0.7926  
## sib_dummy_MZ                      0.0379 *
## sib_dummy_DZ                      0.3003  
## weekday_effic_diff:sib_dummy_MZ   0.3517  
## weekday_effic_diff:sib_dummy_DZ   0.5303  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) fm_v__ wkdy__ covid  sb__MZ sb__DZ w__:__M
## fm_vg_wkdy_  0.003                                           
## wkdy_ffc_df  0.019 -0.017                                    
## covid       -0.127  0.033  0.003                             
## sib_dmmy_MZ -0.575 -0.092 -0.010  0.011                      
## sib_dmmy_DZ -0.651 -0.013 -0.012  0.046  0.377               
## wkdy__:__MZ -0.011  0.008 -0.573 -0.002  0.007  0.007        
## wkdy__:__DZ -0.015  0.014 -0.728  0.008  0.007  0.006  0.417
out<- weekday_effic_PSYCH_sib %>% 
  tidy() %>%
  filter(effect=="fixed") %>%
  select(term, estimate, std.error, p.value) %>%
  mutate(sleep_trait_specific="Accelerometer Weekday Efficiency",
         sleep="Efficiency",
         Psychiatric="Psychosis",
         model="Dummy Sib")

abcd_out<- rbind(abcd_out, out)

write file

fwrite(abcd_out, "/Users/claire/Desktop/dissertation/cotwin_mendelian/ctc_results_abcd.csv", sep="\t")

model comparisons for ABCD

did not embed these in the model code chunks as I did for Colorado (though this is prob easier so here are all model comparisons for ABCD)

# int

anova(variability_int_pheno,variability_int)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## variability_int_pheno: INT_resid ~ variability + covid + (1 | rel_family_id)
## variability_int: INT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + (1 | rel_family_id)
##                       npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## variability_int_pheno    5 3412.7 3438.5 -1701.3   3402.7                     
## variability_int          6 3413.5 3444.4 -1700.8   3401.5 1.1652  1     0.2804
anova(weekend_dur_int_pheno,weekend_dur_int)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekend_dur_int_pheno: INT_resid ~ avg_weekend_dur + covid + (1 | rel_family_id)
## weekend_dur_int: INT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid + (1 | rel_family_id)
##                       npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## weekend_dur_int_pheno    5 3394.4 3420.2 -1692.2   3384.4                     
## weekend_dur_int          6 3393.7 3424.6 -1690.9   3381.7 2.7113  1    0.09964
##                        
## weekend_dur_int_pheno  
## weekend_dur_int       .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(weekday_dur_int_pheno,weekday_dur_int)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekday_dur_int_pheno: INT_resid ~ avg_weekday_dur + covid + (1 | rel_family_id)
## weekday_dur_int: INT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid + (1 | rel_family_id)
##                       npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## weekday_dur_int_pheno    5 3430.3 3456.1 -1710.2   3420.3                     
## weekday_dur_int          6 3430.3 3461.2 -1709.1   3418.3 2.0236  1     0.1549
anova(weekend_dur_MCQ_int_pheno,weekend_dur_MCQ_int)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekend_dur_MCQ_int_pheno: INT_resid ~ weekend_dur_mcq_wave_2 + (1 | rel_family_id)
## weekend_dur_MCQ_int: INT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + (1 | rel_family_id)
##                           npar    AIC    BIC  logLik deviance  Chisq Df
## weekend_dur_MCQ_int_pheno    4 5836.4 5859.1 -2914.2   5828.4          
## weekend_dur_MCQ_int          5 5833.9 5862.4 -2912.0   5823.9 4.4127  1
##                           Pr(>Chisq)  
## weekend_dur_MCQ_int_pheno             
## weekend_dur_MCQ_int          0.03567 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(weekday_dur_MCQ_int_pheno,weekday_dur_MCQ_int)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekday_dur_MCQ_int_pheno: INT_resid ~ weekday_dur_mcq_wave_2 + (1 | rel_family_id)
## weekday_dur_MCQ_int: INT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + (1 | rel_family_id)
##                           npar    AIC    BIC  logLik deviance  Chisq Df
## weekday_dur_MCQ_int_pheno    4 5835.0 5857.7 -2913.5   5827.0          
## weekday_dur_MCQ_int          5 5834.1 5862.5 -2912.0   5824.1 2.9354  1
##                           Pr(>Chisq)  
## weekday_dur_MCQ_int_pheno             
## weekday_dur_MCQ_int          0.08666 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(chrono_int_pheno,chrono_int)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## chrono_int_pheno: INT_resid ~ chronotype_wave_2 + (1 | rel_family_id)
## chrono_int: INT_resid ~ avg_chrono + chrono_diff + (1 | rel_family_id)
##                  npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## chrono_int_pheno    4 5153.8 5176.1 -2572.9   5145.8                     
## chrono_int          5 5155.5 5183.3 -2572.8   5145.5 0.3189  1     0.5723
anova(weekday_effic_int_pheno,weekday_dur_int)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekday_effic_int_pheno: INT_resid ~ avg_weekday_effic + covid + (1 | rel_family_id)
## weekday_dur_int: INT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid + (1 | rel_family_id)
##                         npar    AIC    BIC  logLik deviance Chisq Df Pr(>Chisq)
## weekday_effic_int_pheno    5 3424.9 3450.7 -1707.4   3414.9                    
## weekday_dur_int            6 3430.3 3461.2 -1709.1   3418.3     0  1          1
anova(jetlag_int_pheno,jetlag_int)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## jetlag_int_pheno: INT_resid ~ social_jet_lag_wave_2 + (1 | rel_family_id)
## jetlag_int: INT_resid ~ avg_jetlag + jetlag_diff + (1 | rel_family_id)
##                  npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)  
## jetlag_int_pheno    4 5835.0 5857.8 -2913.5   5827.0                       
## jetlag_int          5 5833.9 5862.3 -2911.9   5823.9 3.1409  1    0.07635 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# ext

anova(variability_EXT_pheno,variability_EXT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## variability_EXT_pheno: EXT_resid ~ variability + covid + (1 | rel_family_id)
## variability_EXT: EXT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + (1 | rel_family_id)
##                       npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## variability_EXT_pheno    5 3444.1 3469.8 -1717.0   3434.1                     
## variability_EXT          6 3442.2 3473.2 -1715.1   3430.2 3.8326  1    0.05026
##                        
## variability_EXT_pheno  
## variability_EXT       .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(weekend_dur_EXT_pheno,weekend_dur_EXT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekend_dur_EXT_pheno: EXT_resid ~ avg_weekend_dur + covid + (1 | rel_family_id)
## weekend_dur_EXT: EXT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid + (1 | rel_family_id)
##                       npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## weekend_dur_EXT_pheno    5 3423.9 3449.6 -1707.0   3413.9                     
## weekend_dur_EXT          6 3424.4 3455.2 -1706.2   3412.4 1.5575  1      0.212
anova(weekday_dur_EXT_pheno,weekday_dur_EXT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekday_dur_EXT_pheno: EXT_resid ~ avg_weekday_dur + covid + (1 | rel_family_id)
## weekday_dur_EXT: EXT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid + (1 | rel_family_id)
##                       npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## weekday_dur_EXT_pheno    5 3460.6 3486.4 -1725.3   3450.6                     
## weekday_dur_EXT          6 3460.0 3490.9 -1724.0   3448.0 2.6598  1     0.1029
anova(weekend_dur_MCQ_EXT_pheno,weekend_dur_MCQ_EXT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekend_dur_MCQ_EXT_pheno: EXT_resid ~ weekend_dur_mcq_wave_2 + (1 | rel_family_id)
## weekend_dur_MCQ_EXT: EXT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + (1 | rel_family_id)
##                           npar    AIC    BIC  logLik deviance  Chisq Df
## weekend_dur_MCQ_EXT_pheno    4 5910.7 5933.4 -2951.3   5902.7          
## weekend_dur_MCQ_EXT          5 5907.7 5936.1 -2948.9   5897.7 4.9298  1
##                           Pr(>Chisq)  
## weekend_dur_MCQ_EXT_pheno             
## weekend_dur_MCQ_EXT           0.0264 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(weekday_dur_MCQ_EXT_pheno,weekday_dur_MCQ_EXT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekday_dur_MCQ_EXT_pheno: EXT_resid ~ weekday_dur_mcq_wave_2 + (1 | rel_family_id)
## weekday_dur_MCQ_EXT: EXT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + (1 | rel_family_id)
##                           npar    AIC    BIC  logLik deviance  Chisq Df
## weekday_dur_MCQ_EXT_pheno    4 5903.4 5926.1 -2947.7   5895.4          
## weekday_dur_MCQ_EXT          5 5902.3 5930.7 -2946.2   5892.3 3.0435  1
##                           Pr(>Chisq)  
## weekday_dur_MCQ_EXT_pheno             
## weekday_dur_MCQ_EXT          0.08106 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(chrono_EXT_pheno,chrono_EXT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## chrono_EXT_pheno: EXT_resid ~ chronotype_wave_2 + (1 | rel_family_id)
## chrono_EXT: EXT_resid ~ avg_chrono + chrono_diff + (1 | rel_family_id)
##                  npar    AIC    BIC  logLik deviance Chisq Df Pr(>Chisq)
## chrono_EXT_pheno    4 5236.1 5258.3 -2614.1   5228.1                    
## chrono_EXT          5 5237.4 5265.2 -2613.7   5227.4 0.724  1     0.3948
anova(weekday_effic_EXT_pheno,weekday_dur_EXT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekday_effic_EXT_pheno: EXT_resid ~ avg_weekday_effic + covid + (1 | rel_family_id)
## weekday_dur_EXT: EXT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid + (1 | rel_family_id)
##                         npar    AIC    BIC  logLik deviance Chisq Df Pr(>Chisq)
## weekday_effic_EXT_pheno    5 3457.6 3483.4 -1723.8   3447.6                    
## weekday_dur_EXT            6 3460.0 3490.9 -1724.0   3448.0     0  1          1
anova(jetlag_EXT_pheno,jetlag_EXT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## jetlag_EXT_pheno: EXT_resid ~ social_jet_lag_wave_2 + (1 | rel_family_id)
## jetlag_EXT: EXT_resid ~ avg_jetlag + jetlag_diff + (1 | rel_family_id)
##                  npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## jetlag_EXT_pheno    4 5910.3 5933.1 -2951.2   5902.3                     
## jetlag_EXT          5 5912.3 5940.7 -2951.1   5902.3 0.0574  1     0.8107
# att

anova(variability_ATT_pheno,variability_ATT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## variability_ATT_pheno: ATT_resid ~ variability + covid + (1 | rel_family_id)
## variability_ATT: ATT_resid ~ avg_variabilitiy + variabiltiy_diff + covid + (1 | rel_family_id)
##                       npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## variability_ATT_pheno    5 3482.4 3508.1 -1736.2   3472.4                     
## variability_ATT          6 3483.5 3514.5 -1735.8   3471.5 0.8176  1     0.3659
anova(weekend_dur_ATT_pheno,weekend_dur_ATT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekend_dur_ATT_pheno: ATT_resid ~ avg_weekend_dur + covid + (1 | rel_family_id)
## weekend_dur_ATT: ATT_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid + (1 | rel_family_id)
##                       npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## weekend_dur_ATT_pheno    5 3455.9 3481.7 -1723.0   3445.9                     
## weekend_dur_ATT          6 3457.7 3488.5 -1722.8   3445.7 0.2946  1     0.5873
anova(weekday_dur_ATT_pheno,weekday_dur_ATT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekday_dur_ATT_pheno: ATT_resid ~ avg_weekday_dur + covid + (1 | rel_family_id)
## weekday_dur_ATT: ATT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid + (1 | rel_family_id)
##                       npar    AIC    BIC  logLik deviance Chisq Df Pr(>Chisq)  
## weekday_dur_ATT_pheno    5 3499.7 3525.4 -1744.8   3489.7                      
## weekday_dur_ATT          6 3496.2 3527.2 -1742.1   3484.2  5.41  1    0.02002 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(weekend_dur_MCQ_ATT_pheno,weekend_dur_MCQ_ATT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekend_dur_MCQ_ATT_pheno: ATT_resid ~ weekend_dur_mcq_wave_2 + (1 | rel_family_id)
## weekend_dur_MCQ_ATT: ATT_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + (1 | rel_family_id)
##                           npar    AIC    BIC  logLik deviance  Chisq Df
## weekend_dur_MCQ_ATT_pheno    4 5919.2 5941.9 -2955.6   5911.2          
## weekend_dur_MCQ_ATT          5 5920.6 5949.0 -2955.3   5910.6 0.5909  1
##                           Pr(>Chisq)
## weekend_dur_MCQ_ATT_pheno           
## weekend_dur_MCQ_ATT           0.4421
anova(weekday_dur_MCQ_ATT_pheno,weekday_dur_MCQ_ATT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekday_dur_MCQ_ATT_pheno: ATT_resid ~ weekday_dur_mcq_wave_2 + (1 | rel_family_id)
## weekday_dur_MCQ_ATT: ATT_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + (1 | rel_family_id)
##                           npar    AIC    BIC  logLik deviance  Chisq Df
## weekday_dur_MCQ_ATT_pheno    4 5918.7 5941.4 -2955.4   5910.7          
## weekday_dur_MCQ_ATT          5 5920.1 5948.5 -2955.1   5910.1 0.6227  1
##                           Pr(>Chisq)
## weekday_dur_MCQ_ATT_pheno           
## weekday_dur_MCQ_ATT             0.43
anova(chrono_ATT_pheno,chrono_ATT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## chrono_ATT_pheno: ATT_resid ~ chronotype_wave_2 + (1 | rel_family_id)
## chrono_ATT: ATT_resid ~ avg_chrono + chrono_diff + (1 | rel_family_id)
##                  npar    AIC    BIC  logLik deviance Chisq Df Pr(>Chisq)
## chrono_ATT_pheno    4 5199.0 5221.3 -2595.5   5191.0                    
## chrono_ATT          5 5198.9 5226.6 -2594.4   5188.9 2.185  1     0.1394
anova(weekday_effic_ATT_pheno,weekday_dur_ATT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekday_effic_ATT_pheno: ATT_resid ~ avg_weekday_effic + covid + (1 | rel_family_id)
## weekday_dur_ATT: ATT_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid + (1 | rel_family_id)
##                         npar    AIC    BIC  logLik deviance  Chisq Df
## weekday_effic_ATT_pheno    5 3499.4 3525.2 -1744.7   3489.4          
## weekday_dur_ATT            6 3496.2 3527.2 -1742.1   3484.2 5.1888  1
##                         Pr(>Chisq)  
## weekday_effic_ATT_pheno             
## weekday_dur_ATT            0.02273 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(jetlag_ATT_pheno,jetlag_ATT)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## jetlag_ATT_pheno: ATT_resid ~ social_jet_lag_wave_2 + (1 | rel_family_id)
## jetlag_ATT: ATT_resid ~ avg_jetlag + jetlag_diff + (1 | rel_family_id)
##                  npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## jetlag_ATT_pheno    4 5921.5 5944.2 -2956.8   5913.5                     
## jetlag_ATT          5 5923.5 5951.9 -2956.7   5913.5 0.0176  1     0.8943
# psych

anova(variability_PSYCH_pheno,variability_PSYCH)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## variability_PSYCH_pheno: PSYCH_resid ~ variability + covid + (1 | rel_family_id)
## variability_PSYCH: PSYCH_resid ~ avg_variabilitiy + variabiltiy_diff + covid + (1 | rel_family_id)
##                         npar    AIC    BIC  logLik deviance  Chisq Df
## variability_PSYCH_pheno    5 3652.2 3678.3 -1821.1   3642.2          
## variability_PSYCH          6 3653.0 3684.4 -1820.5   3641.0 1.1968  1
##                         Pr(>Chisq)
## variability_PSYCH_pheno           
## variability_PSYCH            0.274
anova(weekend_dur_PSYCH_pheno,weekend_dur_PSYCH)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekend_dur_PSYCH_pheno: PSYCH_resid ~ avg_weekend_dur + covid + (1 | rel_family_id)
## weekend_dur_PSYCH: PSYCH_resid ~ fam_avg_weekend_dur + weekend_dur_diff + covid + (1 | rel_family_id)
##                         npar    AIC    BIC  logLik deviance  Chisq Df
## weekend_dur_PSYCH_pheno    5 3607.5 3633.6 -1798.8   3597.5          
## weekend_dur_PSYCH          6 3609.1 3640.4 -1798.5   3597.1 0.4686  1
##                         Pr(>Chisq)
## weekend_dur_PSYCH_pheno           
## weekend_dur_PSYCH           0.4936
anova(weekday_dur_PSYCH_pheno,weekday_dur_PSYCH)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekday_dur_PSYCH_pheno: PSYCH_resid ~ avg_weekday_dur + covid + (1 | rel_family_id)
## weekday_dur_PSYCH: PSYCH_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid + (1 | rel_family_id)
##                         npar    AIC    BIC  logLik deviance  Chisq Df
## weekday_dur_PSYCH_pheno    5 3655.5 3681.7 -1822.7   3645.5          
## weekday_dur_PSYCH          6 3657.3 3688.7 -1822.7   3645.3 0.1412  1
##                         Pr(>Chisq)
## weekday_dur_PSYCH_pheno           
## weekday_dur_PSYCH           0.7071
anova(weekend_dur_MCQ_PSYCH_pheno,weekend_dur_MCQ_PSYCH)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekend_dur_MCQ_PSYCH_pheno: PSYCH_resid ~ weekend_dur_mcq_wave_2 + (1 | rel_family_id)
## weekend_dur_MCQ_PSYCH: PSYCH_resid ~ avg_weekend_dur_mcq + weekend_dur_mcq_diff + (1 | rel_family_id)
##                             npar    AIC    BIC  logLik deviance  Chisq Df
## weekend_dur_MCQ_PSYCH_pheno    4 7268.4 7292.0 -3630.2   7260.4          
## weekend_dur_MCQ_PSYCH          5 7269.2 7298.7 -3629.6   7259.2 1.2182  1
##                             Pr(>Chisq)
## weekend_dur_MCQ_PSYCH_pheno           
## weekend_dur_MCQ_PSYCH           0.2697
anova(weekday_dur_MCQ_PSYCH_pheno,weekday_dur_MCQ_PSYCH)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekday_dur_MCQ_PSYCH_pheno: PSYCH_resid ~ weekday_dur_mcq_wave_2 + (1 | rel_family_id)
## weekday_dur_MCQ_PSYCH: PSYCH_resid ~ avg_weekday_dur_mcq + weekday_dur_mcq_diff + (1 | rel_family_id)
##                             npar    AIC    BIC  logLik deviance  Chisq Df
## weekday_dur_MCQ_PSYCH_pheno    4 7211.1 7234.6 -3601.5   7203.1          
## weekday_dur_MCQ_PSYCH          5 7212.5 7241.9 -3601.2   7202.5 0.5992  1
##                             Pr(>Chisq)
## weekday_dur_MCQ_PSYCH_pheno           
## weekday_dur_MCQ_PSYCH           0.4389
anova(chrono_PSYCH_pheno,chrono_PSYCH)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## chrono_PSYCH_pheno: PSYCH_resid ~ chronotype_wave_2 + (1 | rel_family_id)
## chrono_PSYCH: PSYCH_resid ~ avg_chrono + chrono_diff + (1 | rel_family_id)
##                    npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)  
## chrono_PSYCH_pheno    4 6306.5 6329.5 -3149.2   6298.5                       
## chrono_PSYCH          5 6304.4 6333.1 -3147.2   6294.4 4.1011  1    0.04286 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(weekday_effic_PSYCH_pheno,weekday_dur_PSYCH)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## weekday_effic_PSYCH_pheno: PSYCH_resid ~ avg_weekday_effic + covid + (1 | rel_family_id)
## weekday_dur_PSYCH: PSYCH_resid ~ fam_avg_weekday_dur + weekday_dur_diff + covid + (1 | rel_family_id)
##                           npar    AIC    BIC  logLik deviance  Chisq Df
## weekday_effic_PSYCH_pheno    5 3663.1 3689.3 -1826.5   3653.1          
## weekday_dur_PSYCH            6 3657.3 3688.7 -1822.7   3645.3 7.7402  1
##                           Pr(>Chisq)   
## weekday_effic_PSYCH_pheno              
## weekday_dur_PSYCH           0.005401 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(jetlag_PSYCH_pheno,jetlag_PSYCH)
## refitting model(s) with ML (instead of REML)
## Data: abcd_all
## Models:
## jetlag_PSYCH_pheno: PSYCH_resid ~ social_jet_lag_wave_2 + (1 | rel_family_id)
## jetlag_PSYCH: PSYCH_resid ~ avg_jetlag + jetlag_diff + (1 | rel_family_id)
##                    npar    AIC    BIC  logLik deviance  Chisq Df Pr(>Chisq)
## jetlag_PSYCH_pheno    4 7267.3 7290.9 -3629.7   7259.3                     
## jetlag_PSYCH          5 7268.5 7297.9 -3629.2   7258.5 0.8469  1     0.3574

getting simple effects for two model comparisons:

## weekday effic on att

# want avg of DZ and sib

summary(weekday_effic_ATT_zyg)
summary(weekday_effic_ATT_DZ)
summary(weekday_effic_ATT_sib)

# y = -.24-.003between-.183within-.478covid-.011sibDZ_vs_MZ+.104siv_vs_DZ+.357win_X_sibDZ_MZ+.114win_X_sib_DZ

### rearrange

# simple slope = -.183within+.357win_X_sibDZ_MZ+.114win_X_sib_DZ

# = (-.183+.357sibDZ_MZ+.114sib_DZ)within

# sib:

-.183 +.357*(-1/3)+.114*(-1/2)

# = -.359

# DZ

-.183 +.357*(-1/3)+.114*(1/2)

# = -.245

(-.245+-.359)/2


# -.302


summary(chrono_EXT_DZ)
summary(chrono_EXT_sib)


(-0.08546-0.42456)/2

zygosity interaction plots

variable MZ DZ sib
sibDZ_MZ 2/3 -1/3 -1/3
sib_DZ 0 1/2 -1/2
p<- plot_model(chrono_EXT_zyg, type = "pred", terms = c("chrono_diff","sibDZ_MZ[-0.333333333333333, 0.666666666666667]"), 
           title="Effect of the interaction between within-family \nchronotype differences and MZs vs DZs & siblings on externalizing",
           legend.title = "DZ & sibs (-0.33) vs MZ (0.67)")

(p<- p + xlab("Within-family chronotype differences") +
  ylab("Externalizing"))

ggsave(plot = p,filename = "/Users/claire/Desktop/dissertation/figs/ABCD_CHRONO_EXT_INTERACT.png", width = 7, height = 5, units = "in")
p<- plot_model(jetlag_int_zyg, type = "pred", terms = c("jetlag_diff","sibDZ_MZ[-0.333333333333333, 0.666666666666667]"), 
           title="Effect of the interaction between within-family \nsocial jet lag differences and MZs vs DZs & siblings on internalizing",
           legend.title = "DZ & sibs (-0.33) vs MZ (0.67)")

(p<- p + xlab("Within-family social jet lag differences") +
  ylab("Internalizing"))

ggsave(plot = p,filename = "/Users/claire/Desktop/dissertation/figs/ABCD_JETLAG_INT_INTERACT.png", width = 7, height = 5, units = "in")
p<- plot_model(jetlag_EXT_zyg, type = "pred", terms = c("jetlag_diff","sibDZ_MZ[-0.333333333333333, 0.666666666666667]"), 
           title="Effect of the interaction between within-family \nsocial jet lag differences and MZs vs DZs & siblings on externalizing",
           legend.title = "DZ & sibs(-0.33) vs MZ (0.67)")

(p<- p + xlab("Within-family social jet lag differences") +
  ylab("Externalizing"))

ggsave(plot = p,filename = "/Users/claire/Desktop/dissertation/figs/ABCD_JETLAG_EXT_INTERACT.png", width = 7, height = 5, units = "in")
p<- plot_model(jetlag_int_zyg, type = "pred", terms = c("jetlag_diff","sib_DZ[-0.5,0, 0.5]"), 
           title="Effect of the interaction between within-family \nsocial jet lag differences and MZs vs DZs & siblings on internalizing",
           legend.title = "DZ (0.5) vs sib(-0.5) \nMZ (0)")

(p<- p + xlab("Within-family social jet lag differences") +
  ylab("Internalizing"))

ggsave(plot = p,filename = "/Users/claire/Desktop/dissertation/figs/ABCD_JETLAG_INT_INTERACT2.png", width = 7, height = 5, units = "in")
p<- plot_model(jetlag_EXT_zyg, type = "pred", terms = c("jetlag_diff","sib_DZ[-0.5,0, 0.5]"), 
           title="Effect of the interaction between within-family \nsocial jet lag differences and siblings vs DZs on externalizing",
           legend.title = "DZ (0.5) vs sib(-0.5) \nMZ (0)")

(p<- p + xlab("Within-family social jet lag differences") +
  ylab("Externalizing"))

ggsave(plot = p,filename = "/Users/claire/Desktop/dissertation/figs/ABCD_JETLAG_EXT_INTERACT2.png", width = 7, height = 5, units = "in")
p<- plot_model(jetlag_ATT_zyg, type = "pred", terms = c("jetlag_diff","sib_DZ[-0.5,0, 0.5]"), 
           title="Effect of the interaction between within-family \nsocial jet lag differences and siblings vs DZs on attention problems",
           legend.title = "DZ (0.5) vs sib(-0.5) \nMZ (0)")

(p<- p + xlab("Within-family social jet lag differences") +
  ylab("Attention problems"))

ggsave(plot = p,filename = "/Users/claire/Desktop/dissertation/figs/ABCD_JETLAG_ATT_INTERACT2.png", width = 7, height = 5, units = "in")
p<- plot_model(weekend_effic_PSYCH_zyg, type = "pred", terms = c("weekend_effic_diff","sibDZ_MZ[-0.333333333333333, 0.666666666666667]"), 
           title="Effect of the interaction between within-family \nweekend efficiency differences and MZs vs DZs & \nsiblings on psychosis",
           legend.title = "DZ & sibs(-1/3) vs MZ(2/3)")

(p<- p + xlab("Within-family weekend efficiency differences") +
  ylab("Psychosis"))

ggsave(plot = p,filename = "/Users/claire/Desktop/dissertation/figs/ABCD_WEEKEND_EFFIC_PSYCH_INTERACT.png", width = 7, height = 5, units = "in")
p<- plot_model(weekend_effic_PSYCH_zyg, type = "pred", terms = c("weekend_effic_diff","sib_DZ[-0.5,0, 0.5]"), 
           title="Effect of the interaction between within-family \nweekend efficiency differences and siblings vs DZs on psychosis",
           legend.title = "DZ (0.5) vs sib(-0.5) \nMZ (0)")

(p<- p + xlab("Within-family weekend efficiency differences") +
  ylab("Psychosis"))

ggsave(plot = p,filename = "/Users/claire/Desktop/dissertation/figs/ABCD_WEEKEND_EFFIC_PSYCH_INTERACT2.png", width = 7, height = 5, units = "in")
p<- plot_model(weekday_effic_ATT_zyg, type = "pred", terms = c("weekday_effic_diff","sibDZ_MZ[-0.333333333333333, 0.666666666666667]"), 
           title="Effect of the interaction between within-family \nweekday efficiency differences and MZs vs DZs & \nsiblings on attention problems",
           legend.title = "DZ & sibs(-1/3) vs MZ(2/3)")

(p<- p + xlab("Within-family weekend efficiency differences") +
  ylab("Attention problems"))

ggsave(plot = p,filename = "/Users/claire/Desktop/dissertation/figs/ABCD_WEEKEND_EFFIC_ATT_INTERACT.png", width = 7, height = 5, units = "in")
p<- plot_model(weekday_dur_PSYCH_zyg, type = "pred", terms = c("weekday_dur_diff","sib_DZ[-0.5,0, 0.5]"), 
           title="Effect of the interaction between within-family \nweekday duration differences and siblings vs DZs on psychosis",
           legend.title = "DZ (0.5) vs sib(-0.5) \nMZ (0)")

(p<- p + xlab("Within-family weekday duration differences") +
  ylab("Psychosis"))

ggsave(plot = p,filename = "/Users/claire/Desktop/dissertation/figs/ABCD_WEEKDAY_DUR_PSYCH_INTERACT.png", width = 7, height = 5, units = "in")
psych::describe(abcd_all)
##                                 vars     n    mean      sd  median trimmed
## subjectkey*                        1 10418 5209.50 3007.56 5209.50 5209.50
## eventname_wave_2.x*                2 10418    1.97    0.18    2.00    2.00
## weekend_dur_mcq_wave_2             3 10054    0.00    1.00    0.09    0.05
## weekday_dur_mcq_wave_2             4 10054    0.00    1.00    0.15    0.07
## chronotype_wave_2                  5  8771    0.00    1.00   -0.63    0.00
## social_jet_lag_wave_2              6 10054    0.00    1.00   -0.20   -0.10
## eventname.x*                       7 10418    1.49    0.58    1.00    1.45
## avg_weekend_dur                    8  4755    0.00    1.00    0.10    0.06
## avg_weekday_dur                    9  4793    0.00    1.00    0.07    0.05
## avg_weekend_effic                 10  4755    0.00    1.00    0.25    0.15
## avg_weekday_effic                 11  4793    0.00    1.00    0.22    0.13
## variability                       12  4788    0.00    1.00   -0.21   -0.11
## eventname_wave_2.y*               13 10418    2.00    0.02    2.00    2.00
## interview_age_wave_2              14 10414  144.04    7.95  144.00  143.94
## sex_wave_2*                       15 10418    2.52    0.50    3.00    2.53
## cbcl_scr_syn_attention_r_wave_2   16  8085    2.70    3.31    1.00    2.09
## cbcl_scr_syn_internal_r_wave_2    17  8085    4.94    5.62    3.00    3.91
## cbcl_scr_syn_external_r_wave_2    18  8085    3.93    5.52    2.00    2.77
## visit_wave_2*                     19 10418    2.00    0.02    2.00    2.00
## total_score_wave_2                20 10414    1.56    2.79    0.00    0.88
## distress_score_wave_2             21 10414    1.99    5.30    0.00    0.66
## rel_family_id                     22  2963 6073.81 3469.91 5897.00 6023.14
## zyg                               23  2963    2.33    0.79    3.00    2.41
## matched_subject*                  24 10418  105.77  303.70    1.00   12.43
## rel_relationship                  25  2963    1.47    0.50    1.00    1.46
## twin                              26  1396    1.50    0.50    1.50    1.50
## eventname.y*                      27 10190    1.00    0.00    1.00    1.00
## sex*                              28 10190    1.52    0.50    2.00    1.53
## race_ethnicity                    29 10187    2.01    1.33    1.00    1.76
## fam_avg_weekend_dur               30  9270   -0.01    0.40   -0.02   -0.02
## weekend_dur_diff                  31  4755    0.00    0.88    0.00    0.04
## fam_avg_weekday_dur               32  9282   -0.01    0.41   -0.02   -0.02
## weekday_dur_diff                  33  4793    0.00    0.87    0.00    0.03
## avg_weekend_dur_mcq               34 10408    0.00    0.40   -0.01   -0.01
## weekend_dur_mcq_diff              35 10054    0.00    0.92    0.04    0.04
## avg_weekday_dur_mcq               36 10408    0.00    0.43    0.00    0.01
## weekday_dur_mcq_diff              37 10054    0.00    0.90    0.07    0.06
## fam_avg_weekend_effic             38  9270   -0.01    0.33   -0.03   -0.03
## weekend_effic_diff                39  4755    0.00    0.92    0.08    0.12
## fam_avg_weekday_effic             40  9282   -0.01    0.37   -0.02   -0.02
## weekday_effic_diff                41  4793    0.00    0.90    0.07    0.10
## avg_variabilitiy                  42  9282    0.01    0.41    0.01    0.01
## variabiltiy_diff                  43  4788    0.00    0.88   -0.02   -0.08
## avg_chrono                        44 10285    0.00    0.45   -0.02   -0.02
## chrono_diff                       45  8771    0.00    0.90    0.00    0.00
## avg_jetlag                        46 10408    0.00    0.45    0.01   -0.01
## jetlag_diff                       47 10054    0.00    0.90   -0.08   -0.08
## sibDZ_MZ                          48  2963   -0.13    0.40   -0.33   -0.20
## sib_DZ                            49  2963   -0.13    0.43   -0.50   -0.16
## MZ_dummy_DZ                       50  2963    0.27    0.44    0.00    0.21
## MZ_dummy_sib                      51  2963    0.53    0.50    1.00    0.54
## DZ_dummy_MZ                       52  2963    0.20    0.40    0.00    0.13
## DZ_dummy_sib                      53  2963    0.53    0.50    1.00    0.54
## sib_dummy_MZ                      54  2963    0.20    0.40    0.00    0.13
## sib_dummy_DZ                      55  2963    0.27    0.44    0.00    0.21
## caff_intake                       56 10317    1.95    5.12    0.60    0.99
## pubertal_score                    57  9797    2.60    1.07    3.00    2.61
## race_ethnicity_fact*              58 10187    2.01    1.33    1.00    1.76
## int_SQRT                          59  8085    1.83    1.27    1.73    1.76
## ext_SQRT                          60  8085    1.48    1.32    1.41    1.34
## att_SQRT                          61  8085    1.22    1.10    1.00    1.13
## psychosis_SQRT                    62 10414    0.75    1.00    0.00    0.58
## INT_resid                         63  7468    0.00    1.00   -0.03   -0.04
## EXT_resid                         64  7468    0.00    1.00   -0.10   -0.09
## ATT_resid                         65  7468    0.00    1.00    0.01   -0.06
## PSYCH_resid                       66  9513    0.00    1.00   -0.52   -0.13
## covid                             67  4793    0.02    0.15    0.00    0.00
##                                     mad    min      max    range   skew
## subjectkey*                     3861.43   1.00 10418.00 10417.00   0.00
## eventname_wave_2.x*                0.00   1.00     2.00     1.00  -5.28
## weekend_dur_mcq_wave_2             0.77  -4.86     2.96     7.82  -0.65
## weekday_dur_mcq_wave_2             0.79  -5.69     4.56    10.25  -1.03
## chronotype_wave_2                  0.81  -1.35     1.30     2.65   0.06
## social_jet_lag_wave_2              0.77  -8.60     6.27    14.87   0.69
## eventname.x*                       0.00   1.00     4.00     3.00   1.04
## avg_weekend_dur                    0.86  -6.42     5.25    11.66  -0.77
## avg_weekday_dur                    0.90  -5.90     3.40     9.30  -0.59
## avg_weekend_effic                  0.64 -14.66     1.16    15.82  -3.65
## avg_weekday_effic                  0.72 -13.15     1.54    14.69  -2.99
## variability                        0.90  -1.92     5.62     7.54   1.10
## eventname_wave_2.y*                0.00   1.00     2.00     1.00 -51.00
## interview_age_wave_2              10.38 127.00   168.00    41.00   0.11
## sex_wave_2*                        0.00   1.00     3.00     2.00  -0.10
## cbcl_scr_syn_attention_r_wave_2    1.48   0.00    19.00    19.00   1.51
## cbcl_scr_syn_internal_r_wave_2     4.45   0.00    50.00    50.00   2.04
## cbcl_scr_syn_external_r_wave_2     2.97   0.00    50.00    50.00   2.51
## visit_wave_2*                      0.00   1.00     2.00     1.00 -51.00
## total_score_wave_2                 0.00   0.00    21.00    21.00   2.56
## distress_score_wave_2              0.00   0.00    69.00    69.00   4.59
## rel_family_id                   3891.82   1.00 11880.00 11879.00   0.16
## zyg                                0.00   1.00     3.00     2.00  -0.65
## matched_subject*                   0.00   1.00  1478.00  1477.00   3.01
## rel_relationship                   0.00   1.00     3.00     2.00   0.14
## twin                               0.74   1.00     2.00     1.00   0.00
## eventname.y*                       0.00   1.00     1.00     0.00    NaN
## sex*                               0.00   1.00     2.00     1.00  -0.09
## race_ethnicity                     0.00   1.00     5.00     4.00   1.11
## fam_avg_weekend_dur                0.00  -3.93     2.53     6.46  -1.38
## weekend_dur_diff                   0.65  -6.39     5.27    11.66  -0.82
## fam_avg_weekday_dur                0.00  -3.94     2.76     6.70  -1.26
## weekday_dur_diff                   0.66  -5.88     3.42     9.30  -0.67
## avg_weekend_dur_mcq                0.00  -4.53     2.63     7.16  -0.46
## weekend_dur_mcq_diff               0.70  -4.84     2.98     7.82  -0.66
## avg_weekday_dur_mcq                0.00  -4.28     2.44     6.72  -1.83
## weekday_dur_mcq_diff               0.69  -5.69     4.21     9.90  -1.02
## fam_avg_weekend_effic              0.00  -6.25     1.16     7.41  -3.48
## weekend_effic_diff                 0.61 -14.63     3.13    17.76  -4.19
## fam_avg_weekday_effic              0.00  -6.18     1.54     7.73  -4.19
## weekday_effic_diff                 0.64 -13.13     4.33    17.46  -3.39
## avg_variabilitiy                   0.00  -1.71     4.15     5.87   2.51
## variabiltiy_diff                   0.72  -2.41     5.60     8.01   1.15
## avg_chrono                         0.00  -1.29     1.21     2.50   0.29
## chrono_diff                        1.46  -1.33     1.32     2.65   0.10
## avg_jetlag                         0.00  -4.71     4.61     9.32   1.43
## jetlag_diff                        0.69  -8.42     6.26    14.68   0.80
## sibDZ_MZ                           0.00  -0.33     0.67     1.00   1.47
## sib_DZ                             0.00  -0.50     0.50     1.00   0.53
## MZ_dummy_DZ                        0.00   0.00     1.00     1.00   1.05
## MZ_dummy_sib                       0.00   0.00     1.00     1.00  -0.12
## DZ_dummy_MZ                        0.00   0.00     1.00     1.00   1.47
## DZ_dummy_sib                       0.00   0.00     1.00     1.00  -0.12
## sib_dummy_MZ                       0.00   0.00     1.00     1.00   1.47
## sib_dummy_DZ                       0.00   0.00     1.00     1.00   1.05
## caff_intake                        0.89   0.00   116.00   116.00   9.48
## pubertal_score                     1.48   1.00     5.00     4.00  -0.09
## race_ethnicity_fact*               0.00   1.00     5.00     4.00   1.11
## int_SQRT                           1.09   0.00     7.07     7.07   0.36
## ext_SQRT                           1.83   0.00     7.07     7.07   0.67
## att_SQRT                           1.48   0.00     4.36     4.36   0.35
## psychosis_SQRT                     0.00   0.00     4.58     4.58   1.10
## INT_resid                          0.96  -2.02     4.04     6.05   0.36
## EXT_resid                          1.26  -2.47     4.09     6.56   0.66
## ATT_resid                          1.36  -2.16     3.17     5.33   0.33
## PSYCH_resid                        0.66  -2.23     3.93     6.15   1.05
## covid                              0.00   0.00     1.00     1.00   6.13
##                                 kurtosis    se
## subjectkey*                        -1.20 29.47
## eventname_wave_2.x*                25.85  0.00
## weekend_dur_mcq_wave_2              1.82  0.01
## weekday_dur_mcq_wave_2              3.40  0.01
## chronotype_wave_2                  -1.94  0.01
## social_jet_lag_wave_2               7.04  0.01
## eventname.x*                        1.96  0.01
## avg_weekend_dur                     2.31  0.01
## avg_weekday_dur                     1.22  0.01
## avg_weekend_effic                  28.57  0.01
## avg_weekday_effic                  21.24  0.01
## variability                         1.51  0.01
## eventname_wave_2.y*              2599.00  0.00
## interview_age_wave_2               -0.98  0.08
## sex_wave_2*                        -1.97  0.00
## cbcl_scr_syn_attention_r_wave_2     2.08  0.04
## cbcl_scr_syn_internal_r_wave_2      5.60  0.06
## cbcl_scr_syn_external_r_wave_2      8.50  0.06
## visit_wave_2*                    2599.00  0.00
## total_score_wave_2                  7.56  0.03
## distress_score_wave_2              28.10  0.05
## rel_family_id                      -1.07 63.75
## zyg                                -1.11  0.01
## matched_subject*                    8.01  2.98
## rel_relationship                   -1.90  0.01
## twin                               -2.00  0.01
## eventname.y*                         NaN  0.00
## sex*                               -1.99  0.00
## race_ethnicity                      0.03  0.01
## fam_avg_weekend_dur                19.71  0.00
## weekend_dur_diff                    3.86  0.01
## fam_avg_weekday_dur                17.46  0.00
## weekday_dur_diff                    2.58  0.01
## avg_weekend_dur_mcq                12.93  0.00
## weekend_dur_mcq_diff                2.47  0.01
## avg_weekday_dur_mcq                16.58  0.00
## weekday_dur_mcq_diff                4.18  0.01
## fam_avg_weekend_effic              46.32  0.00
## weekend_effic_diff                 38.65  0.01
## fam_avg_weekday_effic              50.89  0.00
## weekday_effic_diff                 29.97  0.01
## avg_variabilitiy                   20.70  0.00
## variabiltiy_diff                    2.58  0.01
## avg_chrono                          2.18  0.00
## chrono_diff                        -1.68  0.01
## avg_jetlag                         20.19  0.00
## jetlag_diff                         7.83  0.01
## sibDZ_MZ                            0.17  0.01
## sib_DZ                             -1.43  0.01
## MZ_dummy_DZ                        -0.90  0.01
## MZ_dummy_sib                       -1.99  0.01
## DZ_dummy_MZ                         0.17  0.01
## DZ_dummy_sib                       -1.99  0.01
## sib_dummy_MZ                        0.17  0.01
## sib_dummy_DZ                       -0.90  0.01
## caff_intake                       131.87  0.05
## pubertal_score                     -1.04  0.01
## race_ethnicity_fact*                0.03  0.01
## int_SQRT                           -0.13  0.01
## ext_SQRT                            0.01  0.01
## att_SQRT                           -0.97  0.01
## psychosis_SQRT                      0.26  0.01
## INT_resid                          -0.10  0.01
## EXT_resid                           0.08  0.01
## ATT_resid                          -0.89  0.01
## PSYCH_resid                         0.36  0.01
## covid                              35.63  0.00