Sleep Disturbances and Cognition, Behavior, and Brain Structure in Children With mTBI.
The 3 matches
- [1] § Methods › Statistical Analysis › Main Analysis ↔ Sleep_Paper_3_Summary_Scores.R, lines 362–445 · score 0.66 · linear mixed, sleep trajectories, exploratory, models, onset, subscales
- [2] § Methods › Sample ↔ Sleep_Paper_1_SampleMeasures.R, lines 300–343 · score 0.61 · broken bones, OI controls, history, matched, income, mTBI
- [3] § Methods › Statistical Analysis › Main Analysis ↔ Sleep_Paper_2_Bootstrapping_Analysis.R, lines 411–455 · score 0.53 · linear mixed, sleep trajectories, models, mTBI, behavior, FA
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
R · 445 lines · 51 KB · MIT · 1 match
- ################### ################### ################### ###################
- #Summary Scores: Means and 95% Confidence Intervals across Iterations
- ################### ################### ################### ###################
- df_groupcomp <- data.frame(groupcomp.mtrx)
- summary_groupcomp <- data.frame(
- Comparison = c("OI-mTBI", "TDC-mTBI", "TDC-OI"),
- mean = c(mean(df_groupcomp$X1), mean(df_groupcomp$X2), mean(df_groupcomp$X3)),
- lower = c(quantile(na.rm=TRUE,df_groupcomp$X1, prob=0.025), quantile(na.rm=TRUE,df_groupcomp$X2, prob=0.025), quantile(na.rm=TRUE,df_groupcomp$X3, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_groupcomp$X1, prob=0.975), quantile(na.rm=TRUE,df_groupcomp$X2, prob=0.975), quantile(na.rm=TRUE,df_groupcomp$X3, prob=0.975))
- )
- df_groupcomp_means <- data.frame(groupcomp.mtrx.means)
- summary_groupcomp_means <- data.frame(
- Group = c("mTBI", "OI", "TDC"),
- mean = c(mean(df_groupcomp_means$X1), mean(df_groupcomp_means$X2), mean(df_groupcomp_means$X3)),
- lower = c(quantile(na.rm=TRUE,df_groupcomp_means$X1, prob=0.025), quantile(na.rm=TRUE,df_groupcomp_means$X2, prob=0.025), quantile(na.rm=TRUE,df_groupcomp_means$X3, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_groupcomp_means$X1, prob=0.975), quantile(na.rm=TRUE,df_groupcomp_means$X2, prob=0.975), quantile(na.rm=TRUE,df_groupcomp_means$X3, prob=0.975))
- )
- df_traj <- data.frame(traj.mtrx)
- summary_traj <- data.frame(
- Comparison = c("Improving - Chronic", "New Onset - Chronic", "Normal - Chronic", "New Onset - Improving", "Normal - Improving", "Normal - New Onset"),
- mean = c(mean(df_traj$X1), mean(df_traj$X2), mean(df_traj$X3), mean(df_traj$X4), mean(df_traj$X5), mean(df_traj$X6)),
- lower = c(quantile(na.rm=TRUE,df_traj$X1, prob=0.025), quantile(na.rm=TRUE,df_traj$X2, prob=0.025), quantile(na.rm=TRUE,df_traj$X3, prob=0.025), quantile(na.rm=TRUE,df_traj$X4, prob=0.025), quantile(na.rm=TRUE,df_traj$X5, prob=0.025), quantile(na.rm=TRUE,df_traj$X6, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_traj$X1, prob=0.975), quantile(na.rm=TRUE,df_traj$X2, prob=0.975), quantile(na.rm=TRUE,df_traj$X3, prob=0.975), quantile(na.rm=TRUE,df_traj$X4, prob=0.975), quantile(na.rm=TRUE,df_traj$X5, prob=0.975), quantile(na.rm=TRUE,df_traj$X6, prob=0.975))
- )
- ###################
- #Summary Scores: differences in outcomes between the groups
- ###################
- df_thk <- data.frame(coef.mtrx.thk)
- summary_thk <- data.frame(
- variable = c("Thickness", "Thickness"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_thk$X1), mean(df_thk$X2)),
- lower = c(quantile(na.rm=TRUE,df_thk$X1, prob=0.025), quantile(na.rm=TRUE,df_thk$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_thk$X1, prob=0.975), quantile(na.rm=TRUE,df_thk$X2, prob=0.975))
- )
- df_vol <- data.frame(coef.mtrx.vol)
- summary_vol <- data.frame(
- variable = c("Volume", "Volume"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_vol$X1), mean(df_vol$X2)),
- lower = c(quantile(na.rm=TRUE,df_vol$X1, prob=0.025), quantile(na.rm=TRUE,df_vol$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_vol$X1, prob=0.975), quantile(na.rm=TRUE,df_vol$X2, prob=0.975))
- )
- df_fa <- data.frame(coef.mtrx.fa)
- summary_fa <- data.frame(
- variable = c("Fractional Anisotropy", "Fractional Anisotropy"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_fa$X1), mean(df_fa$X2)),
- lower = c(quantile(na.rm=TRUE,df_fa$X1, prob=0.025), quantile(na.rm=TRUE,df_fa$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_fa$X1, prob=0.975), quantile(na.rm=TRUE,df_fa$X2, prob=0.975))
- )
- summary_imaging <- bind_rows(summary_thk, summary_vol, summary_fa)
- df_thk_ES <- data.frame(coef.mtrx.thk.ES)
- summary_thk_ES <- data.frame(
- variable = c("Thickness", "Thickness"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_thk_ES$X1), mean(df_thk_ES$X2)),
- lower = c(quantile(na.rm=TRUE,df_thk_ES$X1, prob=0.025), quantile(na.rm=TRUE,df_thk_ES$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_thk_ES$X1, prob=0.975), quantile(na.rm=TRUE,df_thk_ES$X2, prob=0.975))
- )
- df_vol_ES <- data.frame(coef.mtrx.vol.ES)
- summary_vol_ES <- data.frame(
- variable = c("Volume", "Volume"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_vol_ES$X1), mean(df_vol_ES$X2)),
- lower = c(quantile(na.rm=TRUE,df_vol_ES$X1, prob=0.025), quantile(na.rm=TRUE,df_vol_ES$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_vol_ES$X1, prob=0.975), quantile(na.rm=TRUE,df_vol_ES$X2, prob=0.975))
- )
- df_fa_ES <- data.frame(coef.mtrx.fa.ES)
- summary_fa_ES <- data.frame(
- variable = c("Fractional Anisotropy", "Fractional Anisotropy"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_fa_ES$X1), mean(df_fa_ES$X2)),
- lower = c(quantile(na.rm=TRUE,df_fa_ES$X1, prob=0.025), quantile(na.rm=TRUE,df_fa_ES$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_fa_ES$X1, prob=0.975), quantile(na.rm=TRUE,df_fa_ES$X2, prob=0.975))
- )
- df_sleep <- data.frame(coef.mtrx.sleep)
- summary_sleep <- data.frame(
- variable = c("Sleep", "Sleep"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_sleep$X1), mean(df_sleep$X2)),
- lower = c(quantile(na.rm=TRUE,df_sleep$X1, prob=0.025), quantile(na.rm=TRUE,df_sleep$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep$X1, prob=0.975), quantile(na.rm=TRUE,df_sleep$X2, prob=0.975))
- )
- df_cbcl <- data.frame(coef.mtrx.cbcl)
- summary_cbcl <- data.frame(
- variable = c("Behavior Problems", "Behavior Problems"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_cbcl$X1), mean(df_cbcl$X2)),
- lower = c(quantile(na.rm=TRUE,df_cbcl$X1, prob=0.025), quantile(na.rm=TRUE,df_cbcl$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_cbcl$X1, prob=0.975), quantile(na.rm=TRUE,df_cbcl$X2, prob=0.975))
- )
- df_cog <- data.frame(coef.mtrx.cog)
- summary_cog <- data.frame(
- variable = c("Cognition", "Cognition"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_cog$X1), mean(df_cog$X2)),
- lower = c(quantile(na.rm=TRUE,df_cog$X1, prob=0.025), quantile(na.rm=TRUE,df_cog$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_cog$X1, prob=0.975), quantile(na.rm=TRUE,df_cog$X2, prob=0.975))
- )
- df_sleep_ES <- data.frame(coef.mtrx.sleep.ES)
- summary_sleep_ES <- data.frame(
- variable = c("Sleep", "Sleep"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_sleep_ES$X1), mean(df_sleep_ES$X2)),
- lower = c(quantile(na.rm=TRUE,df_sleep_ES$X1, prob=0.025), quantile(na.rm=TRUE,df_sleep_ES$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_ES$X1, prob=0.975), quantile(na.rm=TRUE,df_sleep_ES$X2, prob=0.975))
- )
- df_cbcl_ES <- data.frame(coef.mtrx.cbcl.ES)
- summary_cbcl_ES <- data.frame(
- variable = c("Behavior Problems", "Behavior Problems"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_cbcl_ES$X1), mean(df_cbcl_ES$X2)),
- lower = c(quantile(na.rm=TRUE,df_cbcl_ES$X1, prob=0.025), quantile(na.rm=TRUE,df_cbcl_ES$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_cbcl_ES$X1, prob=0.975), quantile(na.rm=TRUE,df_cbcl_ES$X2, prob=0.975))
- )
- df_cog_ES <- data.frame(coef.mtrx.cog.ES)
- summary_cog_ES <- data.frame(
- variable = c("Cognition", "Cognition"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_cog_ES$X1), mean(df_cog_ES$X2)),
- lower = c(quantile(na.rm=TRUE,df_cog_ES$X1, prob=0.025), quantile(na.rm=TRUE,df_cog_ES$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_cog_ES$X1, prob=0.975), quantile(na.rm=TRUE,df_cog_ES$X2, prob=0.975))
- )
- summary_clinical <- bind_rows(summary_sleep, summary_cbcl, summary_cog)
- summary_ES <- bind_rows(summary_cbcl_ES,summary_cog_ES,summary_thk_ES, summary_vol_ES, summary_fa_ES)
- ###################
- #Summary Scores: Sensitivity: associations between sleep at follow-up and outcomes
- ###################
- df_sleep_CBCL <- data.frame(coef.mtrx.sleep_cbcl) %>% mutate(X1 = coef.mtrx.sleep_cbcl)
- summary_sleep_CBCL <- data.frame(
- Outcome = c("Behavior Problems"),
- Timepoint = c("Follow-Up"),
- mean = c(mean(df_sleep_CBCL$X1)),
- lower = c(quantile(na.rm=TRUE,df_sleep_CBCL$X1, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_CBCL$X1, prob=0.975))
- )
- df_sleep_cog <- data.frame(coef.mtrx.sleep_cog)%>% mutate(X1 = coef.mtrx.sleep_cog)
- summary_sleep_cog <- data.frame(
- Outcome = c("Cognition"),
- Timepoint = c("Follow-Up"),
- mean = c(mean(df_sleep_cog$X1)),
- lower = c(quantile(na.rm=TRUE,df_sleep_cog$X1, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_cog$X1, prob=0.975))
- )
- df_sleep_thk <- data.frame(coef.mtrx.sleep_thk)%>% mutate(X1 = coef.mtrx.sleep_thk)
- summary_sleep_thk <- data.frame(
- Outcome = c("Thickness"),
- Timepoint = c("Follow-Up"),
- mean = c(mean(df_sleep_thk$X1)),
- lower = c(quantile(na.rm=TRUE,df_sleep_thk$X1, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_thk$X1, prob=0.975))
- )
- df_sleep_vol <- data.frame(coef.mtrx.sleep_vol)%>% mutate(X1 = coef.mtrx.sleep_vol)
- summary_sleep_vol <- data.frame(
- Outcome = c("Volume"),
- Timepoint = c("Follow-Up"),
- mean = c(mean(df_sleep_vol$X1)),
- lower = c(quantile(na.rm=TRUE,df_sleep_vol$X1, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_vol$X1, prob=0.975))
- )
- df_sleep_fa <- data.frame(coef.mtrx.sleep_fa)%>% mutate(X1 = coef.mtrx.sleep_fa)
- summary_sleep_fa <- data.frame(
- Outcome = c("Fractional Anisotropy"),
- Timepoint = c("Follow-Up"),
- mean = c(mean(df_sleep_fa$X1)),
- lower = c(quantile(na.rm=TRUE,df_sleep_fa$X1, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_fa$X1, prob=0.975))
- )
- summary_sleep_2y <- bind_rows(summary_sleep_CBCL, summary_sleep_cog, summary_sleep_thk, summary_sleep_vol, summary_sleep_fa)
- ###################
- #Summary Scores: Sensitivity: associations between sleep at baseline and outcomes
- ###################
- df_sleep_CBCL_BL <- data.frame(coef.mtrx.sleep_cbcl_BL) %>% mutate(X1 = coef.mtrx.sleep_cbcl_BL)
- summary_sleep_CBCL_BL <- data.frame(
- Outcome = c("Behavior Problems"),
- Timepoint = c("Baseline"),
- mean = c(mean(df_sleep_CBCL_BL$X1)),
- lower = c(quantile(na.rm=TRUE,df_sleep_CBCL_BL$X1, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_CBCL_BL$X1, prob=0.975))
- )
- df_sleep_cog_BL <- data.frame(coef.mtrx.sleep_cog_BL)%>% mutate(X1 = coef.mtrx.sleep_cog_BL)
- summary_sleep_cog_BL <- data.frame(
- Outcome = c("Cognition"),
- Timepoint = c("Baseline"),
- mean = c(mean(df_sleep_cog_BL$X1)),
- lower = c(quantile(na.rm=TRUE,df_sleep_cog_BL$X1, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_cog_BL$X1, prob=0.975))
- )
- df_sleep_thk_BL <- data.frame(coef.mtrx.sleep_thk_BL)%>% mutate(X1 = coef.mtrx.sleep_thk_BL)
- summary_sleep_thk_BL <- data.frame(
- Outcome = c("Thickness"),
- Timepoint = c("Baseline"),
- mean = c(mean(df_sleep_thk_BL$X1)),
- lower = c(quantile(na.rm=TRUE,df_sleep_thk_BL$X1, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_thk_BL$X1, prob=0.975))
- )
- df_sleep_vol_BL <- data.frame(coef.mtrx.sleep_vol_BL)%>% mutate(X1 = coef.mtrx.sleep_vol_BL)
- summary_sleep_vol_BL <- data.frame(
- Outcome = c("Volume"),
- Timepoint = c("Baseline"),
- mean = c(mean(df_sleep_vol_BL$X1)),
- lower = c(quantile(na.rm=TRUE,df_sleep_vol_BL$X1, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_vol_BL$X1, prob=0.975))
- )
- df_sleep_fa_BL <- data.frame(coef.mtrx.sleep_fa_BL)%>% mutate(X1 = coef.mtrx.sleep_fa_BL)
- summary_sleep_fa_BL <- data.frame(
- Outcome = c("Fractional Anisotropy"),
- Timepoint = c("Baseline"),
- mean = c(mean(df_sleep_fa_BL$X1)),
- lower = c(quantile(na.rm=TRUE,df_sleep_fa_BL$X1, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_fa_BL$X1, prob=0.975))
- )
- summary_sleep_BL <- bind_rows(summary_sleep_CBCL_BL, summary_sleep_cog_BL, summary_sleep_thk_BL, summary_sleep_vol_BL, summary_sleep_fa_BL)
- ###################
- #Summary Scores: Sensitivity: Interaction effects between group and baseline sleep problems to predict follow-up outcomes
- ###################
- df_sleep_CBCL_int <- data.frame(coef.mtrx.sleep_cbcl_int)
- summary_sleep_CBCL_int <- data.frame(
- Outcome = c("Behavior Problems", "Behavior Problems"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_sleep_CBCL_int$X1), mean(df_sleep_CBCL_int$X2)),
- lower = c(quantile(na.rm=TRUE,df_sleep_CBCL_int$X1, prob=0.025), quantile(na.rm=TRUE,df_sleep_CBCL_int$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_CBCL_int$X1, prob=0.975), quantile(na.rm=TRUE,df_sleep_CBCL_int$X2, prob=0.975))
- )
- df_sleep_cog_int <- data.frame(coef.mtrx.sleep_cog_int)
- summary_sleep_cog_int <- data.frame(
- Outcome = c("Cognition", "Cognition"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_sleep_cog_int$X1), mean(df_sleep_cog_int$X2)),
- lower = c(quantile(na.rm=TRUE,df_sleep_cog_int$X1, prob=0.025), quantile(na.rm=TRUE,df_sleep_cog_int$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_cog_int$X1, prob=0.975), quantile(na.rm=TRUE,df_sleep_cog_int$X2, prob=0.975))
- )
- df_sleep_thk_int <- data.frame(coef.mtrx.sleep_thk_int)
- summary_sleep_thk_int <- data.frame(
- Outcome = c("Thickness", "Thickness"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_sleep_thk_int$X1), mean(df_sleep_thk_int$X2)),
- lower = c(quantile(na.rm=TRUE,df_sleep_thk_int$X1, prob=0.025), quantile(na.rm=TRUE,df_sleep_thk_int$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_thk_int$X1, prob=0.975), quantile(na.rm=TRUE,df_sleep_thk_int$X2, prob=0.975))
- )
- df_sleep_vol_int <- data.frame(coef.mtrx.sleep_vol_int)
- summary_sleep_vol_int <- data.frame(
- Outcome = c("Volume", "Volume"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_sleep_vol_int$X1), mean(df_sleep_vol_int$X2)),
- lower = c(quantile(na.rm=TRUE,df_sleep_vol_int$X1, prob=0.025), quantile(na.rm=TRUE,df_sleep_vol_int$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_vol_int$X1, prob=0.975), quantile(na.rm=TRUE,df_sleep_vol_int$X2, prob=0.975))
- )
- df_sleep_fa_int <- data.frame(coef.mtrx.sleep_fa_int)
- summary_sleep_fa_int <- data.frame(
- Outcome = c("Fractional Anisotropy", "Fractional Anisotropy"),
- Comparison = c("OI", "TDC"),
- mean = c(mean(df_sleep_fa_int$X1), mean(df_sleep_fa_int$X2)),
- lower = c(quantile(na.rm=TRUE,df_sleep_fa_int$X1, prob=0.025), quantile(na.rm=TRUE,df_sleep_fa_int$X2, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_fa_int$X1, prob=0.975), quantile(na.rm=TRUE,df_sleep_fa_int$X2, prob=0.975))
- )
- summary_sleep_int <- bind_rows(summary_sleep_CBCL_int, summary_sleep_cog_int, summary_sleep_thk_int, summary_sleep_vol_int, summary_sleep_fa_int)
- df_sleepoutcomes_ES <- data.frame(coef.mtrx.sleepoutcome.ES)
- summary_sleepoutcomes_ES <- data.frame(
- outcome = c("CBCL", "Cog", "Thk", "Vol", "FA"),
- mean = c(mean(df_sleepoutcomes_ES$X1), mean(df_sleepoutcomes_ES$X2), mean(df_sleepoutcomes_ES$X3), mean(df_sleepoutcomes_ES$X4), mean(df_sleepoutcomes_ES$X5)),
- lower = c(quantile(na.rm=TRUE,df_sleepoutcomes_ES$X1, prob=0.025), quantile(na.rm=TRUE,df_sleepoutcomes_ES$X2, prob=0.025), quantile(na.rm=TRUE,df_sleepoutcomes_ES$X3, prob=0.025), quantile(na.rm=TRUE,df_sleepoutcomes_ES$X4, prob=0.025), quantile(na.rm=TRUE,df_sleepoutcomes_ES$X5, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleepoutcomes_ES$X1, prob=0.975), quantile(na.rm=TRUE,df_sleepoutcomes_ES$X2, prob=0.975), quantile(na.rm=TRUE,df_sleepoutcomes_ES$X3, prob=0.975), quantile(na.rm=TRUE,df_sleepoutcomes_ES$X4, prob=0.975), quantile(na.rm=TRUE,df_sleepoutcomes_ES$X5, prob=0.975))
- )
- ###################
- #Summary Scores: associations of follow-up sleep TOTAL SCORE with follow-up outcomes
- ###################
- df_sleep_CBCL_TBI <- data.frame(coef.mtrx.sleep_cbcl_tbi)
- summary_sleep_CBCL_tbi <- data.frame(
- variable = c("Behavior Problems"),
- mean = c(mean(df_sleep_CBCL_TBI$coef.mtrx.sleep_cbcl_tbi)),
- lower = c(quantile(na.rm=TRUE,df_sleep_CBCL_TBI$coef.mtrx.sleep_cbcl_tbi, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_CBCL_TBI$coef.mtrx.sleep_cbcl_tbi, prob=0.975))
- )
- df_sleep_cog_TBI <- data.frame(coef.mtrx.sleep_cog_tbi)
- summary_sleep_cog_tbi <- data.frame(
- variable = c("Cognition"),
- mean = c(mean(df_sleep_cog_TBI$coef.mtrx.sleep_cog_tbi)),
- lower = c(quantile(na.rm=TRUE,df_sleep_cog_TBI$coef.mtrx.sleep_cog_tbi, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_cog_TBI$coef.mtrx.sleep_cog_tbi, prob=0.975))
- )
- df_sleep_thk_TBI <- data.frame(coef.mtrx.sleep_thk_tbi)
- summary_sleep_thk_tbi <- data.frame(
- variable = c("Thickness"),
- mean = c(mean(df_sleep_thk_TBI$coef.mtrx.sleep_thk_tbi)),
- lower = c(quantile(na.rm=TRUE,df_sleep_thk_TBI$coef.mtrx.sleep_thk_tbi, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_thk_TBI$coef.mtrx.sleep_thk_tbi, prob=0.975))
- )
- df_sleep_vol_TBI <- data.frame(coef.mtrx.sleep_vol_tbi)
- summary_sleep_vol_tbi <- data.frame(
- variable = c("Volume"),
- mean = c(mean(df_sleep_vol_TBI$coef.mtrx.sleep_vol_tbi)),
- lower = c(quantile(na.rm=TRUE,df_sleep_vol_TBI$coef.mtrx.sleep_vol_tbi, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_vol_TBI$coef.mtrx.sleep_vol_tbi, prob=0.975))
- )
- df_sleep_fa_TBI <- data.frame(coef.mtrx.sleep_fa_tbi)
- summary_sleep_fa_tbi <- data.frame(
- variable = c("Fractional Anisotropy"),
- mean = c(mean(df_sleep_fa_TBI$coef.mtrx.sleep_fa_tbi)),
- lower = c(quantile(na.rm=TRUE,df_sleep_fa_TBI$coef.mtrx.sleep_fa_tbi, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleep_fa_TBI$coef.mtrx.sleep_fa_tbi, prob=0.975))
- )
- summary_sleep_TBI <- bind_rows(summary_sleep_CBCL_tbi, summary_sleep_cog_tbi, summary_sleep_thk_tbi, summary_sleep_vol_tbi, summary_sleep_fa_tbi)
- df_sleepoutcomes_tbi_ES <- data.frame(coef.mtrx.sleepoutcome.tbi.ES)
- summary_sleepoutcomes_tbi_ES <- data.frame(
- outcome = c("CBCL", "Cog", "Thk", "Vol", "FA"),
- mean = c(mean(df_sleepoutcomes_tbi_ES$X1), mean(df_sleepoutcomes_tbi_ES$X2), mean(df_sleepoutcomes_tbi_ES$X3), mean(df_sleepoutcomes_tbi_ES$X4), mean(df_sleepoutcomes_tbi_ES$X5)),
- lower = c(quantile(na.rm=TRUE,df_sleepoutcomes_tbi_ES$X1, prob=0.025), quantile(na.rm=TRUE,df_sleepoutcomes_tbi_ES$X2, prob=0.025), quantile(na.rm=TRUE,df_sleepoutcomes_tbi_ES$X3, prob=0.025), quantile(na.rm=TRUE,df_sleepoutcomes_tbi_ES$X4, prob=0.025), quantile(na.rm=TRUE,df_sleepoutcomes_tbi_ES$X5, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_sleepoutcomes_tbi_ES$X1, prob=0.975), quantile(na.rm=TRUE,df_sleepoutcomes_tbi_ES$X2, prob=0.975), quantile(na.rm=TRUE,df_sleepoutcomes_tbi_ES$X3, prob=0.975), quantile(na.rm=TRUE,df_sleepoutcomes_tbi_ES$X4, prob=0.975), quantile(na.rm=TRUE,df_sleepoutcomes_tbi_ES$X5, prob=0.975))
- )
- ###################
- #Summary Scores: Exploratory Analysis: Sleep subscales - Group Differences and Associations with Outcomes
- ###################
- df_subscales <- data.frame(mtrx.subscales)
- summary_subscales <- data.frame(
- variable = c("DIMS", "DIMS", "SBD", "SBD", "DA", "DA", "SWT", "SWT", "DOES", "DOES", "SHY", "SHY"),
- Comparison = c("OI", "TDC", "OI", "TDC","OI", "TDC","OI", "TDC","OI", "TDC","OI", "TDC"),
- mean = c(mean(df_subscales$X1),mean(df_subscales$X2),mean(df_subscales$X3),mean(df_subscales$X4),mean(df_subscales$X5),mean(df_subscales$X6),mean(df_subscales$X7),mean(df_subscales$X8),mean(df_subscales$X9),mean(df_subscales$X10),mean(df_subscales$X11),mean(df_subscales$X12)),
- lower = c(quantile(na.rm=TRUE,df_subscales$X1, prob=0.025), quantile(na.rm=TRUE,df_subscales$X2, prob=0.025),quantile(na.rm=TRUE,df_subscales$X3, prob=0.025),quantile(na.rm=TRUE,df_subscales$X4, prob=0.025),quantile(na.rm=TRUE,df_subscales$X5, prob=0.025),quantile(na.rm=TRUE,df_subscales$X6, prob=0.025),quantile(na.rm=TRUE,df_subscales$X7, prob=0.025),quantile(na.rm=TRUE,df_subscales$X8, prob=0.025),quantile(na.rm=TRUE,df_subscales$X9, prob=0.025),quantile(na.rm=TRUE,df_subscales$X10, prob=0.025),quantile(na.rm=TRUE,df_subscales$X11, prob=0.025),quantile(na.rm=TRUE,df_subscales$X12, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_subscales$X1, prob=0.975), quantile(na.rm=TRUE,df_subscales$X2, prob=0.975), quantile(na.rm=TRUE,df_subscales$X3, prob=0.975), quantile(na.rm=TRUE,df_subscales$X4, prob=0.975), quantile(na.rm=TRUE,df_subscales$X5, prob=0.975), quantile(na.rm=TRUE,df_subscales$X6, prob=0.975), quantile(na.rm=TRUE,df_subscales$X7, prob=0.975), quantile(na.rm=TRUE,df_subscales$X8, prob=0.975), quantile(na.rm=TRUE,df_subscales$X9, prob=0.975), quantile(na.rm=TRUE,df_subscales$X10, prob=0.975), quantile(na.rm=TRUE,df_subscales$X11, prob=0.975), quantile(na.rm=TRUE,df_subscales$X12, prob=0.975)),
- lower.adj = c(quantile(na.rm=TRUE,df_subscales$X1, prob=0.004166), quantile(na.rm=TRUE,df_subscales$X2, prob=0.004166),quantile(na.rm=TRUE,df_subscales$X3, prob=0.004166),quantile(na.rm=TRUE,df_subscales$X4, prob=0.004166),quantile(na.rm=TRUE,df_subscales$X5, prob=0.004166),quantile(na.rm=TRUE,df_subscales$X6, prob=0.004166),quantile(na.rm=TRUE,df_subscales$X7, prob=0.004166),quantile(na.rm=TRUE,df_subscales$X8, prob=0.004166),quantile(na.rm=TRUE,df_subscales$X9, prob=0.004166),quantile(na.rm=TRUE,df_subscales$X10, prob=0.004166),quantile(na.rm=TRUE,df_subscales$X11, prob=0.004166),quantile(na.rm=TRUE,df_subscales$X12, prob=0.004166)),
- upper.adj = c(quantile(na.rm=TRUE,df_subscales$X1, prob=0.995834), quantile(na.rm=TRUE,df_subscales$X2, prob=0.995834),quantile(na.rm=TRUE,df_subscales$X3, prob=0.995834),quantile(na.rm=TRUE,df_subscales$X4, prob=0.995834),quantile(na.rm=TRUE,df_subscales$X5, prob=0.995834),quantile(na.rm=TRUE,df_subscales$X6, prob=0.995834),quantile(na.rm=TRUE,df_subscales$X7, prob=0.995834),quantile(na.rm=TRUE,df_subscales$X8, prob=0.995834),quantile(na.rm=TRUE,df_subscales$X9, prob=0.995834),quantile(na.rm=TRUE,df_subscales$X10, prob=0.995834),quantile(na.rm=TRUE,df_subscales$X11, prob=0.995834),quantile(na.rm=TRUE,df_subscales$X12, prob=0.995834))
- ) #the .adj p-values are based on the 2-sided CIs for 6 subscales: 0.05/6=0.0083333, therefore 0.004166 on two sides
- df_subscales_ES <- data.frame(mtrx.subscales.ES)
- summary_subscales_ES <- data.frame(
- variable = c("DIMS", "DIMS", "SBD", "SBD", "DA", "DA", "SWT", "SWT", "DOES", "DOES", "SHY", "SHY"),
- Comparison = c("OI", "TDC", "OI", "TDC","OI", "TDC","OI", "TDC","OI", "TDC","OI", "TDC"),
- mean = c(mean(df_subscales_ES$X1),mean(df_subscales_ES$X2),mean(df_subscales_ES$X3),mean(df_subscales_ES$X4),mean(df_subscales_ES$X5),mean(df_subscales_ES$X6),mean(df_subscales_ES$X7),mean(df_subscales_ES$X8),mean(df_subscales_ES$X9),mean(df_subscales_ES$X10),mean(df_subscales_ES$X11),mean(df_subscales_ES$X12)),
- lower = c(quantile(na.rm=TRUE,df_subscales_ES$X1, prob=0.025), quantile(na.rm=TRUE,df_subscales_ES$X2, prob=0.025),quantile(na.rm=TRUE,df_subscales_ES$X3, prob=0.025),quantile(na.rm=TRUE,df_subscales_ES$X4, prob=0.025),quantile(na.rm=TRUE,df_subscales_ES$X5, prob=0.025),quantile(na.rm=TRUE,df_subscales_ES$X6, prob=0.025),quantile(na.rm=TRUE,df_subscales_ES$X7, prob=0.025),quantile(na.rm=TRUE,df_subscales_ES$X8, prob=0.025),quantile(na.rm=TRUE,df_subscales_ES$X9, prob=0.025),quantile(na.rm=TRUE,df_subscales_ES$X10, prob=0.025),quantile(na.rm=TRUE,df_subscales_ES$X11, prob=0.025),quantile(na.rm=TRUE,df_subscales_ES$X12, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_subscales_ES$X1, prob=0.975), quantile(na.rm=TRUE,df_subscales_ES$X2, prob=0.975), quantile(na.rm=TRUE,df_subscales_ES$X3, prob=0.975), quantile(na.rm=TRUE,df_subscales_ES$X4, prob=0.975), quantile(na.rm=TRUE,df_subscales_ES$X5, prob=0.975), quantile(na.rm=TRUE,df_subscales_ES$X6, prob=0.975), quantile(na.rm=TRUE,df_subscales_ES$X7, prob=0.975), quantile(na.rm=TRUE,df_subscales_ES$X8, prob=0.975), quantile(na.rm=TRUE,df_subscales_ES$X9, prob=0.975), quantile(na.rm=TRUE,df_subscales_ES$X10, prob=0.975), quantile(na.rm=TRUE,df_subscales_ES$X11, prob=0.975), quantile(na.rm=TRUE,df_subscales_ES$X12, prob=0.975)),
- lower.adj = c(quantile(na.rm=TRUE,df_subscales_ES$X1, prob=0.004166), quantile(na.rm=TRUE,df_subscales_ES$X2, prob=0.004166),quantile(na.rm=TRUE,df_subscales_ES$X3, prob=0.004166),quantile(na.rm=TRUE,df_subscales_ES$X4, prob=0.004166),quantile(na.rm=TRUE,df_subscales_ES$X5, prob=0.004166),quantile(na.rm=TRUE,df_subscales_ES$X6, prob=0.004166),quantile(na.rm=TRUE,df_subscales_ES$X7, prob=0.004166),quantile(na.rm=TRUE,df_subscales_ES$X8, prob=0.004166),quantile(na.rm=TRUE,df_subscales_ES$X9, prob=0.004166),quantile(na.rm=TRUE,df_subscales_ES$X10, prob=0.004166),quantile(na.rm=TRUE,df_subscales_ES$X11, prob=0.004166),quantile(na.rm=TRUE,df_subscales_ES$X12, prob=0.004166)),
- upper.adj = c(quantile(na.rm=TRUE,df_subscales_ES$X1, prob=0.995834), quantile(na.rm=TRUE,df_subscales_ES$X2, prob=0.995834),quantile(na.rm=TRUE,df_subscales_ES$X3, prob=0.995834),quantile(na.rm=TRUE,df_subscales_ES$X4, prob=0.995834),quantile(na.rm=TRUE,df_subscales_ES$X5, prob=0.995834),quantile(na.rm=TRUE,df_subscales_ES$X6, prob=0.995834),quantile(na.rm=TRUE,df_subscales_ES$X7, prob=0.995834),quantile(na.rm=TRUE,df_subscales_ES$X8, prob=0.995834),quantile(na.rm=TRUE,df_subscales_ES$X9, prob=0.995834),quantile(na.rm=TRUE,df_subscales_ES$X10, prob=0.995834),quantile(na.rm=TRUE,df_subscales_ES$X11, prob=0.995834),quantile(na.rm=TRUE,df_subscales_ES$X12, prob=0.995834))
- )
- df_subscales_tbi <- data.frame(mtrx.subscales.tbi)
- summary_subscales_tbi <- data.frame(
- outcome = c("Thickness", "Thickness","Thickness","Thickness","Thickness","Thickness","Volume","Volume","Volume","Volume","Volume","Volume","Fractional Anisotropy","Fractional Anisotropy","Fractional Anisotropy","Fractional Anisotropy","Fractional Anisotropy","Fractional Anisotropy","Cognition","Cognition","Cognition","Cognition","Cognition","Cognition","Behavior Problems","Behavior Problems","Behavior Problems","Behavior Problems","Behavior Problems","Behavior Problems"),
- subscale = c("DIMS", "SBD", "DA", "SWT", "DOES", "SHY", "DIMS", "SBD", "DA", "SWT", "DOES", "SHY","DIMS", "SBD", "DA", "SWT", "DOES", "SHY","DIMS", "SBD", "DA", "SWT", "DOES", "SHY","DIMS", "SBD", "DA", "SWT", "DOES", "SHY"),
- mean = c(mean(df_subscales_tbi$X1),mean(df_subscales_tbi$X2),mean(df_subscales_tbi$X3),mean(df_subscales_tbi$X4),mean(df_subscales_tbi$X5),mean(df_subscales_tbi$X6),mean(df_subscales_tbi$X7),mean(df_subscales_tbi$X8),mean(df_subscales_tbi$X9),mean(df_subscales_tbi$X10),mean(df_subscales_tbi$X11),mean(df_subscales_tbi$X12),mean(df_subscales_tbi$X13), mean(df_subscales_tbi$X14),mean(df_subscales_tbi$X15),mean(df_subscales_tbi$X16), mean(df_subscales_tbi$X17), mean(df_subscales_tbi$X18),mean(df_subscales_tbi$X19), mean(df_subscales_tbi$X20), mean(df_subscales_tbi$X21), mean(df_subscales_tbi$X22), mean(df_subscales_tbi$X23), mean(df_subscales_tbi$X24), mean(df_subscales_tbi$X25), mean(df_subscales_tbi$X26), mean(df_subscales_tbi$X27), mean(df_subscales_tbi$X28), mean(df_subscales_tbi$X29), mean(df_subscales_tbi$X30)),
- lower = c(quantile(na.rm=TRUE,df_subscales_tbi$X1, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi$X2, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X3, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X4, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X5, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X6, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X7, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X8, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X9, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X10, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X11, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X12, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X13, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X14, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X15, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X16, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X17, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X18, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X19, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X20, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi$X21, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi$X22, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi$X23, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi$X24, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi$X25, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi$X26, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi$X27, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi$X28, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi$X29, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi$X30, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_subscales_tbi$X1, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X2, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X3, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X4, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X5, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X6, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X7, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X8, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X9, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X10, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X11, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X12, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X13, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X14, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X15, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X16, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X17, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X18, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X19, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X20, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X21, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X22, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X23, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X24, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi$X25, prob=0.975),quantile(na.rm=TRUE,df_subscales_tbi$X26, prob=0.975),quantile(na.rm=TRUE,df_subscales_tbi$X27, prob=0.975),quantile(na.rm=TRUE,df_subscales_tbi$X28, prob=0.975),quantile(na.rm=TRUE,df_subscales_tbi$X29, prob=0.975),quantile(na.rm=TRUE,df_subscales_tbi$X30, prob=0.975)),
- lower.adj = c(quantile(na.rm=TRUE,df_subscales_tbi$X1, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X2, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X3, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X4, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X5, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X6, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X7, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X8, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X9, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X10, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X11, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X12, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X13, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X14, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X15, prob=0.004166),quantile(na.rm=TRUE,df_subscales_tbi$X16, prob=0.004166),quantile(na.rm=TRUE,df_subscales_tbi$X17, prob=0.004166),quantile(na.rm=TRUE,df_subscales_tbi$X18, prob=0.004166),quantile(na.rm=TRUE,df_subscales_tbi$X19, prob=0.004166),quantile(na.rm=TRUE,df_subscales_tbi$X20, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X21, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X22, prob=0.004166),quantile(na.rm=TRUE,df_subscales_tbi$X23, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X24, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X25, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X26, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X27, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X28, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X29, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi$X30, prob=0.004166)),
- upper.adj = c(quantile(na.rm=TRUE,df_subscales_tbi$X1, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X2, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X3, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X4, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X5, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X6, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X7, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X8, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X9, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X10, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X11, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X12, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X13, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X14, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X15, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X16, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X17, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X18, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X19, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X20, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X21, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi$X22, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi$X23, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi$X24, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi$X25, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi$X26, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi$X27, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi$X28, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi$X29, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi$X30, prob=0.995834))
- )
- df_subscales_tbi_ES <- data.frame(mtrx.subscales.tbi.ES)
- summary_subscales_tbi_ES <- data.frame(
- outcome = c("Thickness", "Thickness","Thickness","Thickness","Thickness","Thickness","Volume","Volume","Volume","Volume","Volume","Volume","Fractional Anisotropy","Fractional Anisotropy","Fractional Anisotropy","Fractional Anisotropy","Fractional Anisotropy","Fractional Anisotropy","Cognition","Cognition","Cognition","Cognition","Cognition","Cognition","Behavior Problems","Behavior Problems","Behavior Problems","Behavior Problems","Behavior Problems","Behavior Problems"),
- subscale = c("DIMS", "SBD", "DA", "SWT", "DOES", "SHY", "DIMS", "SBD", "DA", "SWT", "DOES", "SHY","DIMS", "SBD", "DA", "SWT", "DOES", "SHY","DIMS", "SBD", "DA", "SWT", "DOES", "SHY","DIMS", "SBD", "DA", "SWT", "DOES", "SHY"),
- mean = c(mean(df_subscales_tbi_ES$X1),mean(df_subscales_tbi_ES$X2),mean(df_subscales_tbi_ES$X3),mean(df_subscales_tbi_ES$X4),mean(df_subscales_tbi_ES$X5),mean(df_subscales_tbi_ES$X6),mean(df_subscales_tbi_ES$X7),mean(df_subscales_tbi_ES$X8),mean(df_subscales_tbi_ES$X9),mean(df_subscales_tbi_ES$X10),mean(df_subscales_tbi_ES$X11),mean(df_subscales_tbi_ES$X12),mean(df_subscales_tbi_ES$X13), mean(df_subscales_tbi_ES$X14),mean(df_subscales_tbi_ES$X15),mean(df_subscales_tbi_ES$X16), mean(df_subscales_tbi_ES$X17), mean(df_subscales_tbi_ES$X18),mean(df_subscales_tbi_ES$X19), mean(df_subscales_tbi_ES$X20), mean(df_subscales_tbi_ES$X21), mean(df_subscales_tbi_ES$X22), mean(df_subscales_tbi_ES$X23), mean(df_subscales_tbi_ES$X24), mean(df_subscales_tbi_ES$X25), mean(df_subscales_tbi_ES$X26), mean(df_subscales_tbi_ES$X27), mean(df_subscales_tbi_ES$X28), mean(df_subscales_tbi_ES$X29), mean(df_subscales_tbi_ES$X30)),
- lower = c(quantile(na.rm=TRUE,df_subscales_tbi_ES$X1, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi_ES$X2, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X3, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X4, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X5, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X6, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X7, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X8, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X9, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X10, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X11, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X12, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X13, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X14, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X15, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X16, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X17, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X18, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X19, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X20, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi_ES$X21, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi_ES$X22, prob=0.025),quantile(na.rm=TRUE,df_subscales_tbi_ES$X23, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi_ES$X24, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi_ES$X25, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi_ES$X26, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi_ES$X27, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi_ES$X28, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi_ES$X29, prob=0.025), quantile(na.rm=TRUE,df_subscales_tbi_ES$X30, prob=0.025)),
- upper = c(quantile(na.rm=TRUE,df_subscales_tbi_ES$X1, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X2, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X3, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X4, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X5, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X6, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X7, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X8, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X9, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X10, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X11, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X12, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X13, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X14, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X15, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X16, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X17, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X18, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X19, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X20, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X21, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X22, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X23, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X24, prob=0.975), quantile(na.rm=TRUE,df_subscales_tbi_ES$X25, prob=0.975),quantile(na.rm=TRUE,df_subscales_tbi_ES$X26, prob=0.975),quantile(na.rm=TRUE,df_subscales_tbi_ES$X27, prob=0.975),quantile(na.rm=TRUE,df_subscales_tbi_ES$X28, prob=0.975),quantile(na.rm=TRUE,df_subscales_tbi_ES$X29, prob=0.975),quantile(na.rm=TRUE,df_subscales_tbi_ES$X30, prob=0.975)),
- lower.adj = c(quantile(na.rm=TRUE,df_subscales_tbi_ES$X1, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X2, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X3, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X4, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X5, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X6, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X7, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X8, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X9, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X10, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X11, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X12, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X13, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X14, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X15, prob=0.004166),quantile(na.rm=TRUE,df_subscales_tbi_ES$X16, prob=0.004166),quantile(na.rm=TRUE,df_subscales_tbi_ES$X17, prob=0.004166),quantile(na.rm=TRUE,df_subscales_tbi_ES$X18, prob=0.004166),quantile(na.rm=TRUE,df_subscales_tbi_ES$X19, prob=0.004166),quantile(na.rm=TRUE,df_subscales_tbi_ES$X20, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X21, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X22, prob=0.004166),quantile(na.rm=TRUE,df_subscales_tbi_ES$X23, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X24, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X25, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X26, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X27, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X28, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X29, prob=0.004166), quantile(na.rm=TRUE,df_subscales_tbi_ES$X30, prob=0.004166)),
- upper.adj = c(quantile(na.rm=TRUE,df_subscales_tbi_ES$X1, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X2, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X3, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X4, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X5, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X6, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X7, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X8, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X9, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X10, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X11, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X12, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X13, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X14, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X15, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X16, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X17, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X18, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X19, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X20, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X21, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi_ES$X22, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi_ES$X23, prob=0.995834), quantile(na.rm=TRUE,df_subscales_tbi_ES$X24, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi_ES$X25, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi_ES$X26, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi_ES$X27, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi_ES$X28, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi_ES$X29, prob=0.995834),quantile(na.rm=TRUE,df_subscales_tbi_ES$X30, prob=0.995834))
- )
- ###################
- #Summary Scores: Linear Mixed-Effects Models: Differences in Outcomes between clinical sleep-trajectories
- ###################
- df_lmer_beh <- data.frame(mtrx.lmer.cbcl)
- summary_lmer_beh <- data.frame(
- contrast = c("2y Chronic-Improving", "2y Chronic-New Onset","2y Chronic-Normal", "2y Improving-New Onset", "2y Improving-Normal", "2y New Onset-Normal", "BL Chronic-Improving", "BL Chronic-New Onset","BL Chronic-Normal", "BL Improving-New Onset", "BL Improving-Normal", "BL New Onset-Normal", "Chronic 2y-BL", "Improving 2y-BL", "New Onset 2y-BL", "Normal 2y-BL"),
- mean = c(mean(df_lmer_beh$X1),mean(df_lmer_beh$X2),mean(df_lmer_beh$X3),mean(df_lmer_beh$X4),mean(df_lmer_beh$X5),mean(df_lmer_beh$X6),mean(df_lmer_beh$X7),mean(df_lmer_beh$X8),mean(df_lmer_beh$X9),mean(df_lmer_beh$X10),mean(df_lmer_beh$X11),mean(df_lmer_beh$X12),mean(df_lmer_beh$X13),mean(df_lmer_beh$X14),mean(df_lmer_beh$X15),mean(df_lmer_beh$X16)),
- lower = c(quantile(na.rm=TRUE,df_lmer_beh$X1, prob=0.00208), quantile(na.rm=TRUE,df_lmer_beh$X2, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh$X3, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh$X4, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh$X5, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh$X6, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh$X7, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh$X8, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh$X9, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh$X10, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh$X11, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh$X12, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh$X13, prob=0.00625),quantile(na.rm=TRUE,df_lmer_beh$X14, prob=0.00625),quantile(na.rm=TRUE,df_lmer_beh$X15, prob=0.00625),quantile(na.rm=TRUE,df_lmer_beh$X16, prob=0.00625)),
- upper = c(quantile(na.rm=TRUE,df_lmer_beh$X1, prob=0.9979), quantile(na.rm=TRUE,df_lmer_beh$X2, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh$X3, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh$X4, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh$X5, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh$X6, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh$X7, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh$X8, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh$X9, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh$X10, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh$X11, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh$X12, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh$X13, prob=0.99375),quantile(na.rm=TRUE,df_lmer_beh$X14, prob=0.99375),quantile(na.rm=TRUE,df_lmer_beh$X15, prob=0.99375),quantile(na.rm=TRUE,df_lmer_beh$X16, prob=0.99375))
- )
- df_lmer_beh_TDC <- data.frame(mtrx.lmer.cbcl.tdc)
- summary_lmer_beh_TDC <- data.frame(
- contrast = c("2y Chronic-Improving", "2y Chronic-New Onset","2y Chronic-Normal", "2y Improving-New Onset", "2y Improving-Normal", "2y New Onset-Normal", "BL Chronic-Improving", "BL Chronic-New Onset","BL Chronic-Normal", "BL Improving-New Onset", "BL Improving-Normal", "BL New Onset-Normal", "Chronic 2y-BL", "Improving 2y-BL", "New Onset 2y-BL", "Normal 2y-BL"),
- mean = c(mean(df_lmer_beh_TDC$X1),mean(df_lmer_beh_TDC$X2),mean(df_lmer_beh_TDC$X3),mean(df_lmer_beh_TDC$X4),mean(df_lmer_beh_TDC$X5),mean(df_lmer_beh_TDC$X6),mean(df_lmer_beh_TDC$X7),mean(df_lmer_beh_TDC$X8),mean(df_lmer_beh_TDC$X9),mean(df_lmer_beh_TDC$X10),mean(df_lmer_beh_TDC$X11),mean(df_lmer_beh_TDC$X12),mean(df_lmer_beh_TDC$X13),mean(df_lmer_beh_TDC$X14),mean(df_lmer_beh_TDC$X15),mean(df_lmer_beh_TDC$X16)),
- lower = c(quantile(na.rm=TRUE,df_lmer_beh_TDC$X1, prob=0.00208), quantile(na.rm=TRUE,df_lmer_beh_TDC$X2, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh_TDC$X3, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh_TDC$X4, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh_TDC$X5, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh_TDC$X6, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh_TDC$X7, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh_TDC$X8, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh_TDC$X9, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh_TDC$X10, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh_TDC$X11, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh_TDC$X12, prob=0.00208),quantile(na.rm=TRUE,df_lmer_beh_TDC$X13, prob=0.00625),quantile(na.rm=TRUE,df_lmer_beh_TDC$X14, prob=0.00625),quantile(na.rm=TRUE,df_lmer_beh_TDC$X15, prob=0.00625),quantile(na.rm=TRUE,df_lmer_beh_TDC$X16, prob=0.00625)),
- upper = c(quantile(na.rm=TRUE,df_lmer_beh_TDC$X1, prob=0.9979), quantile(na.rm=TRUE,df_lmer_beh_TDC$X2, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh_TDC$X3, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh_TDC$X4, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh_TDC$X5, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh_TDC$X6, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh_TDC$X7, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh_TDC$X8, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh_TDC$X9, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh_TDC$X10, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh_TDC$X11, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh_TDC$X12, prob=0.9979),quantile(na.rm=TRUE,df_lmer_beh_TDC$X13, prob=0.99375),quantile(na.rm=TRUE,df_lmer_beh_TDC$X14, prob=0.99375),quantile(na.rm=TRUE,df_lmer_beh_TDC$X15, prob=0.99375),quantile(na.rm=TRUE,df_lmer_beh_TDC$X16, prob=0.99375))
- )
- df_lmer_thk <- data.frame(mtrx.lmer.thk)
- summary_lmer_thk <- data.frame(
- contrast = c("2y Chronic-Improving", "2y Chronic-New Onset","2y Chronic-Normal", "2y Improving-New Onset", "2y Improving-Normal", "2y New Onset-Normal", "BL Chronic-Improving", "BL Chronic-New Onset","BL Chronic-Normal", "BL Improving-New Onset", "BL Improving-Normal", "BL New Onset-Normal", "Chronic 2y-BL", "Improving 2y-BL", "New Onset 2y-BL", "Normal 2y-BL"),
- mean = c(mean(df_lmer_thk$X1),mean(df_lmer_thk$X2),mean(df_lmer_thk$X3),mean(df_lmer_thk$X4),mean(df_lmer_thk$X5),mean(df_lmer_thk$X6),mean(df_lmer_thk$X7),mean(df_lmer_thk$X8),mean(df_lmer_thk$X9),mean(df_lmer_thk$X10),mean(df_lmer_thk$X11),mean(df_lmer_thk$X12),mean(df_lmer_thk$X13),mean(df_lmer_thk$X14),mean(df_lmer_thk$X15), mean(df_lmer_thk$X16)),
- lower = c(quantile(na.rm=TRUE,df_lmer_thk$X1, prob=0.00208), quantile(na.rm=TRUE,df_lmer_thk$X2, prob=0.00208),quantile(na.rm=TRUE,df_lmer_thk$X3, prob=0.00208),quantile(na.rm=TRUE,df_lmer_thk$X4, prob=0.00208),quantile(na.rm=TRUE,df_lmer_thk$X5, prob=0.00208),quantile(na.rm=TRUE,df_lmer_thk$X6, prob=0.00208),quantile(na.rm=TRUE,df_lmer_thk$X7, prob=0.00208),quantile(na.rm=TRUE,df_lmer_thk$X8, prob=0.00208),quantile(na.rm=TRUE,df_lmer_thk$X9, prob=0.00208),quantile(na.rm=TRUE,df_lmer_thk$X10, prob=0.00208),quantile(na.rm=TRUE,df_lmer_thk$X11, prob=0.00208),quantile(na.rm=TRUE,df_lmer_thk$X12, prob=0.00208),quantile(na.rm=TRUE,df_lmer_thk$X13, prob=0.00625),quantile(na.rm=TRUE,df_lmer_thk$X14, prob=0.00625),quantile(na.rm=TRUE,df_lmer_thk$X15, prob=0.00625),quantile(na.rm=TRUE,df_lmer_thk$X16, prob=0.00625)),
- upper = c(quantile(na.rm=TRUE,df_lmer_thk$X1, prob=0.9979), quantile(na.rm=TRUE,df_lmer_thk$X2, prob=0.9979),quantile(na.rm=TRUE,df_lmer_thk$X3, prob=0.9979),quantile(na.rm=TRUE,df_lmer_thk$X4, prob=0.9979),quantile(na.rm=TRUE,df_lmer_thk$X5, prob=0.9979),quantile(na.rm=TRUE,df_lmer_thk$X6, prob=0.9979),quantile(na.rm=TRUE,df_lmer_thk$X7, prob=0.9979),quantile(na.rm=TRUE,df_lmer_thk$X8, prob=0.9979),quantile(na.rm=TRUE,df_lmer_thk$X9, prob=0.9979),quantile(na.rm=TRUE,df_lmer_thk$X10, prob=0.9979),quantile(na.rm=TRUE,df_lmer_thk$X11, prob=0.9979),quantile(na.rm=TRUE,df_lmer_thk$X12, prob=0.9979),quantile(na.rm=TRUE,df_lmer_thk$X13, prob=0.99375),quantile(na.rm=TRUE,df_lmer_thk$X14, prob=0.99375),quantile(na.rm=TRUE,df_lmer_thk$X15, prob=0.99375),quantile(na.rm=TRUE,df_lmer_thk$X16, prob=0.99375))
- )
- df_lmer_vol <- data.frame(mtrx.lmer.vol)
- summary_lmer_vol <- data.frame(
- contrast = c("2y Chronic-Improving", "2y Chronic-New Onset","2y Chronic-Normal", "2y Improving-New Onset", "2y Improving-Normal", "2y New Onset-Normal", "BL Chronic-Improving", "BL Chronic-New Onset","BL Chronic-Normal", "BL Improving-New Onset", "BL Improving-Normal", "BL New Onset-Normal", "Chronic 2y-BL", "Improving 2y-BL", "New Onset 2y-BL", "Normal 2y-BL"),
- mean = c(mean(df_lmer_vol$X1),mean(df_lmer_vol$X2),mean(df_lmer_vol$X3),mean(df_lmer_vol$X4),mean(df_lmer_vol$X5),mean(df_lmer_vol$X6),mean(df_lmer_vol$X7),mean(df_lmer_vol$X8),mean(df_lmer_vol$X9),mean(df_lmer_vol$X10),mean(df_lmer_vol$X11),mean(df_lmer_vol$X12),mean(df_lmer_vol$X13),mean(df_lmer_vol$X14),mean(df_lmer_vol$X15),mean(df_lmer_vol$X16)),
- lower = c(quantile(na.rm=TRUE,df_lmer_vol$X1, prob=0.00208), quantile(na.rm=TRUE,df_lmer_vol$X2, prob=0.00208),quantile(na.rm=TRUE,df_lmer_vol$X3, prob=0.00208),quantile(na.rm=TRUE,df_lmer_vol$X4, prob=0.00208),quantile(na.rm=TRUE,df_lmer_vol$X5, prob=0.00208),quantile(na.rm=TRUE,df_lmer_vol$X6, prob=0.00208),quantile(na.rm=TRUE,df_lmer_vol$X7, prob=0.00208),quantile(na.rm=TRUE,df_lmer_vol$X8, prob=0.00208),quantile(na.rm=TRUE,df_lmer_vol$X9, prob=0.00208),quantile(na.rm=TRUE,df_lmer_vol$X10, prob=0.00208),quantile(na.rm=TRUE,df_lmer_vol$X11, prob=0.00208),quantile(na.rm=TRUE,df_lmer_vol$X12, prob=0.00208),quantile(na.rm=TRUE,df_lmer_vol$X13, prob=0.00625),quantile(na.rm=TRUE,df_lmer_vol$X14, prob=0.00625),quantile(na.rm=TRUE,df_lmer_vol$X15, prob=0.00625),quantile(na.rm=TRUE,df_lmer_vol$X16, prob=0.00625)),
- upper = c(quantile(na.rm=TRUE,df_lmer_vol$X1, prob=0.9979), quantile(na.rm=TRUE,df_lmer_vol$X2, prob=0.9979),quantile(na.rm=TRUE,df_lmer_vol$X3, prob=0.9979),quantile(na.rm=TRUE,df_lmer_vol$X4, prob=0.9979),quantile(na.rm=TRUE,df_lmer_vol$X5, prob=0.9979),quantile(na.rm=TRUE,df_lmer_vol$X6, prob=0.9979),quantile(na.rm=TRUE,df_lmer_vol$X7, prob=0.9979),quantile(na.rm=TRUE,df_lmer_vol$X8, prob=0.9979),quantile(na.rm=TRUE,df_lmer_vol$X9, prob=0.9979),quantile(na.rm=TRUE,df_lmer_vol$X10, prob=0.9979),quantile(na.rm=TRUE,df_lmer_vol$X11, prob=0.9979),quantile(na.rm=TRUE,df_lmer_vol$X12, prob=0.9979),quantile(na.rm=TRUE,df_lmer_vol$X13, prob=0.99375),quantile(na.rm=TRUE,df_lmer_vol$X14, prob=0.99375),quantile(na.rm=TRUE,df_lmer_vol$X15, prob=0.99375),quantile(na.rm=TRUE,df_lmer_vol$X16, prob=0.99375))
- ) #0.05/12/2 = 0.00208 resp. 0.9979 for the trajectories and 0.05/4/2 = 0.00625 resp. 0.99375 for the single trajectory comparisons
Sleep_Paper_3_Summary_Scores.R, under MIT · at the source
Overview
- cBRAIN, Department of Child and Adolescent Psychiatry, Psychosomatics and Psychotherapy, Ludwig-Maximilians-Universität, Munich, Germany
- Graduate School of Systemic Neurosciences, Ludwig-Maximilians-Universität, Munich, Germany
- International Max Planck Research School for Translational Psychiatry, Munich, Germany
- German Center for Child and Adolescent Health (DZKJ), Partner site Munich, Munich, Germany
- Psychiatry Neuroimaging Laboratory, Department of Psychiatry, Mass General Brigham, Harvard Medical School, Boston, Massachusetts
Abstract
Importance: Sleep disturbances are increasingly recognized as a modifiable factor associated with poor outcomes after mild traumatic brain injury (mTBI) in adults, yet their prevalence, mechanisms, and clinical impact in children remain largely unknown. Identifying whether sleep problems contribute to behavioral, cognitive, and neurobiological outcomes after pediatric mTBI could inform targeted interventions.
Objective: To determine the prevalence of sleep disturbances after pediatric mTBI and to assess associations with behavioral symptoms, cognition, and brain structure.
Design, Setting, and Participants: This multisite, population-based cohort study is a secondary analysis of data collected between September 2016 and January 2020 as part of the Adolescent Brain Cognitive Development Study 5.0 release. Participants were children who sustained an mTBI between baseline (age 9-10 years) and 2-year follow-up (age 11-12 years). Children with mTBI were propensity score–matched on the basis of age, sex, study site, self-reported race, and total family income to typically developing children (TDC) and orthopedic injury (OI) controls. Data were analyzed September 2024 to June 2025.
Exposure: mTBI between baseline and follow-up.
Main Outcomes and Measures: The primary outcomes were parent-reported sleep disturbances (categorized as new onset, chronic, improving, or none), behavioral problems, and cognitive performance. Magnetic resonance imaging was used to examine cortical thickness, cortical volume, and white matter microstructure. Analyses used linear regressions and linear mixed models, controlling for baseline when appropriate.
Results: Of 573 children, there were 191 children with mTBI (mean [SD] age, 12.03 [0.6] years; 112 [58.6%] male). Children with mTBI were more likely than controls to develop new clinical sleep disturbances (29 children with mTBI [15.2%] vs 22 of 191 children [11.5%] in the TDC group and 19 of 191 children [9.9%] in the OI group) and had higher rates of chronic sleep disturbances (41 children [21.5%] with mTBI vs 25 children [13.1%] in the TDC group and 25 children [13.1%] in the OI group). Total sleep disturbance scores were significantly elevated for children with mTBI compared with the TDC group (β, −0.27; 95% CI, −0.45 to −0.10), but not the OI group (β, −0.12; 95% CI, −0.29 to 0.05). Higher behavioral symptoms were found compared with the TDC group (β, −0.30; 95% CI, −0.45 to −0.16) and were associated with sleep problems, especially newly emerging disturbances, after mTBI. Children in the OI group exhibited greater cortical thickness (β, 0.18; 95% CI, 0.06 to 0.30) and volume (β, 0.06; 95% CI, 0.01 to 0.11) than children with mTBI, with both being positively associated with sleep disturbances in children with mTBI. No group differences were found in cognition or white matter microstructure or associations with sleep.
Conclusions and Relevance: In this cohort study, sleep disturbances were more common among children with mTBI than among TDC. In particular, newly developing sleep problems appeared to be a potential key pathway to behavioral problems and a promising interventional target. Cognitive and structural brain outcomes were not significantly associated with sleep disturbances in this cohort.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 3 matches between paragraphs and lines of code.
Zenodo 18301364
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
- 30 September 2026: the link answers (HTTP 200)
6 files
- Sensitivity/
Sleep_Paper_Sensitivity_ , R, 489 linesPsychiatricVulnerability .R - Sensitivity/
Sleep_Paper_Sensitivity_ , R, 450 linesSexStratified.R - Sleep_Paper_1_SampleMeas
ures.R , R, 453 lines, 1 match - Sleep_Paper_2_Bootstrapp
ing_Analysis.R , R, 566 lines, 1 match - Sleep_Paper_3_Summary_Sc
ores.R , R, 445 lines, 1 match - Sleep_Paper_4_Visualizat
ion.R , R, 515 lines
Zenodo 18301365
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
- 30 September 2026: the link answers (HTTP 200)
6 files
- Sensitivity/
Sleep_Paper_Sensitivity_ , R, 489 linesPsychiatricVulnerability .R - Sensitivity/
Sleep_Paper_Sensitivity_ , R, 450 linesSexStratified.R - Sleep_Paper_1_SampleMeas
ures.R , R, 453 lines - Sleep_Paper_2_Bootstrapp
ing_Analysis.R , R, 566 lines - Sleep_Paper_3_Summary_Sc
ores.R , R, 445 lines - Sleep_Paper_4_Visualizat
ion.R , R, 515 lines
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 12 scripts, each with its path and the digest of its content;
- 3 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 30 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 11 MeSH terms, 1 funder, 42 references.
Cite
This paper
Betz, A. K., MacLaren, H. S. R., Villagran Asiares, A. G., Schuhmacher, L. S., & Koerte, I. K. (2026). Sleep Disturbances and Cognition, Behavior, and Brain Structure in Children With mTBI. JAMA network open, 9(3), e260229. https://
BibTeX
@article{betz2026sleep,
author = {Betz, Anja K. and MacLaren, Hanneke S. R. and Villagran Asiares, Alberto G. and Schuhmacher, Luisa S. and Koerte, Inga K.},
title = {{Sleep Disturbances and Cognition, Behavior, and Brain Structure in Children With mTBI}},
journal = {JAMA network open},
year = {2026},
month = mar,
volume = {9},
number = {3},
pages = {e260229},
publisher = {American Medical Association},
issn = {2574-3805},
doi = {10.1001/
url = {https://
pmid = {41805957},
pmcid = {PMC12976784}
}
RIS
TY - JOUR
AU - Betz, Anja K.
AU - MacLaren, Hanneke S. R.
AU - Villagran Asiares, Alberto G.
AU - Schuhmacher, Luisa S.
AU - Koerte, Inga K.
TI - Sleep Disturbances and Cognition, Behavior, and Brain Structure in Children With mTBI
T2 - JAMA network open
J2 - JAMA Netw Open
PY - 2026
DA - 2026/
VL - 9
IS - 3
SP - e260229
SN - 2574-3805
PB - American Medical Association
DO - 10.1001/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1001/
"type": "article-journal",
"title": "Sleep Disturbances and Cognition, Behavior, and Brain Structure in Children With mTBI",
"container-title": "JAMA network open",
"author": [
{
"family": "Betz",
"given": "Anja K."
},
{
"family": "MacLaren",
"given": "Hanneke S. R."
},
{
"family": "Villagran Asiares",
"given": "Alberto G."
},
{
"family": "Schuhmacher",
"given": "Luisa S."
},
{
"family": "Koerte",
"given": "Inga K."
}
],
"container-title-short":
"volume": "9",
"issue": "3",
"page": "e260229",
"DOI": "10.1001/
"PMID": "41805957",
"PMCID": "PMC12976784",
"ISSN": "2574-3805",
"publisher": "American Medical Association",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
2
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1371/journal.pone.0353990 [code]
- Positive mood enhances accessibility of unrelated concepts in the first language but not in the foreign language.Journal: PloS oneIn common: multcomp, psych, car, 5 other tools
- [2] doi:10.1093/braincomms/fcag121 [code]
- Anterior insular co-activation patterns associated with stress markers in chronic primary pain.Journal: Brain communicationsIn common: multcomp, psych, car, 4 other tools
- [3] doi:10.1038/s41467-026-73072-6 [code]
- Mapping the spatiotemporal continuum of structural connectivity development across the human connectome in youth.Journal: Nature communicationsIn common: neuroCombat, psych, lme4, 3 other tools, structural MRI / diffusion, 1 reference
- [4] doi:10.1093/bioinformatics/btag592 [code]
- Network-based stratification of allele-specific expression reveals patient subgroups in Huntington's disease.Journal: Bioinformatics (Oxford, England)In common: multcomp, car, emmeans, 4 other tools
- [5] doi:10.1523/eneuro.0076-26.2026 [code]
- Exogenously Driven Neural Reactivation of Spatially Matching Visual Working-Memory Contents.Journal: eNeuroIn common: multcomp, car, emmeans, 4 other tools
- [6] doi:10.1093/braincomms/fcag279 [code]
- Network flexibility facilitates treatment-induced recovery in post-stroke aphasia.Journal: Brain communicationsIn common: psych, car, emmeans, 4 other tools
- [7] doi:10.1126/sciadv.aec9291 [code]
- Computational mechanisms of perception in autism revealed using games inspired by rodent operant tasks.Journal: Science advancesIn common: psych, car, emmeans, 4 other tools
- [8] doi:10.1016/j.neuroimage.2026.122115 [code]
- Midfrontal theta power relates to response speeding following frustrative nonreward.Journal: NeuroImageIn common: psych, car, emmeans, 4 other tools
- [9] doi:10.1073/pnas.2606871123 [code]
- Oxytocin modulates the neurocomputational mechanisms engaged in learning rank relationships in social networks.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: psych, car, emmeans, 4 other tools
- [10] doi:10.1371/journal.pbio.3003767 [code]
- Ultrasound neuromodulation reveals distinct roles of the dorsal anterior cingulate cortex and anterior insula in learning.Journal: PLoS biologyIn common: psych, car, emmeans, 4 other tools
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 12 scripts, and 3 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:634f6944f85ae7d2…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[.
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
