Boxplots
Mean HR
meanHRplot <- ggplot(data = HR_Data_Full, aes(x=Epoch, y=Mean.HR)) +
geom_boxplot() +
facet_grid(. ~ CPET, labeller = label_both)
meanHRplot

RMSSD
RMSSDplot <- ggplot(data = HR_Data_Full, aes(x=Epoch, y=RMSSD)) +
geom_boxplot() +
facet_grid(. ~ CPET, labeller = label_both)
RMSSDplot

lnHFP
lnHFPplot <- ggplot(data = HR_Data_Full, aes(x=Epoch, y=lnHFP)) +
geom_boxplot() +
facet_grid(. ~ CPET, labeller = label_both)
lnHFPplot

lnLFP
lnLFPplot <- ggplot(data = HR_Data_Full, aes(x=Epoch, y=lnLFP)) +
geom_boxplot() +
facet_grid(. ~ CPET, labeller = label_both)
lnLFPplot

LF.HF.ratio
LF.HF.ratioplot <- ggplot(data = HR_Data_Full, aes(x=Epoch, y=LF.HF.ratio)) +
geom_boxplot() +
facet_grid(. ~ CPET, labeller = label_both)
LF.HF.ratioplot

Repeated Measures ANOVA - HRV at peak exercise
peakData <- filter(HR_Data_Full, Epoch == "Max")
Mean HR at Peak Exercise
hist(peakData$Mean.HR)

Mean.HRplot2 <- ggplot(data = peakData, aes(x=CPET, y=Mean.HR)) +
geom_boxplot()
Mean.HRplot2

repeatMean.HR<-ezANOVA(data=peakData, dv=.(Mean.HR), wid=.(ID), within=.(CPET), detailed = TRUE, return_aov = TRUE)
repeatMean.HR
## $ANOVA
## Effect DFn DFd SSn SSd F p p<.05
## 1 (Intercept) 1 20 793258.27373 12639.1519 1.255240e+03 1.597713e-19 *
## 2 CPET 1 20 1.04754 650.2048 3.222185e-02 8.593478e-01
## ges
## 1 9.835232e-01
## 2 7.881929e-05
##
## $aov
##
## Call:
## aov(formula = formula(aov_formula), data = data)
##
## Grand Mean: 137.4304
##
## Stratum 1: ID
##
## Terms:
## Residuals
## Sum of Squares 12639.15
## Deg. of Freedom 20
##
## Residual standard error: 25.13877
##
## Stratum 2: ID:CPET
##
## Terms:
## CPET Residuals
## Sum of Squares 1.0475 650.2048
## Deg. of Freedom 1 20
##
## Residual standard error: 5.701775
## Estimated effects are balanced
RMSSD at Peak Exercise
hist(peakData$RMSSD)

hist(peakData$lnRMSSD)

RMSSDplot2 <- ggplot(data = peakData, aes(x=CPET, y=RMSSD)) +
geom_boxplot()
RMSSDplot2

repeatRMSSD<-ezANOVA(data=peakData, dv=.(lnRMSSD), wid=.(ID), within=.(CPET), detailed = TRUE, return_aov = TRUE)
repeatRMSSD
## $ANOVA
## Effect DFn DFd SSn SSd F p p<.05
## 1 (Intercept) 1 20 129.80065808 6.389873 406.2699451 9.309353e-15 *
## 2 CPET 1 20 0.05291207 3.192219 0.3315065 5.711958e-01
## ges
## 1 0.93125339
## 2 0.00549165
##
## $aov
##
## Call:
## aov(formula = formula(aov_formula), data = data)
##
## Grand Mean: 1.757979
##
## Stratum 1: ID
##
## Terms:
## Residuals
## Sum of Squares 6.389873
## Deg. of Freedom 20
##
## Residual standard error: 0.5652377
##
## Stratum 2: ID:CPET
##
## Terms:
## CPET Residuals
## Sum of Squares 0.052912 3.192219
## Deg. of Freedom 1 20
##
## Residual standard error: 0.3995134
## Estimated effects are balanced
lnHFP at Peak Exercise
hist(peakData$HF.power)

hist(peakData$lnHFP)

lnHFPplot2 <- ggplot(data = peakData, aes(x=CPET, y=lnHFP)) +
geom_boxplot()
lnHFPplot2

repeatlnHFP<-ezANOVA(data=peakData, dv=.(lnHFP), wid=.(ID), within=.(CPET), detailed = TRUE, return_aov = TRUE)
repeatlnHFP
## $ANOVA
## Effect DFn DFd SSn SSd F p p<.05 ges
## 1 (Intercept) 1 20 34.19945 43.92833 15.57056 0.0007982691 * 0.36392031
## 2 CPET 1 20 1.01319 15.84732 1.27869 0.2715211179 0.01666738
##
## $aov
##
## Call:
## aov(formula = formula(aov_formula), data = data)
##
## Grand Mean: 0.9023705
##
## Stratum 1: ID
##
## Terms:
## Residuals
## Sum of Squares 43.92833
## Deg. of Freedom 20
##
## Residual standard error: 1.482031
##
## Stratum 2: ID:CPET
##
## Terms:
## CPET Residuals
## Sum of Squares 1.01319 15.84732
## Deg. of Freedom 1 20
##
## Residual standard error: 0.8901494
## Estimated effects are balanced