Code
cat('\014') # clean terminalCode
rm(list = ls()) # clean workspace
library(tidyverse)
library(afex)
library(emmeans)
# library(performance)Physiological signals anlysis
cat('\014') # clean terminalrm(list = ls()) # clean workspace
library(tidyverse)
library(afex)
library(emmeans)
# library(performance)xclude <- c('p13_HA') # male participant
my_dodge <- .3
theme_set(theme_minimal())
a_posteriori <- function(afex_aov, sig_level = .05) {
factors <- as.list(rownames(afex_aov$anova_table))
for (j in 1:length(factors)) {
if (grepl(':', factors[[j]])) {
factors[[j]] <- unlist(strsplit(factors[[j]], ':'))
}
}
p_values <- afex_aov$anova_table$`Pr(>F)`
for (i in 1:length(p_values)) {
if (p_values[i] <= sig_level) {
cat(rep('_', 60), '\n', sep = '')
print(emmeans(afex_aov, factors[[i]], contr = 'pairwise'))
}
}
}sbj_df <- read_csv('../rst_data/sbj_by_group.csv', col_types = cols()) |>
filter(!(sbj %in% xclude)) |>
mutate_if(is.character, as.factor)
hrv_df <- read_csv('../rst_data/hrv_hrf_hra_rsa_rrv_neurokit2.csv', col_types = cols()) |>
filter(!(sbj %in% xclude)) |>
mutate(log10_HRV_RMSSD = log10(HRV_RMSSD)) |>
mutate(log10_RRV_RMSSD = log10(RRV_RMSSD)) |>
mutate(rst = factor(rst)) |>
mutate_if(is.character, as.factor) |>
left_join(sbj_df, by = 'sbj')
ans_df <- read_csv('../rst_data/average_ans_indexes.csv', col_types = cols()) |>
filter(!(sbj %in% xclude)) |>
mutate(rst = factor(rst)) |>
mutate_if(is.character, as.factor) |>
left_join(sbj_df, by = 'sbj')summary(hrv_df) rst sbj heart_rate HRV_MeanNN HRV_SDNN
1:10 p01 :2 Min. :56.93 Min. : 612.4 Min. : 23.90
2: 9 p02 :2 1st Qu.:73.56 1st Qu.: 702.4 1st Qu.: 34.95
p03 :2 Median :80.01 Median : 749.9 Median : 49.17
p04 :2 Mean :79.10 Mean : 772.4 Mean : 60.15
p05 :2 3rd Qu.:85.45 3rd Qu.: 815.8 3rd Qu.: 73.82
p06 :2 Max. :97.98 Max. :1054.0 Max. :128.66
(Other):7
HRV_SDANN1 HRV_SDNNI1 HRV_RMSSD HRV_SDSD
Min. : 9.847 Min. : 21.05 Min. :13.47 Min. :13.48
1st Qu.:12.861 1st Qu.: 31.78 1st Qu.:16.30 1st Qu.:16.31
Median :17.442 Median : 47.05 Median :33.61 Median :33.63
Mean :25.775 Mean : 53.01 Mean :36.27 Mean :36.29
3rd Qu.:33.334 3rd Qu.: 67.60 3rd Qu.:48.98 3rd Qu.:49.03
Max. :99.801 Max. :103.44 Max. :84.44 Max. :84.51
HRV_CVNN HRV_CVSD HRV_MedianNN HRV_MadNN
Min. :0.03334 Min. :0.02111 Min. : 610.0 Min. : 25.20
1st Qu.:0.05110 1st Qu.:0.02363 1st Qu.: 704.5 1st Qu.: 32.62
Median :0.07186 Median :0.04482 Median : 752.5 Median : 50.41
Mean :0.07530 Mean :0.04482 Mean : 773.6 Mean : 63.91
3rd Qu.:0.09783 3rd Qu.:0.05195 3rd Qu.: 816.2 3rd Qu.: 85.99
Max. :0.13098 Max. :0.08681 Max. :1075.0 Max. :148.26
HRV_MCVNN HRV_IQRNN HRV_SDRMSSD HRV_Prc20NN
Min. :0.03515 Min. : 33.00 Min. :1.152 Min. :590.0
1st Qu.:0.05024 1st Qu.: 44.50 1st Qu.:1.459 1st Qu.:663.5
Median :0.07206 Median : 68.00 Median :1.863 Median :697.0
Mean :0.07944 Mean : 88.64 Mean :1.790 Mean :718.5
3rd Qu.:0.11356 3rd Qu.:117.50 3rd Qu.:2.105 3rd Qu.:760.1
Max. :0.13792 Max. :218.00 Max. :2.372 Max. :918.4
HRV_Prc80NN HRV_pNN50 HRV_pNN20 HRV_MinNN
Min. : 633.0 Min. : 0.0000 Min. :12.07 Min. :543.0
1st Qu.: 731.5 1st Qu.: 0.5375 1st Qu.:19.39 1st Qu.:566.5
Median : 814.6 Median :12.6367 Median :49.62 Median :605.0
Mean : 825.4 Mean :15.5540 Mean :44.55 Mean :616.6
3rd Qu.: 881.2 3rd Qu.:25.8440 3rd Qu.:63.89 3rd Qu.:641.5
Max. :1174.4 Max. :50.0000 Max. :77.60 Max. :747.0
HRV_MaxNN HRV_HTI HRV_TINN HRV_VLF
Min. : 711.0 Min. : 7.641 Min. : 0.0 Min. :0.0007005
1st Qu.: 820.0 1st Qu.: 9.706 1st Qu.:125.0 1st Qu.:0.0035392
Median : 915.0 Median :14.113 Median :218.8 Median :0.0065774
Mean : 986.1 Mean :15.158 Mean :199.0 Mean :0.0070226
3rd Qu.:1007.5 3rd Qu.:20.471 3rd Qu.:250.0 3rd Qu.:0.0102485
Max. :2052.0 Max. :25.933 Max. :390.6 Max. :0.0159574
HRV_LF HRV_HF HRV_VHF HRV_TP
Min. :0.001025 Min. :0.0004607 Min. :2.759e-05 Min. :0.003621
1st Qu.:0.006271 1st Qu.:0.0026316 1st Qu.:6.305e-05 1st Qu.:0.017760
Median :0.008456 Median :0.0059839 Median :1.112e-04 Median :0.024193
Mean :0.011121 Mean :0.0080537 Mean :1.894e-04 Mean :0.026386
3rd Qu.:0.014662 3rd Qu.:0.0122480 3rd Qu.:2.845e-04 3rd Qu.:0.031603
Max. :0.031551 Max. :0.0313171 Max. :5.460e-04 Max. :0.055746
HRV_LFHF HRV_LFn HRV_HFn HRV_LnHF
Min. : 0.1840 Min. :0.1303 Min. :0.05569 Min. :-7.683
1st Qu.: 0.8304 1st Qu.:0.2542 1st Qu.:0.14212 1st Qu.:-5.940
Median : 1.5542 Median :0.4074 Median :0.22131 Median :-5.119
Mean : 3.2546 Mean :0.4402 Mean :0.27548 Mean :-5.279
3rd Qu.: 3.0535 3rd Qu.:0.5760 3rd Qu.:0.35721 3rd Qu.:-4.411
Max. :15.7475 Max. :0.8770 Max. :0.70805 Max. :-3.464
HRV_SD1 HRV_SD2 HRV_SD1SD2 HRV_S
Min. : 9.528 Min. : 32.05 Min. :0.2158 Min. : 1078
1st Qu.:11.533 1st Qu.: 47.70 1st Qu.:0.2450 1st Qu.: 1882
Median :23.783 Median : 67.12 Median :0.2789 Median : 5302
Mean :25.663 Mean : 80.85 Mean :0.3111 Mean : 8152
3rd Qu.:34.669 3rd Qu.: 99.19 3rd Qu.:0.3661 3rd Qu.:10198
Max. :59.755 Max. :177.06 Max. :0.4822 Max. :26985
HRV_CSI HRV_CVI HRV_CSI_Modified HRF_PIP
Min. :2.074 Min. :3.740 Min. : 383.7 Min. :0.1842
1st Qu.:2.738 1st Qu.:3.974 1st Qu.: 645.4 1st Qu.:0.3203
Median :3.586 Median :4.431 Median : 985.8 Median :0.3558
Mean :3.425 Mean :4.396 Mean :1085.6 Mean :0.3582
3rd Qu.:4.086 3rd Qu.:4.705 3rd Qu.:1321.6 3rd Qu.:0.4001
Max. :4.634 Max. :5.138 Max. :2978.6 Max. :0.6581
HRF_IALS HRF_PSS HRF_PAS HRA_GI
Min. :0.1722 Min. :0.07407 Min. :0.00000 Min. :49.31
1st Qu.:0.3133 1st Qu.:0.31812 1st Qu.:0.01005 1st Qu.:49.88
Median :0.3428 Median :0.37302 Median :0.02110 Median :50.08
Mean :0.3486 Mean :0.41171 Mean :0.03577 Mean :50.08
3rd Qu.:0.3874 3rd Qu.:0.51418 3rd Qu.:0.03231 3rd Qu.:50.31
Max. :0.6544 Max. :0.87500 Max. :0.28916 Max. :50.58
HRA_SI HRA_AI HRA_PI HRA_C1d
Min. :49.33 Min. :49.29 Min. :40.26 Min. :0.3846
1st Qu.:49.88 1st Qu.:49.89 1st Qu.:46.46 1st Qu.:0.4712
Median :50.08 Median :50.08 Median :49.94 Median :0.5390
Mean :50.07 Mean :50.09 Mean :49.87 Mean :0.5139
3rd Qu.:50.31 3rd Qu.:50.33 3rd Qu.:53.41 3rd Qu.:0.5506
Max. :50.53 Max. :50.61 Max. :58.80 Max. :0.6019
HRA_C1a HRA_SD1d HRA_SD1a HRA_C2d
Min. :0.3981 Min. : 6.839 Min. : 6.635 Min. :0.4101
1st Qu.:0.4494 1st Qu.: 8.541 1st Qu.: 8.123 1st Qu.:0.4517
Median :0.4610 Median :16.891 Median :15.621 Median :0.4825
Mean :0.4861 Mean :18.473 Mean :17.746 Mean :0.4942
3rd Qu.:0.5288 3rd Qu.:24.214 3rd Qu.:24.858 3rd Qu.:0.5294
Max. :0.6154 Max. :44.050 Max. :40.376 Max. :0.5961
HRA_C2a HRA_SD2d HRA_SD2a HRA_Cd
Min. :0.4039 Min. : 23.70 Min. : 21.58 Min. :0.4238
1st Qu.:0.4706 1st Qu.: 34.98 1st Qu.: 32.79 1st Qu.:0.4600
Median :0.5175 Median : 48.75 Median : 49.35 Median :0.4857
Mean :0.5058 Mean : 56.01 Mean : 58.14 Mean :0.4933
3rd Qu.:0.5483 3rd Qu.: 68.59 3rd Qu.: 75.16 3rd Qu.:0.5218
Max. :0.5899 Max. :124.08 Max. :126.32 Max. :0.5739
HRA_Ca HRA_SDNNd HRA_SDNNa HRV_DFA_alpha1
Min. :0.4261 Min. :17.52 Min. :16.24 Min. :0.8627
1st Qu.:0.4782 1st Qu.:25.43 1st Qu.:24.06 1st Qu.:1.1227
Median :0.5143 Median :36.64 Median :35.98 Median :1.3247
Mean :0.5067 Mean :41.80 Mean :43.17 Mean :1.3002
3rd Qu.:0.5400 3rd Qu.:51.45 3rd Qu.:54.25 3rd Qu.:1.4822
Max. :0.5762 Max. :90.46 Max. :91.54 Max. :1.7154
HRV_MFDFA_alpha1_Width HRV_MFDFA_alpha1_Peak HRV_MFDFA_alpha1_Mean
Min. :0.4006 Min. :0.9818 Min. :1.332
1st Qu.:1.7771 1st Qu.:1.3238 1st Qu.:2.083
Median :2.1432 Median :1.4191 Median :2.245
Mean :2.3054 Mean :1.5276 Mean :2.189
3rd Qu.:2.8923 3rd Qu.:1.7779 3rd Qu.:2.330
Max. :4.3748 Max. :2.1800 Max. :2.910
HRV_MFDFA_alpha1_Max HRV_MFDFA_alpha1_Delta HRV_MFDFA_alpha1_Asymmetry
Min. :-3.9578 Min. :-4.2867 Min. :-0.45258
1st Qu.:-2.4729 1st Qu.:-2.7015 1st Qu.:-0.24809
Median :-2.0289 Median :-2.3572 Median :-0.21646
Mean :-1.8284 Mean :-2.1599 Mean :-0.19521
3rd Qu.:-1.3448 3rd Qu.:-1.6809 3rd Qu.:-0.11423
Max. : 0.7756 Max. : 0.3612 Max. :-0.01427
HRV_MFDFA_alpha1_Fluctuation HRV_MFDFA_alpha1_Increment HRV_DFA_alpha2
Min. :0.0007682 Min. :0.02814 Min. :0.2837
1st Qu.:0.0018385 1st Qu.:0.25384 1st Qu.:0.7034
Median :0.0026506 Median :0.34113 Median :0.7743
Mean :0.0037791 Mean :0.45589 Mean :0.7870
3rd Qu.:0.0046505 3rd Qu.:0.62804 3rd Qu.:0.9956
Max. :0.0150599 Max. :1.19559 Max. :1.2302
HRV_MFDFA_alpha2_Width HRV_MFDFA_alpha2_Peak HRV_MFDFA_alpha2_Mean
Min. :0.04726 Min. :0.3404 Min. :0.3254
1st Qu.:0.15337 1st Qu.:0.6434 1st Qu.:0.6746
Median :0.30714 Median :0.7510 Median :0.8270
Mean :0.32790 Mean :0.7706 Mean :0.7863
3rd Qu.:0.40120 3rd Qu.:0.9425 3rd Qu.:0.9220
Max. :0.84463 Max. :1.2527 Max. :1.1439
HRV_MFDFA_alpha2_Max HRV_MFDFA_alpha2_Delta HRV_MFDFA_alpha2_Asymmetry
Min. :-0.1779 Min. :-0.75449 Min. :-1.0000
1st Qu.: 0.6617 1st Qu.:-0.32091 1st Qu.:-0.7297
Median : 0.8522 Median : 0.05081 Median :-0.5151
Mean : 0.7793 Mean : 0.07104 Mean :-0.5071
3rd Qu.: 1.0026 3rd Qu.: 0.46698 3rd Qu.:-0.3153
Max. : 1.3921 Max. : 0.82236 Max. : 0.0000
HRV_MFDFA_alpha2_Fluctuation HRV_MFDFA_alpha2_Increment HRV_ApEn
Min. :1.607e-06 Min. :0.0001865 Min. :0.7752
1st Qu.:6.230e-06 1st Qu.:0.0028098 1st Qu.:1.0650
Median :3.145e-05 Median :0.0072008 Median :1.1741
Mean :5.293e-05 Mean :0.0084653 Mean :1.1246
3rd Qu.:8.005e-05 3rd Qu.:0.0114590 3rd Qu.:1.2148
Max. :2.184e-04 Max. :0.0331763 Max. :1.3393
HRV_SampEn HRV_ShanEn HRV_FuzzyEn HRV_MSEn
Min. :0.7632 Min. :6.480 Min. :0.7674 Min. :0.5614
1st Qu.:1.0877 1st Qu.:6.938 1st Qu.:0.8315 1st Qu.:1.2568
Median :1.2281 Median :7.387 Median :0.9300 Median :1.3826
Mean :1.1887 Mean :7.367 Mean :0.9588 Mean :1.3443
3rd Qu.:1.3314 3rd Qu.:7.755 3rd Qu.:1.0292 3rd Qu.:1.4935
Max. :1.5203 Max. :8.129 Max. :1.2578 Max. :1.6308
HRV_CMSEn HRV_RCMSEn HRV_CD HRV_HFD
Min. :1.166 Min. :1.844 Min. :1.253 Min. :1.489
1st Qu.:1.335 1st Qu.:2.023 1st Qu.:1.563 1st Qu.:1.548
Median :1.365 Median :2.137 Median :1.640 Median :1.705
Mean :1.356 Mean :2.077 Mean :1.616 Mean :1.702
3rd Qu.:1.404 3rd Qu.:2.175 3rd Qu.:1.708 3rd Qu.:1.788
Max. :1.449 Max. :2.194 Max. :1.778 Max. :1.947
HRV_KFD HRV_LZC RSA_P2T_Mean RSA_P2T_Mean_log
Min. :2.111 Min. :0.4645 Min. : 33.12 Min. :3.500
1st Qu.:2.688 1st Qu.:0.5879 1st Qu.: 40.46 1st Qu.:3.697
Median :2.927 Median :0.6761 Median : 74.24 Median :4.307
Mean :3.052 Mean :0.6554 Mean : 90.48 Mean :4.315
3rd Qu.:3.173 3rd Qu.:0.7419 3rd Qu.:121.90 3rd Qu.:4.798
Max. :5.201 Max. :0.8206 Max. :245.96 Max. :5.505
RSA_P2T_SD RSA_P2T_NoRSA RSA_PorgesBohrer RSA_Gates_Mean
Min. : 19.06 Min. : 0.000 Min. :-6.434 Min. :7.321
1st Qu.: 25.67 1st Qu.: 0.000 1st Qu.:-5.736 1st Qu.:7.619
Median : 37.16 Median : 0.000 Median :-5.207 Median :7.941
Mean : 43.70 Mean : 1.105 Mean :-5.131 Mean :7.905
3rd Qu.: 52.89 3rd Qu.: 0.000 3rd Qu.:-4.684 3rd Qu.:8.141
Max. :101.04 Max. :19.000 Max. :-3.831 Max. :8.520
RSA_Gates_Mean_log RSA_Gates_SD rsp_rate RRV_RMSSD
Min. :1.991 Min. :0.0634 Min. : 5.755 Min. : 706.8
1st Qu.:2.031 1st Qu.:0.1028 1st Qu.:10.190 1st Qu.:1196.3
Median :2.072 Median :0.1648 Median :13.195 Median :1627.2
Mean :2.066 Mean :0.1634 Mean :11.974 Mean :1803.0
3rd Qu.:2.097 3rd Qu.:0.2134 3rd Qu.:13.749 3rd Qu.:2363.7
Max. :2.142 Max. :0.3092 Max. :19.848 Max. :3882.6
RRV_MeanBB RRV_SDBB RRV_SDSD RRV_CVBB
Min. : 3023 Min. : 599.9 Min. : 709.5 Min. :0.1383
1st Qu.: 4364 1st Qu.: 878.0 1st Qu.:1201.5 1st Qu.:0.1706
Median : 4547 Median :1185.6 Median :1633.1 Median :0.2315
Mean : 5612 Mean :1353.9 Mean :1813.3 Mean :0.2481
3rd Qu.: 5916 3rd Qu.:1758.2 3rd Qu.:2382.8 3rd Qu.:0.2778
Max. :10425 Max. :2435.4 Max. :3916.5 Max. :0.4716
RRV_CVSD RRV_MedianBB RRV_MadBB RRV_MCVBB
Min. :0.1630 Min. :2578 Min. : 409.9 Min. :0.09531
1st Qu.:0.2403 1st Qu.:4274 1st Qu.: 723.1 1st Qu.:0.17267
Median :0.3128 Median :4376 Median : 807.3 Median :0.18481
Mean :0.3227 Mean :5429 Mean :1064.7 Mean :0.18669
3rd Qu.:0.3893 3rd Qu.:5470 3rd Qu.:1139.0 3rd Qu.:0.19850
Max. :0.5966 Max. :9956 Max. :2548.6 Max. :0.27122
RRV_VLF RRV_LF RRV_HF RRV_LFHF
Min. :0.002629 Min. :0.001033 Min. :1.601e-06 Min. : 11.42
1st Qu.:0.008751 1st Qu.:0.003532 1st Qu.:3.688e-05 1st Qu.: 27.92
Median :0.009491 Median :0.005793 Median :1.409e-04 Median : 54.78
Mean :0.010676 Mean :0.007790 Mean :2.656e-04 Mean : 436.68
3rd Qu.:0.014727 3rd Qu.:0.010557 3rd Qu.:2.674e-04 3rd Qu.: 167.48
Max. :0.018828 Max. :0.021140 Max. :1.493e-03 Max. :4578.13
RRV_LFn RRV_HFn RRV_SD1 RRV_SD2
Min. :0.1046 Min. :9.909e-05 Min. : 501.7 Min. : 684.1
1st Qu.:0.3039 1st Qu.:3.327e-03 1st Qu.: 849.6 1st Qu.: 984.0
Median :0.4296 Median :8.724e-03 Median :1154.8 Median :1204.6
Mean :0.3998 Mean :1.140e-02 Mean :1282.2 Mean :1405.0
3rd Qu.:0.4899 3rd Qu.:1.530e-02 3rd Qu.:1684.9 3rd Qu.:1788.7
Max. :0.6398 Max. :4.518e-02 Max. :2769.4 Max. :2677.9
RRV_SD2SD1 RRV_ApEn RRV_SampEn RRV_DFA_alpha2
Min. :0.695 Min. :0.3194 Min. :1.055 Min. :0.4389
1st Qu.:1.009 1st Qu.:0.6798 1st Qu.:1.482 1st Qu.:0.6000
Median :1.130 Median :0.7644 Median :1.946 Median :0.6939
Mean :1.164 Mean :0.6899 Mean :1.842 Mean :0.7185
3rd Qu.:1.343 3rd Qu.:0.7987 3rd Qu.:2.199 3rd Qu.:0.8255
Max. :1.662 Max. :0.8982 Max. :2.708 Max. :0.9973
NA's :3
RRV_MFDFA_alpha2_Width RRV_MFDFA_alpha2_Peak RRV_MFDFA_alpha2_Mean
Min. :0.0609 Min. :0.5871 Min. :0.5709
1st Qu.:0.4496 1st Qu.:0.7548 1st Qu.:0.7255
Median :0.6970 Median :0.8453 Median :0.8398
Mean :0.7246 Mean :0.8538 Mean :0.8270
3rd Qu.:1.0321 3rd Qu.:0.9189 3rd Qu.:0.9111
Max. :1.5548 Max. :1.2440 Max. :1.2470
NA's :3 NA's :3 NA's :3
RRV_MFDFA_alpha2_Max RRV_MFDFA_alpha2_Delta RRV_MFDFA_alpha2_Asymmetry
Min. :-0.09285 Min. :-0.5492 Min. :-0.9023
1st Qu.: 0.16885 1st Qu.:-0.1769 1st Qu.:-0.7049
Median : 0.48893 Median : 0.1014 Median :-0.5410
Mean : 0.46856 Mean : 0.1042 Mean :-0.5843
3rd Qu.: 0.82494 3rd Qu.: 0.3519 3rd Qu.:-0.4836
Max. : 1.00789 Max. : 1.2769 Max. :-0.3049
NA's :3 NA's :3 NA's :3
RRV_MFDFA_alpha2_Fluctuation RRV_MFDFA_alpha2_Increment log10_HRV_RMSSD
Min. :3.450e-06 Min. :0.0004189 Min. :1.129
1st Qu.:2.298e-05 1st Qu.:0.0091523 1st Qu.:1.211
Median :7.326e-05 Median :0.0280617 Median :1.527
Mean :1.985e-04 Mean :0.0423932 Mean :1.486
3rd Qu.:3.152e-04 3rd Qu.:0.0725266 3rd Qu.:1.680
Max. :1.110e-03 Max. :0.1437650 Max. :1.927
NA's :3 NA's :3
log10_RRV_RMSSD group
Min. :2.849 control:12
1st Qu.:3.077 study : 7
Median :3.211
Mean :3.205
3rd Qu.:3.373
Max. :3.589
heart_rate_anova <- aov_ez('sbj',
'heart_rate', hrv_df,
within = c('rst'), between = c('group'))
heart_rate_afex_plot <-
afex_plot(
heart_rate_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(heart_rate_afex_plot))print(heart_rate_anova)Anova Table (Type 3 tests)
Response: heart_rate
Effect df MSE F ges p.value
1 group 1, 7 104.26 5.59 + .428 .050
2 rst 1, 7 6.99 12.94 ** .104 .009
3 group:rst 1, 7 6.99 5.80 * .049 .047
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(heart_rate_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 84.7 2.43 7 79.0 90.5
X2 80.0 2.83 7 73.3 86.7
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 4.76 1.32 7 3.597 0.0088
Results are averaged over the levels of: group
____________________________________________________________
$emmeans
group rst emmean SE df lower.CL upper.CL
control X1 77.1 2.80 7 70.5 83.7
study X1 92.3 3.96 7 83.0 101.7
control X2 75.5 3.27 7 67.8 83.3
study X2 84.4 4.62 7 73.5 95.3
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
control X1 - study X1 -15.25 4.85 7 -3.143 0.0621
control X1 - control X2 1.57 1.53 7 1.029 0.7389
control X1 - study X2 -7.31 5.41 7 -1.352 0.5625
study X1 - control X2 16.82 5.14 7 3.275 0.0524
study X1 - study X2 7.94 2.16 7 3.678 0.0313
control X2 - study X2 -8.88 5.66 7 -1.568 0.4513
P value adjustment: tukey method for comparing a family of 4 estimates
sdnn_anova <- aov_ez('sbj',
'HRV_SDNN', hrv_df,
within = c('rst'), between = c('group'))
sdnn_afex_plot <-
afex_plot(
sdnn_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(sdnn_afex_plot))print(sdnn_anova)Anova Table (Type 3 tests)
Response: HRV_SDNN
Effect df MSE F ges p.value
1 group 1, 7 1329.02 0.65 .079 .445
2 rst 1, 7 124.27 6.90 * .078 .034
3 group:rst 1, 7 124.27 0.85 .010 .387
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(sdnn_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 46.6 9.29 7 24.6 68.5
X2 61.2 9.76 7 38.1 84.3
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -14.6 5.57 7 -2.627 0.0341
Results are averaged over the levels of: group
cvnn_anova <- aov_ez('sbj',
'HRV_CVNN', hrv_df,
within = c('rst'), between = c('group'))
cvnn_afex_plot <-
afex_plot(
cvnn_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(cvnn_afex_plot))print(cvnn_anova)Anova Table (Type 3 tests)
Response: HRV_CVNN
Effect df MSE F ges p.value
1 group 1, 7 0.00 0.19 .025 .676
2 rst 1, 7 0.00 8.37 * .075 .023
3 group:rst 1, 7 0.00 1.26 .012 .299
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(cvnn_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 0.0633 0.0110 7 0.0372 0.0894
X2 0.0792 0.0101 7 0.0553 0.1030
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -0.0159 0.00549 7 -2.893 0.0232
Results are averaged over the levels of: group
rmssd_anova <- aov_ez('sbj',
'log10_HRV_RMSSD', hrv_df,
within = c('rst'), between = c('group'))
rmssd_afex_plot <-
afex_plot(
rmssd_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(rmssd_afex_plot))print(rmssd_anova)Anova Table (Type 3 tests)
Response: log10_HRV_RMSSD
Effect df MSE F ges p.value
1 group 1, 7 0.12 1.59 .179 .247
2 rst 1, 7 0.01 7.91 * .049 .026
3 group:rst 1, 7 0.01 2.20 .014 .182
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(rmssd_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 1.38 0.0911 7 1.16 1.59
X2 1.49 0.0889 7 1.28 1.70
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -0.108 0.0385 7 -2.812 0.0261
Results are averaged over the levels of: group
# check_autocorrelation(rmssd_anova)
# check_heteroscedasticity(rmssd_anova)
# plot(check_collinearity(rmssd_anova))
# normy <- check_normality(rmssd_anova)
# plot(normy, type = 'density')
# plot(normy, type = 'qq')iqrnn_anova <- aov_ez('sbj',
'HRV_IQRNN', hrv_df,
within = c('rst'), between = c('group'))
iqrnn_afex_plot <-
afex_plot(
iqrnn_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(iqrnn_afex_plot))print(iqrnn_anova)Anova Table (Type 3 tests)
Response: HRV_IQRNN
Effect df MSE F ges p.value
1 group 1, 7 3520.07 0.66 .080 .442
2 rst 1, 7 327.69 5.42 + .062 .053
3 group:rst 1, 7 327.69 0.98 .012 .356
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(iqrnn_anova)hti_anova <- aov_ez('sbj',
'HRV_HTI', hrv_df,
within = c('rst'), between = c('group'))
hti_afex_plot <-
afex_plot(
hti_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(hti_afex_plot))print(hti_anova)Anova Table (Type 3 tests)
Response: HRV_HTI
Effect df MSE F ges p.value
1 group 1, 7 60.80 0.33 .043 .583
2 rst 1, 7 3.36 7.10 * .050 .032
3 group:rst 1, 7 3.36 6.14 * .044 .042
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(hti_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 13.0 2.17 7 7.84 18.1
X2 15.4 1.82 7 11.09 19.7
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -2.44 0.916 7 -2.665 0.0322
Results are averaged over the levels of: group
____________________________________________________________
$emmeans
group rst emmean SE df lower.CL upper.CL
control X1 15.2 2.50 7 9.31 21.1
study X1 10.7 3.54 7 2.34 19.1
control X2 15.4 2.11 7 10.42 20.4
study X2 15.4 2.98 7 8.38 22.5
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
control X1 - study X1 4.516 4.33 7 1.042 0.7321
control X1 - control X2 -0.171 1.06 7 -0.162 0.9983
control X1 - study X2 -0.196 3.89 7 -0.050 0.9999
study X1 - control X2 -4.688 4.12 7 -1.139 0.6797
study X1 - study X2 -4.713 1.50 7 -3.150 0.0616
control X2 - study X2 -0.025 3.65 7 -0.007 1.0000
P value adjustment: tukey method for comparing a family of 4 estimates
3 middle minutes in each block to avoid block transitions
CSI_ave_anova <- aov_ez('sbj',
'CSI_ave', ans_df,
within = c('rst'), between = c('group'))
CSI_ave_afex_plot <-
afex_plot(
CSI_ave_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(CSI_ave_afex_plot))print(CSI_ave_anova)Anova Table (Type 3 tests)
Response: CSI_ave
Effect df MSE F ges p.value
1 group 1, 7 0.03 3.59 + .321 .100
2 rst 1, 7 0.00 8.89 * .090 .020
3 group:rst 1, 7 0.00 2.35 .025 .169
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(CSI_ave_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 2.08 0.0416 7 1.98 2.18
X2 2.16 0.0533 7 2.03 2.28
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -0.0794 0.0266 7 -2.982 0.0205
Results are averaged over the levels of: group
3 middle minutes in each block to avoid block transitions
CPI_ave_anova <- aov_ez('sbj',
'CPI_ave', ans_df,
within = c('rst'), between = c('group'))
CPI_ave_afex_plot <-
afex_plot(
CPI_ave_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(CPI_ave_afex_plot))print(CPI_ave_anova)Anova Table (Type 3 tests)
Response: CPI_ave
Effect df MSE F ges p.value
1 group 1, 7 0.12 2.82 .274 .137
2 rst 1, 7 0.01 5.91 * .050 .045
3 group:rst 1, 7 0.01 1.36 .012 .281
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(CPI_ave_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 2.22 0.0789 7 2.03 2.41
X2 2.33 0.0977 7 2.10 2.56
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -0.107 0.0441 7 -2.432 0.0453
Results are averaged over the levels of: group
lfn_anova <- aov_ez('sbj',
'HRV_LFn', hrv_df,
within = c('rst'), between = c('group'))
lfn_afex_plot <-
afex_plot(
lfn_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(lfn_afex_plot))print(lfn_anova)Anova Table (Type 3 tests)
Response: HRV_LFn
Effect df MSE F ges p.value
1 group 1, 7 0.10 0.14 .016 .717
2 rst 1, 7 0.03 0.03 <.001 .863
3 group:rst 1, 7 0.03 3.04 .086 .125
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(lfn_anova)hfn_anova <- aov_ez('sbj',
'HRV_HFn', hrv_df,
within = c('rst'), between = c('group'))
hfn_afex_plot <-
afex_plot(
hfn_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(hfn_afex_plot))print(hfn_anova)Anova Table (Type 3 tests)
Response: HRV_HFn
Effect df MSE F ges p.value
1 group 1, 7 0.04 1.15 .096 .319
2 rst 1, 7 0.02 0.66 .032 .443
3 group:rst 1, 7 0.02 1.84 .085 .217
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(hfn_anova)hrv_df$HRV_lnLF_lnHF <- log(hrv_df$HRV_LFn) - log(hrv_df$HRV_HFn)
lfhf_anova <- aov_ez('sbj',
'HRV_lnLF_lnHF', hrv_df,
within = c('rst'), between = c('group'))
lfhf_afex_plot <-
afex_plot(
lfhf_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(lfhf_afex_plot))print(lfhf_anova)Anova Table (Type 3 tests)
Response: HRV_lnLF_lnHF
Effect df MSE F ges p.value
1 group 1, 7 2.20 0.49 .049 .505
2 rst 1, 7 0.84 0.24 .009 .638
3 group:rst 1, 7 0.84 2.87 .101 .134
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(lfhf_anova)hrv_df$hr_to_hrv <- hrv_df$heart_rate / hrv_df$HRV_LFn
hr_to_hrv_anova <- aov_ez('sbj',
'hr_to_hrv', hrv_df,
within = c('rst'), between = c('group'))
hr_to_hrv_afex_plot <-
afex_plot(
hr_to_hrv_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(hr_to_hrv_afex_plot))print(hr_to_hrv_anova)Anova Table (Type 3 tests)
Response: hr_to_hrv
Effect df MSE F ges p.value
1 group 1, 7 23677.21 0.44 .041 .527
2 rst 1, 7 11843.02 0.23 .011 .648
3 group:rst 1, 7 11843.02 1.44 .064 .269
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(hr_to_hrv_anova)sd2_anova <- aov_ez('sbj',
'HRV_SD2', hrv_df,
within = c('rst'), between = c('group'))
sd2_afex_plot <-
afex_plot(
sd2_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(sd2_afex_plot))print(sd2_anova)Anova Table (Type 3 tests)
Response: HRV_SD2
Effect df MSE F ges p.value
1 group 1, 7 2286.13 0.54 .066 .485
2 rst 1, 7 231.38 7.04 * .085 .033
3 group:rst 1, 7 231.38 0.86 .011 .383
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(sd2_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 62.5 12.4 7 33.3 91.7
X2 82.7 12.7 7 52.6 112.8
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -20.2 7.61 7 -2.653 0.0328
Results are averaged over the levels of: group
sd1sd2_anova <- aov_ez('sbj',
'HRV_SD1SD2', hrv_df,
within = c('rst'), between = c('group'))
sd1sd2_afex_plot <-
afex_plot(
sd1sd2_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(sd1sd2_afex_plot))print(sd1sd2_anova)Anova Table (Type 3 tests)
Response: HRV_SD1SD2
Effect df MSE F ges p.value
1 group 1, 7 0.01 3.42 .314 .107
2 rst 1, 7 0.00 1.76 .015 .227
3 group:rst 1, 7 0.00 0.75 .006 .416
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(sd1sd2_anova)pip_anova <- aov_ez('sbj',
'HRF_PIP', hrv_df,
within = c('rst'), between = c('group'))
pip_afex_plot <-
afex_plot(
pip_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(pip_afex_plot))print(pip_anova)Anova Table (Type 3 tests)
Response: HRF_PIP
Effect df MSE F ges p.value
1 group 1, 7 0.01 0.24 .031 .641
2 rst 1, 7 0.00 0.00 <.001 .971
3 group:rst 1, 7 0.00 0.43 .003 .531
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(pip_anova)ials_anova <- aov_ez('sbj',
'HRF_IALS', hrv_df,
within = c('rst'), between = c('group'))
ials_afex_plot <-
afex_plot(
ials_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(ials_afex_plot))print(ials_anova)Anova Table (Type 3 tests)
Response: HRF_IALS
Effect df MSE F ges p.value
1 group 1, 7 0.01 0.27 .035 .620
2 rst 1, 7 0.00 0.02 <.001 .898
3 group:rst 1, 7 0.00 0.60 .005 .463
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(ials_anova)pss_anova <- aov_ez('sbj',
'HRF_PSS', hrv_df,
within = c('rst'), between = c('group'))
pss_afex_plot <-
afex_plot(
pss_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(pss_afex_plot))print(pss_anova)Anova Table (Type 3 tests)
Response: HRF_PSS
Effect df MSE F ges p.value
1 group 1, 7 0.05 0.34 .044 .577
2 rst 1, 7 0.00 0.21 .002 .658
3 group:rst 1, 7 0.00 1.04 .008 .341
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(pss_anova)pas_anova <- aov_ez('sbj',
'HRF_PAS', hrv_df,
within = c('rst'), between = c('group'))
pas_afex_plot <-
afex_plot(
pas_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(pas_afex_plot))print(pas_anova)Anova Table (Type 3 tests)
Response: HRF_PAS
Effect df MSE F ges p.value
1 group 1, 7 0.00 0.01 .002 .911
2 rst 1, 7 0.00 0.03 <.001 .864
3 group:rst 1, 7 0.00 0.02 <.001 .883
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(pas_anova)gi_anova <- aov_ez('sbj',
'HRA_GI', hrv_df,
within = c('rst'), between = c('group'))
gi_afex_plot <-
afex_plot(
gi_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(gi_afex_plot))print(gi_anova)Anova Table (Type 3 tests)
Response: HRA_GI
Effect df MSE F ges p.value
1 group 1, 7 0.11 0.75 .065 .416
2 rst 1, 7 0.06 0.02 .001 .892
3 group:rst 1, 7 0.06 0.50 .025 .502
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(gi_anova)si_anova <- aov_ez('sbj',
'HRA_SI', hrv_df,
within = c('rst'), between = c('group'))
si_afex_plot <-
afex_plot(
si_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(si_afex_plot))print(si_anova)Anova Table (Type 3 tests)
Response: HRA_SI
Effect df MSE F ges p.value
1 group 1, 7 0.11 0.62 .053 .458
2 rst 1, 7 0.06 0.00 <.001 .981
3 group:rst 1, 7 0.06 0.51 .026 .499
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(si_anova)ai_anova <- aov_ez('sbj',
'HRA_AI', hrv_df,
within = c('rst'), between = c('group'))
ai_afex_plot <-
afex_plot(
ai_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(ai_afex_plot))print(ai_anova)Anova Table (Type 3 tests)
Response: HRA_AI
Effect df MSE F ges p.value
1 group 1, 7 0.12 0.87 .076 .381
2 rst 1, 7 0.06 0.07 .003 .804
3 group:rst 1, 7 0.06 0.50 .024 .502
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(ai_anova)pi_anova <- aov_ez('sbj',
'HRA_PI', hrv_df,
within = c('rst'), between = c('group'))
pi_afex_plot <-
afex_plot(
pi_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(pi_afex_plot))print(pi_anova)Anova Table (Type 3 tests)
Response: HRA_PI
Effect df MSE F ges p.value
1 group 1, 7 57.06 1.02 .114 .346
2 rst 1, 7 7.96 0.08 .001 .789
3 group:rst 1, 7 7.96 0.73 .013 .420
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(pi_anova)sdnnd_anova <- aov_ez('sbj',
'HRA_SDNNd', hrv_df,
within = c('rst'), between = c('group'))
sdnnd_afex_plot <-
afex_plot(
sdnnd_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(sdnnd_afex_plot))print(sdnnd_anova)Anova Table (Type 3 tests)
Response: HRA_SDNNd
Effect df MSE F ges p.value
1 group 1, 7 561.31 0.83 .097 .393
2 rst 1, 7 56.16 6.86 * .082 .034
3 group:rst 1, 7 56.16 1.03 .013 .345
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(sdnnd_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 32.4 6.18 7 17.8 47
X2 42.2 6.24 7 27.4 57
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -9.81 3.75 7 -2.619 0.0344
Results are averaged over the levels of: group
sdnna_anova <- aov_ez('sbj',
'HRA_SDNNa', hrv_df,
within = c('rst'), between = c('group'))
sdnna_afex_plot <-
afex_plot(
sdnnd_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(sdnna_afex_plot))print(sdnna_anova)Anova Table (Type 3 tests)
Response: HRA_SDNNa
Effect df MSE F ges p.value
1 group 1, 7 782.80 0.51 .063 .497
2 rst 1, 7 71.46 6.56 * .073 .037
3 group:rst 1, 7 71.46 0.70 .008 .430
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(sdnna_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 33.4 6.99 7 16.9 49.9
X2 44.2 7.61 7 26.2 62.2
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -10.8 4.23 7 -2.562 0.0375
Results are averaged over the levels of: group
sampen_anova <- aov_ez('sbj',
'HRV_SampEn', hrv_df,
within = c('rst'), between = c('group'))
sampen_afex_plot <-
afex_plot(
sampen_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(sampen_afex_plot))print(sampen_anova)Anova Table (Type 3 tests)
Response: HRV_SampEn
Effect df MSE F ges p.value
1 group 1, 7 0.08 0.04 .005 .849
2 rst 1, 7 0.01 1.71 .027 .233
3 group:rst 1, 7 0.01 1.06 .017 .338
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(sampen_anova)shanen_anova <- aov_ez('sbj',
'HRV_ShanEn', hrv_df,
within = c('rst'), between = c('group'))
shanen_afex_plot <-
afex_plot(
shanen_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(shanen_afex_plot))print(shanen_anova)Anova Table (Type 3 tests)
Response: HRV_ShanEn
Effect df MSE F ges p.value
1 group 1, 7 0.52 0.22 .030 .651
2 rst 1, 7 0.02 21.05 ** .111 .003
3 group:rst 1, 7 0.02 3.03 .018 .125
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(shanen_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 7.14 0.202 7 6.66 7.62
X2 7.49 0.165 7 7.10 7.88
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -0.345 0.0752 7 -4.588 0.0025
Results are averaged over the levels of: group
hrv_df$rsp_rate <- 60000 / hrv_df$RRV_MeanBB
rsp_rate_anova <- aov_ez('sbj',
'rsp_rate', hrv_df,
within = c('rst'), between = c('group'))
rsp_rate_afex_plot <-
afex_plot(
rsp_rate_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(rsp_rate_afex_plot))print(rsp_rate_anova)Anova Table (Type 3 tests)
Response: rsp_rate
Effect df MSE F ges p.value
1 group 1, 7 20.88 0.01 .001 .929
2 rst 1, 7 3.17 0.29 .005 .608
3 group:rst 1, 7 3.17 0.00 <.001 .983
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(rsp_rate_anova)rrmssd_anova <- aov_ez('sbj',
'log10_RRV_RMSSD', hrv_df,
within = c('rst'), between = c('group'))
rrmssd_afex_plot <-
afex_plot(
rrmssd_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(rrmssd_afex_plot))print(rrmssd_anova)Anova Table (Type 3 tests)
Response: log10_RRV_RMSSD
Effect df MSE F ges p.value
1 group 1, 7 0.08 0.05 .006 .830
2 rst 1, 7 0.02 5.66 * .146 .049
3 group:rst 1, 7 0.02 0.04 .001 .854
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(rrmssd_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 3.12 0.0665 7 2.97 3.28
X2 3.30 0.0909 7 3.08 3.51
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -0.174 0.0734 7 -2.378 0.0490
Results are averaged over the levels of: group
rrv_sd2_anova <- aov_ez('sbj',
'RRV_SD2', hrv_df,
within = c('rst'), between = c('group'))
rrv_sd2_afex_plot <-
afex_plot(
rrv_sd2_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(rrv_sd2_afex_plot))print(rrv_sd2_anova)Anova Table (Type 3 tests)
Response: RRV_SD2
Effect df MSE F ges p.value
1 group 1, 7 497871.65 1.13 .113 .324
2 rst 1, 7 130106.30 7.83 * .188 .027
3 group:rst 1, 7 130106.30 0.01 <.001 .921
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(rrv_sd2_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 1201 153 7 839 1564
X2 1706 235 7 1151 2261
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -505 180 7 -2.797 0.0266
Results are averaged over the levels of: group
RRV_SD2SD1_anova <- aov_ez('sbj',
'RRV_SD2SD1', hrv_df,
within = c('rst'), between = c('group'))
RRV_SD2SD1_afex_plot <-
afex_plot(
RRV_SD2SD1_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(RRV_SD2SD1_afex_plot))print(RRV_SD2SD1_anova)Anova Table (Type 3 tests)
Response: RRV_SD2SD1
Effect df MSE F ges p.value
1 group 1, 7 0.09 2.19 .199 .183
2 rst 1, 7 0.02 0.69 .020 .434
3 group:rst 1, 7 0.02 0.98 .028 .356
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(RRV_SD2SD1_anova)RRV_ApEn_anova <- aov_ez('sbj',
'RRV_ApEn', hrv_df,
within = c('rst'), between = c('group'))
RRV_ApEn_afex_plot <-
afex_plot(
RRV_ApEn_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(RRV_ApEn_afex_plot))print(RRV_ApEn_anova)Anova Table (Type 3 tests)
Response: RRV_ApEn
Effect df MSE F ges p.value
1 group 1, 7 0.06 0.00 <.001 .955
2 rst 1, 7 0.02 0.27 .011 .617
3 group:rst 1, 7 0.02 1.03 .040 .344
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(RRV_ApEn_anova)rsa_p2t_anova <- aov_ez('sbj',
'RSA_P2T_Mean_log', hrv_df,
within = c('rst'), between = c('group'))
rsa_p2t_afex_plot <-
afex_plot(
rsa_p2t_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(rsa_p2t_afex_plot))print(rsa_p2t_anova)Anova Table (Type 3 tests)
Response: RSA_P2T_Mean_log
Effect df MSE F ges p.value
1 group 1, 7 0.88 0.66 .085 .442
2 rst 1, 7 0.02 6.16 * .020 .042
3 group:rst 1, 7 0.02 1.45 .005 .268
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(rsa_p2t_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 4.18 0.230 7 3.64 4.72
X2 4.36 0.244 7 3.78 4.94
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -0.178 0.0717 7 -2.482 0.0421
Results are averaged over the levels of: group
rsa_pogboh_anova <- aov_ez('sbj',
'RSA_PorgesBohrer', hrv_df,
within = c('rst'), between = c('group'))
rsa_pogboh_afex_plot <-
afex_plot(
rsa_pogboh_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(rsa_pogboh_afex_plot))print(rsa_pogboh_anova)Anova Table (Type 3 tests)
Response: RSA_PorgesBohrer
Effect df MSE F ges p.value
1 group 1, 7 0.89 0.03 .004 .862
2 rst 1, 7 0.20 0.11 .003 .749
3 group:rst 1, 7 0.20 3.00 .071 .127
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(rsa_pogboh_anova)rsa_gates_anova <- aov_ez('sbj',
'RSA_Gates_Mean_log', hrv_df,
within = c('rst'), between = c('group'))
rsa_gates_afex_plot <-
afex_plot(
rsa_gates_anova,
x = 'rst',
trace = 'group',
error = 'within',
error_arg = list(width = .15),
dodge = my_dodge,
data_arg = list(
position =
position_jitterdodge(
jitter.width = .1,
dodge.width = my_dodge
)),
mapping = c('color'),
point_arg = list(size = 4)
)
suppressWarnings(print(rsa_gates_afex_plot))print(rsa_gates_anova)Anova Table (Type 3 tests)
Response: RSA_Gates_Mean_log
Effect df MSE F ges p.value
1 group 1, 7 0.00 3.00 .293 .127
2 rst 1, 7 0.00 12.09 * .059 .010
3 group:rst 1, 7 0.00 7.87 * .039 .026
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '+' 0.1 ' ' 1
a_posteriori(rsa_gates_anova)____________________________________________________________
$emmeans
rst emmean SE df lower.CL upper.CL
X1 2.05 0.0139 7 2.01 2.08
X2 2.06 0.0142 7 2.03 2.10
Results are averaged over the levels of: group
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
X1 - X2 -0.0186 0.00534 7 -3.477 0.0103
Results are averaged over the levels of: group
____________________________________________________________
$emmeans
group rst emmean SE df lower.CL upper.CL
control X1 2.08 0.0160 7 2.04 2.11
study X1 2.01 0.0226 7 1.96 2.07
control X2 2.08 0.0164 7 2.04 2.12
study X2 2.05 0.0233 7 1.99 2.10
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
control X1 - study X1 0.06279 0.02770 7 2.266 0.1954
control X1 - control X2 -0.00358 0.00617 7 -0.581 0.9348
control X1 - study X2 0.02923 0.02820 7 1.036 0.7355
study X1 - control X2 -0.06637 0.02800 7 -2.373 0.1702
study X1 - study X2 -0.03355 0.00872 7 -3.848 0.0253
control X2 - study X2 0.03282 0.02850 7 1.152 0.6721
P value adjustment: tukey method for comparing a family of 4 estimates