Figure 1

Hypnogram

Representative hypnogram from Group 2, Day 4



Figure 1E

Subsetting vigilance data

  • remove recordings that failed visual quality inspection (Exclude == F)

  • remove recordings from Day 1 (habituation: Day > 1)

  • cut time down to 240 min - the quality of recordings drops after 4h due to battery life (eTime <= 240)

  • exclude recording 7 (in-between dark/light phase recording)

Compute pairwise correlations

  • sleep states are treated as awake or asleep (REM + NREM)

  • computes all pairwise correlations (Pearson) between and within groups

Plot

Stats

Summary:

Unique pairs:

## [1] 120

Shapiro-Wilk test

Normality is not violated in any group

QQ-plots

Levene’s Test

Df F value Pr(>F)
group 7 7.393341 0
364 NA NA

Groupwise variances are heteroscedastic

  • Probably driven by the sample size differences

Test

## [1] "Settings:  unique SS "
stratum term df R.Sum.Sq R.Mean.Sq Iter Pr.Prob.
as.factor(pair) GroupType 1 0.7234812 0.7234812 5000 0.0000000
as.factor(pair) Stage 1 0.0046275 0.0046275 51 0.9411765
as.factor(pair) GroupType:Stage 1 0.0238593 0.0238593 882 0.1020408
as.factor(pair) Residuals 116 1.7747016 0.0152992 NA NA
Within GroupType 1 0.1109127 0.1109127 5000 0.0010000
Within Light1 1 0.1523508 0.1523508 51 1.0000000
Within GroupType:Light1 1 0.0254551 0.0254551 51 0.8039216
Within Stage 1 0.0002219 0.0002219 51 1.0000000
Within GroupType:Stage 1 0.0008826 0.0008826 91 0.5274725
Within Light1:Stage 1 0.1517234 0.1517234 5000 0.0018000
Within GroupType:Light1:Stage 1 0.0046400 0.0046400 51 0.8823529
Within Residuals 245 2.5119000 0.0102527 NA NA

Summary

## 
## Error: as.factor(pair)
## Component 1 :
##                  Df R Sum Sq R Mean Sq Iter            Pr(Prob)    
## GroupType         1  0.72348   0.72348 5000 <0.0000000000000002 ***
## Stage             1  0.00463   0.00463   51              0.9412    
## GroupType:Stage   1  0.02386   0.02386  882              0.1020    
## Residuals       116  1.77470   0.01530                             
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Error: Within
## Component 1 :
##                         Df R Sum Sq R Mean Sq Iter Pr(Prob)    
## GroupType                1  0.11091  0.110913 5000   0.0010 ***
## Light1                   1  0.15235  0.152351   51   1.0000    
## GroupType:Light1         1  0.02546  0.025455   51   0.8039    
## Stage                    1  0.00022  0.000222   51   1.0000    
## GroupType:Stage          1  0.00088  0.000883   91   0.5275    
## Light1:Stage             1  0.15172  0.151723 5000   0.0018 ** 
## GroupType:Light1:Stage   1  0.00464  0.004640   51   0.8824    
## Residuals              245  2.51190  0.010253                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Figure 1F

“PseudoCausality” over time

Subset data

  • only consider bouts with a duration under 40 min

Run pseudo-causality function

Summarize

Plot



Stats

Summary:
## [1] 16

Shapiro-Wilk test

Normality is violated in nMice == 1

Levene’s Test

Df F value Pr(>F)
group 29 1.695526 0.0155931
350 NA NA

Groupwise variances are heteroscedastic

Mann-Whitney-Wilcoxon Test for time 1

Awake mice: 1

statistic p.value method alternative
73 0.0388457 Wilcoxon rank sum test with continuity correction two.sided

Awake mice: 3

statistic p.value method alternative
45 0.1879591 Wilcoxon rank sum test with continuity correction two.sided

lmPerm

Repeated-measures:

## [1] "Settings:  unique SS : numeric variables centered"
stratum term df R.Sum.Sq R.Mean.Sq Iter Pr.Prob.
as.factor(MouseNumber) nMice 1 0.2569083 0.2569083 5000 0.0014
as.factor(MouseNumber) Residuals 14 0.2337892 0.0166992 NA NA
Within GroupType1 1 0.0015733 0.0015733 51 1.0000
Within nMice 1 1.5497744 1.5497744 5000 0.0000
Within GroupType1:nMice 1 0.3331050 0.3331050 5000 0.0000
Within as.factor(timePeriod) 4 2.5890506 0.6472627 5000 0.0000
Within Residuals 357 2.2431089 0.0062832 NA NA
## 
## Error: as.factor(MouseNumber)
## Component 1 :
##           Df R Sum Sq R Mean Sq Iter Pr(Prob)   
## nMice      1  0.25691  0.256908 5000   0.0014 **
## Residuals 14  0.23379  0.016699                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## 
## Error: Within
## Component 1 :
##                        Df R Sum Sq R Mean Sq Iter            Pr(Prob)    
## GroupType1              1  0.00157   0.00157   51                   1    
## nMice                   1  1.54977   1.54977 5000 <0.0000000000000002 ***
## GroupType1:nMice        1  0.33310   0.33310 5000 <0.0000000000000002 ***
## as.factor(timePeriod)   4  2.58905   0.64726 5000 <0.0000000000000002 ***
## Residuals             357  2.24311   0.00628                             
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Awake mice: 1

## [1] "Settings:  unique SS "
stratum term df R.Sum.Sq R.Mean.Sq Iter Pr.Prob.
as.factor(MouseNumber) Residuals 15 0.1060661 0.0070711 NA NA
Within GroupType1 1 0.0755079 0.0755079 5000 0
Within as.factor(timePeriod) 4 0.3809504 0.0952376 5000 0
Within Residuals 139 0.4687782 0.0033725 NA NA

Summary

## 
## Error: as.factor(MouseNumber)
## Component 1 :
##           Df R Sum Sq R Mean Sq
## Residuals 15  0.10607 0.0070711
## 
## 
## Error: Within
## Component 1 :
##                        Df R Sum Sq R Mean Sq Iter              Pr(Prob)
## GroupType1              1  0.07551  0.075508 5000 < 0.00000000000000022
## as.factor(timePeriod)   4  0.38095  0.095238 5000 < 0.00000000000000022
## Residuals             139  0.46878  0.003373                           
##                          
## GroupType1            ***
## as.factor(timePeriod) ***
## Residuals                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Awake mice: 2

## [1] "Settings:  unique SS "
stratum term df R.Sum.Sq R.Mean.Sq Iter Pr.Prob.
as.factor(MouseNumber) Residuals 13 0.2629157 0.0202243 NA NA
Within GroupType1 1 0.0038501 0.0038501 146 0.4109589
Within as.factor(timePeriod) 4 1.3369610 0.3342402 5000 0.0000000
Within Residuals 121 0.6011011 0.0049678 NA NA

Summary

## 
## Error: as.factor(MouseNumber)
## Component 1 :
##           Df R Sum Sq R Mean Sq
## Residuals 13  0.26292  0.020224
## 
## 
## Error: Within
## Component 1 :
##                        Df R Sum Sq R Mean Sq Iter            Pr(Prob)    
## GroupType1              1  0.00385   0.00385  146               0.411    
## as.factor(timePeriod)   4  1.33696   0.33424 5000 <0.0000000000000002 ***
## Residuals             121  0.60110   0.00497                             
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Awake mice: 3

## [1] "Settings:  unique SS "
stratum term df R.Sum.Sq R.Mean.Sq Iter Pr.Prob.
as.factor(MouseNumber) Residuals 7 0.1136644 0.0162378 NA NA
Within GroupType1 1 0.3104018 0.3104018 5000 0
Within as.factor(timePeriod) 4 1.2393094 0.3098273 5000 0
Within Residuals 67 0.3690574 0.0055083 NA NA

Summary

## 
## Error: as.factor(MouseNumber)
## Component 1 :
##           Df R Sum Sq R Mean Sq
## Residuals  7  0.11366  0.016238
## 
## 
## Error: Within
## Component 1 :
##                       Df R Sum Sq R Mean Sq Iter              Pr(Prob)    
## GroupType1             1  0.31040  0.310402 5000 < 0.00000000000000022 ***
## as.factor(timePeriod)  4  1.23931  0.309827 5000 < 0.00000000000000022 ***
## Residuals             67  0.36906  0.005508                               
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Figure 2

Figure 2A

Sleep Types [%] Stacked


Number of individuals:

## [1] 18

Figure 2B

REM [%] x Rank - Baseline

Plot

Stats

Number of mice:

## [1] 18
Summary:

Shapiro-Wilk test

Normality is not violated in any group

Levene’s Test

Df F value Pr(>F)
group 3 2.294382 0.0995947
28 NA NA

Groupwise variances are not heteroscedastic (although a trend exists)

Continuous predictor

Binary predictor

Figure 2C

SWA x Rank - Baseline

Load EEG FFT23:

## [1] "FFT  files: 243"

## [1] 0.8943566

Plot

Stats

Number of mice:

## [1] 18
Summary:

Shapiro-Wilk test

Normality is not violated in any group

Levene’s Test

Df F value Pr(>F)
group 3 0.4157312 0.7429968
29 NA NA

Groupwise variances are not heteroscedastic

Continuous predictor

Binary predictor

Bonus

Min SWA x Rank

  • Why is the minimum slow-wave activity that much lower / close to zero in subordinates during the light phase?

Figure 2D

Fragmentation x Rank - baseline

Plot

Stats

Number of mice:

## [1] 18
Summary:

Shapiro-Wilk test

Normality is not violated in any group

Levene’s Test

Df F value Pr(>F)
group 3 0.9178924 0.4449394
28 NA NA

Groupwise variances are not heteroscedastic (although a trend exists)

Continuous predictor

Binary predictor

Posthoc - Light:

Posthoc - Dark:

Figure 2E

REM Duration x Rank x Stage

Plot

Boxplots

Stats

Number of mice:

## [1] 18
Summary:

Shapiro-Wilk test

Normality is not violated in any group

Levene’s Test

Df F value Pr(>F)
group 11 1.943249 0.0497985
64 NA NA

Groupwise variances are not heteroscedastic (although a trend exists)

Continuous predictor

Dark Phase
Light Phase

Binary predictor

Dark Phase
Light Phase