Reliability

Reliability

  • Read data in

  • Graph data (systematic bias)

    t.test(CMJ measure ~ Test, data = data, paired = TRUE)

  • Convert to wide format for correlations.

  • Calculated correlations and typical error.

Read data in

Try this code:

library(readr)
library(tidyverse)
library(ggpubr)

data <- read_csv("CMJ.csv")

head(data)
# A tibble: 6 × 7
  Name   Date       Test  `BW [KG]` Jump_height `Contraction Time [ms]`
  <chr>  <chr>      <chr>     <dbl>       <dbl>                   <dbl>
1 ETC 01 02/08/2024 Test1      43.1        23.4                     654
2 ETC 01 22/07/2024 Test2      42.6        24.7                     579
3 ETC 02 02/08/2024 Test1      39.4        21.2                     660
4 ETC 02 29/07/2024 Test2      38.9        21.3                     637
5 ETC 03 02/08/2024 Test1      33.8        19                       839
6 ETC 03 29/07/2024 Test2      34          19.4                     653
# ℹ 1 more variable: `RSI-modified [m/s]` <dbl>

Graph data

Try this code t.test(CMJ measure ~ Test, data = data, paired = TRUE)

ggplot(data = data, aes(x = Test, y = Jump_height, fill = Test)) +
  geom_boxplot() +
  geom_jitter(color = "grey") + 
  labs(title = "Boxplot") +
  theme_classic() +
  theme(legend.position = "none")

t.test(Jump_height ~ Test, data = data, paired = TRUE)

    Paired t-test

data:  Jump_height by Test
t = 2.501, df = 28, p-value = 0.01851
alternative hypothesis: true mean difference is not equal to 0
95 percent confidence interval:
 0.134173 1.348586
sample estimates:
mean difference 
      0.7413793 

Pivot data to wide format

data_wide <- data %>% subset(select = c(Name, Test, Jump_height)) %>% 
  pivot_wider(names_from = Test, 
              values_from = Jump_height)
head(data_wide)
# A tibble: 6 × 3
  Name   Test1 Test2
  <chr>  <dbl> <dbl>
1 ETC 01  23.4  24.7
2 ETC 02  21.2  21.3
3 ETC 03  19    19.4
4 ETC 05  14.4  14.3
5 ETC 08  20.9  18.3
6 ETC 09  22.5  21.1
ggscatter(data_wide, x = "Test2", y = "Test1")+
 geom_point(colour = "blue") +
  geom_smooth(method = lm) +
  xlab("Week 2 Counter Movement Jump Height (cm)") + ylab("Week 1 Counter Movement Jump Height (cm)")+
  ggtitle("ICC 0.86 95CI 0.73 to 0.93")
`geom_smooth()` using formula = 'y ~ x'

cor.test(data_wide$Test2, data_wide$Test1)

    Pearson's product-moment correlation

data:  data_wide$Test2 and data_wide$Test1
t = 8.933, df = 27, p-value = 1.508e-09
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
 0.7287775 0.9347655
sample estimates:
      cor 
0.8644008 
library(psych)

Attaching package: 'psych'
The following objects are masked from 'package:ggplot2':

    %+%, alpha
icc <- data_wide %>% subset(select = -c(Name))

head(icc)
# A tibble: 6 × 2
  Test1 Test2
  <dbl> <dbl>
1  23.4  24.7
2  21.2  21.3
3  19    19.4
4  14.4  14.3
5  20.9  18.3
6  22.5  21.1
ICC(icc)
Call: ICC(x = icc)

Intraclass correlation coefficients 
                         type  ICC  F df1 df2       p lower bound upper bound
Single_raters_absolute   ICC1 0.84 12  28  29 1.7e-09        0.69        0.92
Single_random_raters     ICC2 0.84 14  28  28 3.8e-10        0.66        0.93
Single_fixed_raters      ICC3 0.86 14  28  28 3.8e-10        0.73        0.93
Average_raters_absolute ICC1k 0.91 12  28  29 1.7e-09        0.82        0.96
Average_random_raters   ICC2k 0.92 14  28  28 3.8e-10        0.80        0.96
Average_fixed_raters    ICC3k 0.93 14  28  28 3.8e-10        0.84        0.97

 Number of subjects = 29     Number of Judges =  2
See the help file for a discussion of the other 4 McGraw and Wong estimates,
data_wide<-mutate(data_wide, dif = Test2 -Test1)
head(data_wide)
# A tibble: 6 × 4
  Name   Test1 Test2    dif
  <chr>  <dbl> <dbl>  <dbl>
1 ETC 01  23.4  24.7  1.3  
2 ETC 02  21.2  21.3  0.100
3 ETC 03  19    19.4  0.400
4 ETC 05  14.4  14.3 -0.100
5 ETC 08  20.9  18.3 -2.60 
6 ETC 09  22.5  21.1 -1.40 
sd(data_wide$dif)/sqrt(2)
[1] 1.128766
typical_error <- function(x) sd(x) / sqrt(2) # Create own function for typical error


typical_error(data_wide$dif)
[1] 1.128766

The echo: false option disables the printing of code (only output is displayed).