Data analysis performed for Turcott’s physiology of exercise lab report

# Load necessary R packages
library(dplyr) #For data manipulation
## 
## Attaching package: 'dplyr'
## 
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## 
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(reshape2) #For data manipulation related to plotting
library(ggplot2) #For plotting
library(pastecs) #For descriptive statistics
## Loading required package: boot
## 
## Attaching package: 'pastecs'
## 
## The following objects are masked from 'package:dplyr':
## 
##     first, last
# Set working directory - mac file system
setwd("~/physExLab/NHLcombinedata")

# Load data
nhldata<-read.csv("data.csv")

#Create weight in kg variable
nhldata<-mutate(nhldata, Weight_kg = Weight_lb/2.2)

#Create aerobic test peak watts / kg variable
nhldata<-mutate(nhldata, VO2max_watts_kg= VO2max_watts/Weight_kg)

#Create variable for how much the HR dropped after the Wingate
nhldata<-mutate(nhldata, rHR_wingate = WingateHR_End - WingateHR_1minPost)

#Create dataframe with only the variables we are interested in
nhldata<-select(nhldata,Weight_kg, WingatePeak_Watts, WingateMean_Watts, PeakWingate_W_kg, VO2max_l_min, VO2max_ml_kg_min, VO2max_watts, VO2max_watts_kg, WingatePercentDrop, WingateHR_End, WingateHR_1minPost, rHR_wingate)

nhldata <- nhldata[complete.cases(nhldata), ]
str(nhldata)
## 'data.frame':    94 obs. of  12 variables:
##  $ Weight_kg         : num  95.1 80 87.4 82.1 81.2 ...
##  $ WingatePeak_Watts : int  1136 1017 1171 933 1089 1223 1210 917 1047 1191 ...
##  $ WingateMean_Watts : int  939 72 971 764 877 921 921 718 782 899 ...
##  $ PeakWingate_W_kg  : num  12 12.7 13.4 11.4 13.4 14.1 13 12.8 13.9 14 ...
##  $ VO2max_l_min      : num  4.75 3.99 4.94 5.64 4.92 4.41 5.19 4.17 4.39 5.45 ...
##  $ VO2max_ml_kg_min  : num  50 49.9 56.5 68.7 60.6 50.6 55.8 57.9 58 63.8 ...
##  $ VO2max_watts      : int  520 400 520 520 520 520 520 440 480 520 ...
##  $ VO2max_watts_kg   : num  5.47 5 5.95 6.33 6.41 ...
##  $ WingatePercentDrop: num  54.5 52.5 36.7 39.5 45.2 55.3 54.4 45.8 57.4 49.3 ...
##  $ WingateHR_End     : int  185 185 192 191 180 200 192 194 179 192 ...
##  $ WingateHR_1minPost: int  180 174 175 176 151 168 178 172 172 181 ...
##  $ rHR_wingate       : int  5 11 17 15 29 32 14 22 7 11 ...
summary(nhldata)
##    Weight_kg      WingatePeak_Watts WingateMean_Watts PeakWingate_W_kg
##  Min.   : 69.68   Min.   : 784      Min.   :  72.0    Min.   : 9.00   
##  1st Qu.: 80.49   1st Qu.:1050      1st Qu.: 809.8    1st Qu.:12.80   
##  Median : 84.95   Median :1142      Median : 868.5    Median :13.40   
##  Mean   : 84.73   Mean   :1134      Mean   : 859.6    Mean   :13.41   
##  3rd Qu.: 89.07   3rd Qu.:1195      3rd Qu.: 924.0    3rd Qu.:14.00   
##  Max.   :109.41   Max.   :1502      Max.   :1130.0    Max.   :15.90   
##   VO2max_l_min   VO2max_ml_kg_min  VO2max_watts   VO2max_watts_kg
##  Min.   :3.640   Min.   :44.90    Min.   :400.0   Min.   :4.396  
##  1st Qu.:4.383   1st Qu.:51.77    1st Qu.:480.0   1st Qu.:5.649  
##  Median :4.725   Median :56.30    Median :520.0   Median :6.064  
##  Mean   :4.773   Mean   :56.41    Mean   :505.5   Mean   :5.981  
##  3rd Qu.:5.185   3rd Qu.:60.58    3rd Qu.:550.0   3rd Qu.:6.334  
##  Max.   :6.280   Max.   :68.70    Max.   :640.0   Max.   :7.556  
##  WingatePercentDrop WingateHR_End   WingateHR_1minPost  rHR_wingate    
##  Min.   :33.70      Min.   :163.0   Min.   : 72.0      Min.   :-15.00  
##  1st Qu.:44.85      1st Qu.:185.2   1st Qu.:164.0      1st Qu.: 13.00  
##  Median :49.60      Median :190.5   Median :172.0      Median : 17.50  
##  Mean   :49.42      Mean   :189.7   Mean   :170.9      Mean   : 18.87  
##  3rd Qu.:54.20      3rd Qu.:194.0   3rd Qu.:178.0      3rd Qu.: 22.75  
##  Max.   :77.60      Max.   :208.0   Max.   :196.0      Max.   :120.00

As you can see we have gone from 100 subjects to 94 subjects - so 6 subjects had incomplete data in the variables of interest.

Descriptive summary of the variables of interest:

options(scipen=100) #supresses scientific notation of output
options(digits=2) #limits output to 2 significant digits
stat.desc(nhldata, basic=F) #runs basic stats
##              Weight_kg WingatePeak_Watts WingateMean_Watts
## median          84.955           1142.50            868.50
## mean            84.725           1133.59            859.63
## SE.mean          0.647             13.15             12.46
## CI.mean.0.95     1.285             26.10             24.74
## var             39.387          16243.43          14586.41
## std.dev          6.276            127.45            120.77
## coef.var         0.074              0.11              0.14
##              PeakWingate_W_kg VO2max_l_min VO2max_ml_kg_min VO2max_watts
## median                 13.400        4.725           56.300       520.00
## mean                   13.415        4.773           56.412       505.53
## SE.mean                 0.119        0.056            0.557         5.70
## CI.mean.0.95            0.236        0.111            1.106        11.32
## var                     1.330        0.292           29.174      3057.24
## std.dev                 1.153        0.540            5.401        55.29
## coef.var                0.086        0.113            0.096         0.11
##              VO2max_watts_kg WingatePercentDrop WingateHR_End
## median                 6.064              49.60       190.500
## mean                   5.981              49.42       189.723
## SE.mean                0.065               0.71         0.859
## CI.mean.0.95           0.128               1.41         1.706
## var                    0.393              47.34        69.385
## std.dev                0.627               6.88         8.330
## coef.var               0.105               0.14         0.044
##              WingateHR_1minPost rHR_wingate
## median                  172.000       17.50
## mean                    170.851       18.87
## SE.mean                   1.468        1.33
## CI.mean.0.95              2.916        2.64
## var                     202.623      166.44
## std.dev                  14.235       12.90
## coef.var                  0.083        0.68

Univariate distributions with histograms

qplot(VO2max_ml_kg_min, data=nhldata, geom="histogram")
## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.

qplot(WingatePercentDrop, data=nhldata, geom="histogram")
## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.

qplot(WingateHR_1minPost, data=nhldata, geom="histogram")
## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.

qplot(WingateHR_End, data=nhldata, geom="histogram")
## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.

qplot(rHR_wingate, data=nhldata, geom="histogram")
## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.

Does a higher VO2 max result in a greater drop in heart rate after the Wingate?

qplot(y=rHR_wingate, x=VO2max_ml_kg_min, data=nhldata) + stat_smooth(method=lm, formula=y~x)

Looks like there is no relationship.

Does a higher VO2 max result in lower 1 minute post heart rate after the Wingate?

qplot(y=WingateHR_1minPost, x=VO2max_ml_kg_min, data=nhldata) + stat_smooth(method=lm, formula=y~x)

Looks like there is no relationship.

How does post wingate HR relate to % drop in power during the wingate?

qplot(y=WingateHR_End, x=WingatePercentDrop, data=nhldata) + stat_smooth(method=lm, formula=y~x)

Looks like there is not much of a relationship. But does their peak watts influence the result?

But does their peak watts influence the result?

This plot is a repeat of the above with Wingate peak watts influencing the size of the point. From the points it looks like people with a higher peak watt have a greater drop off.

qplot(WingatePercentDrop, WingateHR_End,data=nhldata,geom=c("point", "smooth"),method="lm",size = WingatePeak_Watts)

Do players with a higher peak watts on Wingate have a higher drop off during the test?

qplot(y=WingatePercentDrop, x=WingatePeak_Watts, data=nhldata) + stat_smooth(method=lm, formula=y~x)

Seems to be the case. To me this suggest that % drop is not due to poor aerobic capacity; but due to such high power output that players cannot sustain it.

How does wingate average power fit in to the above relationship?

qplot(WingatePeak_Watts, WingatePercentDrop,data=nhldata,geom=c("point", "smooth"),method="lm",size = WingateMean_Watts)

It looks like mean watts may be related to peak watts (makes sense - a higher peak leads to a higher mean), but that it is not related to percent drop as the scatter of point size along the x axis is fairly consistent.

Here is a plot of mean watts and percent drop to confirm those suspicions:

qplot(y=WingatePercentDrop, x=WingateMean_Watts, data=nhldata) + stat_smooth(method=lm, formula=y~x)

And here we see the relationship between wingate mean watts and peak watts - relationships don’t really get much better than this one….

qplot(y=WingateMean_Watts, x=WingatePeak_Watts, data=nhldata) + stat_smooth(method=lm, formula=y~x)

Thoughts -

Peak watts and mean watts are highly related; and peak watts and percent drop are also related. It makes me think that % drop which is supposed to be the fatigue index is really driven by having high peak power. In other words, it’s not as much that someone cannot sustain their power; it is that people with really high power cannot sustain it - possibly because it is, but it’s nature, unsustainable.

The fact that vo2 max does not relate to recovery heart rate is a bit perplexing to me….there is just a lot of Vo2 max variability and not much HR recovery in one minute following the Wingate - so there is little variability in the Wingate HR 1 minute post.