Use of Pillows in Each location on Spine
summary_df <- data.frame(
Material = c(
rep("Polyfoam", 15), rep("Memory foam", 15), rep("Latex", 15),
rep("Polyfoam", 15), rep("Memory foam", 15), rep("Latex", 15)
),
Session = c(
rep(1, 45),
rep(2, 45)
),
Trial = rep(rep(1:5, each = 3), 6),
Location = rep(c("Low","Mid","High"), 30),
Score = c(
# Session 1
7,5,4, 7,6,3, 8,5,3, 7,4,2, 6,4,2,
7,4,3, 7,5,3, 6,5,3, 7,3,2, 7,3,2,
5,4,2, 5,4,2, 6,3,2, 5,3,1, 4,3,2,
# Session 2
7,5,5, 6,5,4, 6,4,3, 7,4,3, 6,3,2,
8,6,5, 9,7,4, 8,7,4, 7,5,3, 7,6,3,
6,5,3, 5,5,3, 6,4,3, 5,4,2, 5,4,3
)
)
anatomical_df <- data.frame(
Material = c(
rep("Control", 45),
rep("Polyfoam", 45),
rep("Memory foam", 45),
rep("Latex", 45)
),
Placement = c(
rep("L1-L5", 15), rep("T7-T12", 15), rep("T1-T6", 15),
rep("L1-L5", 15), rep("T7-T12", 15), rep("T1-T6", 15),
rep("L1-L5", 15), rep("T7-T12", 15), rep("T1-T6", 15),
rep("L1-L5", 15), rep("T7-T12", 15), rep("T1-T6", 15)
),
Photograph = rep(rep(1:5, each = 3), 12),
Measurement = rep(rep(1:3, times = 5), 12),
Spinal_Angle = c(
# Control L1-L5
13.278, 13.714, 14.043, 13.618, 13.266, 13.885, 14.008, 14.050, 13.806,
13.148, 13.309, 12.996, 13.164, 13.007, 12.980,
# Control T7-T12
12.441, 12.352, 12.870, 12.002, 12.510, 12.216, 12.493, 11.784, 11.829,
11.999, 11.975, 12.930, 12.568, 11.894, 11.842,
# Control T1-T6
11.699, 11.560, 11.604, 10.789, 10.856, 10.309, 10.588, 10.457, 10.894,
10.998, 10.972, 11.493, 11.409, 10.855, 10.793,
# Polyfoam L1-L5
17.878, 17.588, 18.013, 17.641, 17.599, 17.560, 17.392, 17.485, 17.422,
17.912, 17.312, 17.588, 17.381, 17.246, 17.482,
# Polyfoam T7-T12
13.708, 13.793, 13.693, 13.546, 13.682, 13.706, 13.891, 13.785, 13.762,
13.921, 13.842, 13.878, 13.604, 13.529, 13.777,
# Polyfoam T1-T6
25.018, 24.993, 25.169, 25.012, 24.893, 24.965, 25.125, 24.898, 24.887,
24.906, 24.784, 24.902, 24.867, 24.992, 24.772,
# Memory foam L1-L5
15.817, 16.048, 16.003, 16.920, 16.819, 16.521, 15.459, 15.541, 16.291,
17.101, 16.723, 16.876, 16.580, 16.014, 15.705,
# Memory foam T7-T12
22.990, 22.769, 22.849, 22.596, 23.082, 22.983, 22.446, 22.387, 22.594,
22.695, 22.881, 22.933, 22.607, 22.895, 22.898,
# Memory foam T1-T6
18.045, 18.129, 17.992, 18.581, 18.403, 18.334, 18.105, 18.226, 17.909,
17.077, 17.426, 17.568, 17.644, 17.881, 17.992,
# Latex L1-L5
14.255, 14.603, 14.144, 14.272, 14.233, 14.162, 14.257, 14.159, 13.990,
14.801, 14.436, 14.334, 14.265, 14.138, 14.251,
# Latex T7-T12
16.417, 16.406, 16.462, 16.592, 16.556, 16.499, 16.331, 16.304, 16.348,
16.399, 16.410, 16.383, 16.475, 16.388, 16.456,
# Latex T1-T6
18.144, 18.177, 18.291, 18.969, 19.073, 18.952, 18.217, 18.348, 18.366,
18.370, 18.389, 18.395, 18.785, 18.833, 18.816
),
Pelvic_Angle = c(
# Control L1-L5
11.936, 11.146, 11.752, 11.381, 11.342, 11.436, 11.895, 11.769, 12.004,
11.248, 11.550, 11.086, 11.920, 11.785, 11.432,
# Control T7-T12
11.571, 11.528, 11.930, 11.398, 11.828, 11.617, 11.896, 11.041, 11.220,
11.461, 11.415, 12.010, 11.725, 11.314, 11.289,
# Control T1-T6
12.088, 11.864, 11.932, 11.440, 11.523, 10.997, 11.391, 11.232, 11.547,
11.661, 11.585, 11.815, 11.766, 11.414, 11.353,
# Polyfoam L1-L5
5.891, 5.711, 6.451, 5.795, 5.762, 5.750, 5.568, 5.697, 5.673,
6.442, 5.484, 5.729, 5.548, 5.467, 5.692,
# Polyfoam T7-T12
5.891, 5.711, 6.451, 5.795, 5.762, 5.750, 5.568, 5.697, 5.673,
6.442, 5.484, 5.729, 5.548, 5.467, 5.692,
# Polyfoam T1-T6
5.891, 5.711, 6.451, 5.795, 5.762, 5.750, 5.568, 5.697, 5.673,
6.442, 5.484, 5.729, 5.548, 5.467, 5.692,
# Memory foam L1-L5
7.125, 8.833, 8.241, 8.383, 8.415, 8.279, 7.034, 7.290, 8.104,
8.952, 8.550, 8.571, 8.321, 8.259, 6.992,
# Memory foam T7-T12
7.125, 8.833, 8.241, 8.383, 8.415, 8.279, 7.034, 7.290, 8.104,
8.952, 8.550, 8.571, 8.321, 8.259, 6.992,
# Memory foam T1-T6
7.125, 8.833, 8.241, 8.383, 8.415, 8.279, 7.034, 7.290, 8.104,
8.952, 8.550, 8.571, 8.321, 8.259, 6.992,
# Latex L1-L5
9.748, 9.814, 9.692, 9.748, 9.732, 9.711, 9.725, 9.704, 9.473,
10.080, 9.801, 9.795, 9.744, 9.698, 9.738,
# Latex T7-T12
9.748, 9.814, 9.692, 9.748, 9.732, 9.711, 9.725, 9.704, 9.473,
10.080, 9.801, 9.795, 9.744, 9.698, 9.738,
# Latex T1-T6
9.748, 9.814, 9.692, 9.748, 9.732, 9.711, 9.725, 9.704, 9.473,
10.080, 9.801, 9.795, 9.744, 9.698, 9.738
)
)
library(dplyr)
library(ggplot2)
means <- summary_df %>%
group_by(Material, Location, Session) %>%
summarize(mean_score = mean(Score), .groups = "drop")
ggplot(means,
aes(x = Location,
y = mean_score,
color = Session,
group = Session)) +
geom_line(size = 1.2, position = position_dodge(0.2)) +
geom_point(size = 3, position = position_dodge(0.2)) +
facet_wrap(~Material) +
theme_classic() +
labs(title = "Pre vs Post Comparison Across Lumbar Support Locations",
y = "Mean Score",
x = "Support Location")
library(dplyr)
##
## 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
summary_angles <- anatomical_df %>%
group_by(Material, Placement) %>%
summarize(
mean_spinal = mean(Spinal_Angle),
mean_pelvic = mean(Pelvic_Angle),
.groups = "drop"
)
summary_angles
control_means <- summary_angles %>%
filter(Material == "Control") %>%
dplyr::select(Placement, control_spinal = mean_spinal)
summary_diff <- summary_angles %>%
left_join(control_means, by = "Placement") %>%
mutate(delta_spinal = round(mean_spinal - control_spinal, 2))
summary_diff
library(lme4)
## Loading required package: Matrix
model_spine <- lmer(
Spinal_Angle ~ Material * Placement + (1|Photograph),
data = anatomical_df
)
summary(model_spine)
## Linear mixed model fit by REML ['lmerMod']
## Formula: Spinal_Angle ~ Material * Placement + (1 | Photograph)
## Data: anatomical_df
##
## REML criterion at convergence: 119
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -2.85915 -0.54615 -0.07437 0.50782 2.60202
##
## Random effects:
## Groups Name Variance Std.Dev.
## Photograph (Intercept) 0.006867 0.08287
## Residual 0.095040 0.30829
## Number of obs: 180, groups: Photograph, 5
##
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 13.4848 0.0878 153.579
## MaterialLatex 0.8019 0.1126 7.123
## MaterialMemory foam 2.8097 0.1126 24.960
## MaterialPolyfoam 4.0818 0.1126 36.260
## PlacementT1-T6 -2.4664 0.1126 -21.910
## PlacementT7-T12 -1.2378 0.1126 -10.996
## MaterialLatex:PlacementT1-T6 6.7214 0.1592 42.220
## MaterialMemory foam:PlacementT1-T6 4.1260 0.1592 25.917
## MaterialPolyfoam:PlacementT1-T6 9.8453 0.1592 61.843
## MaterialLatex:PlacementT7-T12 3.3795 0.1592 21.229
## MaterialMemory foam:PlacementT7-T12 7.7169 0.1592 48.474
## MaterialPolyfoam:PlacementT7-T12 -2.5877 0.1592 -16.254
##
## Correlation of Fixed Effects:
## (Intr) MtrlLt MtrlMf MtrlPl PT1-T6 PT7-T1 ML:PT1 MMf:PT1 MP:PT1
## MaterialLtx -0.641
## MatrlMmryfm -0.641 0.500
## MaterlPlyfm -0.641 0.500 0.500
## PlcmntT1-T6 -0.641 0.500 0.500 0.500
## PlcmnT7-T12 -0.641 0.500 0.500 0.500 0.500
## MtrL:PT1-T6 0.453 -0.707 -0.354 -0.354 -0.707 -0.354
## MtMf:PT1-T6 0.453 -0.354 -0.707 -0.354 -0.707 -0.354 0.500
## MtrP:PT1-T6 0.453 -0.354 -0.354 -0.707 -0.707 -0.354 0.500 0.500
## MtL:PT7-T12 0.453 -0.707 -0.354 -0.354 -0.354 -0.707 0.500 0.250 0.250
## MMf:PT7-T12 0.453 -0.354 -0.707 -0.354 -0.354 -0.707 0.250 0.500 0.250
## MtP:PT7-T12 0.453 -0.354 -0.354 -0.707 -0.354 -0.707 0.250 0.250 0.500
## ML:PT7 MMf:PT7
## MaterialLtx
## MatrlMmryfm
## MaterlPlyfm
## PlcmntT1-T6
## PlcmnT7-T12
## MtrL:PT1-T6
## MtMf:PT1-T6
## MtrP:PT1-T6
## MtL:PT7-T12
## MMf:PT7-T12 0.500
## MtP:PT7-T12 0.500 0.500
Spinal angle depends both on the material and the location on the
spine, and their interaction. The effect of pillow material is not the
same across spinal regions.
Random effects:
- Photograph variance = very small (0.0069)
- Residual variance = 0.09
Interpretation:
- Measurements are very consistent across photos
- Good—your system is stable and reproducible
(Intercept) = 13.48
This represents:Control material, L1–L5 (lumbar region)
So: Baseline spinal angle ≈ 13.5°
- Latex: +0.8°
- Memory foam: +2.8°
- Polyfoam: +4.1°
At the lumbar region, all materials increase curvature, with polyfoam
having the strongest effect
Compared to L1–L5:
- T1–T6: −2.47°, t(164) = −21.91, p < 2e-16T1–T6: −2.47°
- T7–T12: −1.24°, t(164) = −11.00, p < 2e-16 ___
At T1–T6
Add interaction effects:
- Latex: +6.72°, t(164) = 42.22
- Memory foam: +4.13°, t(164) = 25.92
- Polyfoam: +9.85°, t(164) = 61.84
Interpretation: All materials increase curvature in the upper
thoracic region, with polyfoam having the largest effect
At T7–T12
- Latex: +3.38°, t(164) = 21.23
- Memory foam: +7.72°, t(164) = 48.47
- Polyfoam: −2.59°, t(164) = −16.25
This is the most interesting result
Interpretation:
- Latex → increases curvature
- Memory foam → increases curvature (more strongly)
- Polyfoam → DECREASES curvature
Polyfoam behaves fundamentally differently in this region
Main Findings:
- Spinal curvature is influenced by both material and placement, with
a strong interaction between the two.
- Without support, spinal curvature decreases as you move up the
spine.
- At the lumbar region, all materials increase curvature, with
polyfoam having the strongest effect.
- At T1–T6, all materials increase curvature, with polyfoam again
producing the largest increase.
- At T7–T12, materials behave differently:
- Latex and memory foam increase curvature
- Polyfoam decreases curvature
- Polyfoam shows the most region-specific behavior, suggesting it may
redistribute or stabilize curvature rather than uniformly increasing
it.
- Measurements are highly reproducible, with minimal variation across
photographs.