Very preliminary - just getting around to entering the data and just doing some explorations… I did do a quick ICC (intraclass correlation) analysis of Inter-Rater Agreement, not too bad overall - will likely be better when I control for within subject variation
df <- read.csv("NHE_April2022.csv")
df$Weight_Categories <- cut(df$Weight, breaks = 3)
ggplot(df, aes(Force, color = Weight_Categories)) +
geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
ggplot(df, aes(Force, color = Leg)) +
geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
ggplot(df, aes(Weight, Force, color = ID)) +
geom_point() +
geom_smooth(method = lm) +
labs(x = "Body Weight", y = "Force", title = "Relationship between Body Weight and Force")
## `geom_smooth()` using formula 'y ~ x'
r1 <- filter(df, Rater == 1)
r1 <- select(r1, Force)
r1 <- rename(r1, Force1 = Force)
r2 <- filter(df, Rater == 2)
r2 <- select(r2, Force)
r2 <- rename(r2, Force2 = Force)
r12 <- cbind(r1, r2)
ggplot(r12, aes(Force1, Force2)) +
geom_point() +
geom_smooth(method = lm) +
labs(x = "Rater 1", y = "Rater 2", title = "Comparison between Rater 1 and Rater 2")
## `geom_smooth()` using formula 'y ~ x'
The variability in this scatter plot does not only represent between rater variability; but within subject variability as well - both within subjects between tests and within subjects between legs
Not a final analysis - just preliminary - need to do a bit more analysis of within and between subject variation with some ANOVAs
icc(r12, model = "twoway",
type = "agreement", unit = "single")
## Single Score Intraclass Correlation
##
## Model: twoway
## Type : agreement
##
## Subjects = 68
## Raters = 2
## ICC(A,1) = 0.65
##
## F-Test, H0: r0 = 0 ; H1: r0 > 0
## F(67,67.5) = 4.68 , p = 8.12e-10
##
## 95%-Confidence Interval for ICC Population Values:
## 0.488 < ICC < 0.769
Right now simply the absolute difference between the right and left leg. This does not control for variation due to raters, or due to different tests.
right <- filter(df, Leg == "Right")
right <- select(right, Force)
right <- rename(right, Right_Force = Force)
left <- filter(df, Leg == "Left")
left <- select(left, Force)
left <- rename(left, Left_Force = Force)
RL_df<- cbind(right, left)
RL_df <- mutate(RL_df, LE_Difference = abs(Right_Force - Left_Force))
ggplot(RL_df, aes(LE_Difference)) + geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
ggplot(RL_df, aes(LE_Difference)) + geom_boxplot()
summary(RL_df$LE_Difference)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.30 13.10 26.25 30.57 46.42 126.30