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:

Interpretation:


(Intercept) = 13.48

This represents:Control material, L1–L5 (lumbar region)

So: Baseline spinal angle ≈ 13.5°

At the lumbar region, all materials increase curvature, with polyfoam having the strongest effect


Compared to L1–L5:

At T1–T6

Add interaction effects:

Interpretation: All materials increase curvature in the upper thoracic region, with polyfoam having the largest effect


At T7–T12

This is the most interesting result

Interpretation:

Polyfoam behaves fundamentally differently in this region


Main Findings:

  1. Spinal curvature is influenced by both material and placement, with a strong interaction between the two.
  2. Without support, spinal curvature decreases as you move up the spine.
  3. At the lumbar region, all materials increase curvature, with polyfoam having the strongest effect.
  4. At T1–T6, all materials increase curvature, with polyfoam again producing the largest increase.
  5. At T7–T12, materials behave differently:
  1. Polyfoam shows the most region-specific behavior, suggesting it may redistribute or stabilize curvature rather than uniformly increasing it.
  2. Measurements are highly reproducible, with minimal variation across photographs.

Pelvic Conclusions

library(lme4)
library(lmerTest)
## 
## Attaching package: 'lmerTest'
## The following object is masked from 'package:lme4':
## 
##     lmer
## The following object is masked from 'package:stats':
## 
##     step
library(emmeans)
## Welcome to emmeans.
## Caution: You lose important information if you filter this package's results.
## See '? untidy'
# fit the model
model_pelvis <- lmer(
  Pelvic_Angle ~ Material * Placement + (1 | Photograph),
  data = anatomical_df
)

# full model summary
summary(model_pelvis)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Pelvic_Angle ~ Material * Placement + (1 | Photograph)
##    Data: anatomical_df
## 
## REML criterion at convergence: 177.2
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -2.89928 -0.36245 -0.02162  0.56147  1.87942 
## 
## Random effects:
##  Groups     Name        Variance Std.Dev.
##  Photograph (Intercept) 0.02502  0.1582  
##  Residual               0.13189  0.3632  
## Number of obs: 180, groups:  Photograph, 5
## 
## Fixed effects:
##                                       Estimate Std. Error         df t value
## (Intercept)                          11.578800   0.117462  22.070048  98.575
## MaterialLatex                        -1.831933   0.132609 164.000000 -13.815
## MaterialMemory foam                  -3.488867   0.132609 164.000000 -26.309
## MaterialPolyfoam                     -5.801467   0.132609 164.000000 -43.749
## PlacementT1-T6                       -0.004933   0.132609 164.000000  -0.037
## PlacementT7-T12                      -0.029267   0.132609 164.000000  -0.221
## MaterialLatex:PlacementT1-T6          0.004933   0.187538 164.000000   0.026
## MaterialMemory foam:PlacementT1-T6    0.004933   0.187538 164.000000   0.026
## MaterialPolyfoam:PlacementT1-T6       0.004933   0.187538 164.000000   0.026
## MaterialLatex:PlacementT7-T12         0.029267   0.187538 164.000000   0.156
## MaterialMemory foam:PlacementT7-T12   0.029267   0.187538 164.000000   0.156
## MaterialPolyfoam:PlacementT7-T12      0.029267   0.187538 164.000000   0.156
##                                     Pr(>|t|)    
## (Intercept)                           <2e-16 ***
## MaterialLatex                         <2e-16 ***
## MaterialMemory foam                   <2e-16 ***
## MaterialPolyfoam                      <2e-16 ***
## PlacementT1-T6                         0.970    
## PlacementT7-T12                        0.826    
## MaterialLatex:PlacementT1-T6           0.979    
## MaterialMemory foam:PlacementT1-T6     0.979    
## MaterialPolyfoam:PlacementT1-T6        0.979    
## MaterialLatex:PlacementT7-T12          0.876    
## MaterialMemory foam:PlacementT7-T12    0.876    
## MaterialPolyfoam:PlacementT7-T12       0.876    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) MtrlLt MtrlMf MtrlPl PT1-T6 PT7-T1 ML:PT1 MMf:PT1 MP:PT1
## MaterialLtx -0.564                                                         
## MatrlMmryfm -0.564  0.500                                                  
## MaterlPlyfm -0.564  0.500  0.500                                           
## PlcmntT1-T6 -0.564  0.500  0.500  0.500                                    
## PlcmnT7-T12 -0.564  0.500  0.500  0.500  0.500                             
## MtrL:PT1-T6  0.399 -0.707 -0.354 -0.354 -0.707 -0.354                      
## MtMf:PT1-T6  0.399 -0.354 -0.707 -0.354 -0.707 -0.354  0.500               
## MtrP:PT1-T6  0.399 -0.354 -0.354 -0.707 -0.707 -0.354  0.500  0.500        
## MtL:PT7-T12  0.399 -0.707 -0.354 -0.354 -0.354 -0.707  0.500  0.250   0.250
## MMf:PT7-T12  0.399 -0.354 -0.707 -0.354 -0.354 -0.707  0.250  0.500   0.250
## MtP:PT7-T12  0.399 -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
# ANOVA table for main effects and interaction
anova(model_pelvis)
# estimated marginal means
emm_pelvis <- emmeans(model_pelvis, ~ Material * Placement)
summary(emm_pelvis)
# pairwise comparisons of materials within each region
emmeans(model_pelvis, pairwise ~ Material | Placement, adjust = "tukey")
## $emmeans
## Placement = L1-L5:
##  Material    emmean    SE   df lower.CL upper.CL
##  Control      11.58 0.117 22.1    11.34    11.82
##  Latex         9.75 0.117 22.1     9.50     9.99
##  Memory foam   8.09 0.117 22.1     7.85     8.33
##  Polyfoam      5.78 0.117 22.1     5.53     6.02
## 
## Placement = T1-T6:
##  Material    emmean    SE   df lower.CL upper.CL
##  Control      11.57 0.117 22.1    11.33    11.82
##  Latex         9.75 0.117 22.1     9.50     9.99
##  Memory foam   8.09 0.117 22.1     7.85     8.33
##  Polyfoam      5.78 0.117 22.1     5.53     6.02
## 
## Placement = T7-T12:
##  Material    emmean    SE   df lower.CL upper.CL
##  Control      11.55 0.117 22.1    11.31    11.79
##  Latex         9.75 0.117 22.1     9.50     9.99
##  Memory foam   8.09 0.117 22.1     7.85     8.33
##  Polyfoam      5.78 0.117 22.1     5.53     6.02
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
## Placement = L1-L5:
##  contrast               estimate    SE  df t.ratio p.value
##  Control - Latex            1.83 0.133 164  13.815 <0.0001
##  Control - Memory foam      3.49 0.133 164  26.309 <0.0001
##  Control - Polyfoam         5.80 0.133 164  43.749 <0.0001
##  Latex - Memory foam        1.66 0.133 164  12.495 <0.0001
##  Latex - Polyfoam           3.97 0.133 164  29.934 <0.0001
##  Memory foam - Polyfoam     2.31 0.133 164  17.439 <0.0001
## 
## Placement = T1-T6:
##  contrast               estimate    SE  df t.ratio p.value
##  Control - Latex            1.83 0.133 164  13.777 <0.0001
##  Control - Memory foam      3.48 0.133 164  26.272 <0.0001
##  Control - Polyfoam         5.80 0.133 164  43.711 <0.0001
##  Latex - Memory foam        1.66 0.133 164  12.495 <0.0001
##  Latex - Polyfoam           3.97 0.133 164  29.934 <0.0001
##  Memory foam - Polyfoam     2.31 0.133 164  17.439 <0.0001
## 
## Placement = T7-T12:
##  contrast               estimate    SE  df t.ratio p.value
##  Control - Latex            1.80 0.133 164  13.594 <0.0001
##  Control - Memory foam      3.46 0.133 164  26.089 <0.0001
##  Control - Polyfoam         5.77 0.133 164  43.528 <0.0001
##  Latex - Memory foam        1.66 0.133 164  12.495 <0.0001
##  Latex - Polyfoam           3.97 0.133 164  29.934 <0.0001
##  Memory foam - Polyfoam     2.31 0.133 164  17.439 <0.0001
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: tukey method for comparing a family of 4 estimates
# pairwise comparisons of regions within each material
emmeans(model_pelvis, pairwise ~ Placement | Material, adjust = "tukey")
## $emmeans
## Material = Control:
##  Placement emmean    SE   df lower.CL upper.CL
##  L1-L5      11.58 0.117 22.1    11.34    11.82
##  T1-T6      11.57 0.117 22.1    11.33    11.82
##  T7-T12     11.55 0.117 22.1    11.31    11.79
## 
## Material = Latex:
##  Placement emmean    SE   df lower.CL upper.CL
##  L1-L5       9.75 0.117 22.1     9.50     9.99
##  T1-T6       9.75 0.117 22.1     9.50     9.99
##  T7-T12      9.75 0.117 22.1     9.50     9.99
## 
## Material = Memory foam:
##  Placement emmean    SE   df lower.CL upper.CL
##  L1-L5       8.09 0.117 22.1     7.85     8.33
##  T1-T6       8.09 0.117 22.1     7.85     8.33
##  T7-T12      8.09 0.117 22.1     7.85     8.33
## 
## Material = Polyfoam:
##  Placement emmean    SE   df lower.CL upper.CL
##  L1-L5       5.78 0.117 22.1     5.53     6.02
##  T1-T6       5.78 0.117 22.1     5.53     6.02
##  T7-T12      5.78 0.117 22.1     5.53     6.02
## 
## Degrees-of-freedom method: kenward-roger 
## Confidence level used: 0.95 
## 
## $contrasts
## Material = Control:
##  contrast           estimate    SE  df t.ratio p.value
##  (L1-L5) - (T1-T6)   0.00493 0.133 164   0.037  0.9992
##  (L1-L5) - (T7-T12)  0.02927 0.133 164   0.221  0.9735
##  (T1-T6) - (T7-T12)  0.02433 0.133 164   0.183  0.9816
## 
## Material = Latex:
##  contrast           estimate    SE  df t.ratio p.value
##  (L1-L5) - (T1-T6)   0.00000 0.133 164   0.000  1.0000
##  (L1-L5) - (T7-T12)  0.00000 0.133 164   0.000  1.0000
##  (T1-T6) - (T7-T12)  0.00000 0.133 164   0.000  1.0000
## 
## Material = Memory foam:
##  contrast           estimate    SE  df t.ratio p.value
##  (L1-L5) - (T1-T6)   0.00000 0.133 164   0.000  1.0000
##  (L1-L5) - (T7-T12)  0.00000 0.133 164   0.000  1.0000
##  (T1-T6) - (T7-T12)  0.00000 0.133 164   0.000  1.0000
## 
## Material = Polyfoam:
##  contrast           estimate    SE  df t.ratio p.value
##  (L1-L5) - (T1-T6)   0.00000 0.133 164   0.000  1.0000
##  (L1-L5) - (T7-T12)  0.00000 0.133 164   0.000  1.0000
##  (T1-T6) - (T7-T12)  0.00000 0.133 164   0.000  1.0000
## 
## Degrees-of-freedom method: kenward-roger 
## P value adjustment: tukey method for comparing a family of 3 estimates
# confidence intervals for estimated means
confint(emm_pelvis)
# optional: inspect random effects variance clearly
VarCorr(model_pelvis)
##  Groups     Name        Std.Dev.
##  Photograph (Intercept) 0.15819 
##  Residual               0.36317

Main effects and interaction

Pelvic angle was significantly influenced by material

Interpretation: The effect of lumbar support material is strongly dependent on where it is applied along the spine.

Baseline pelvic angle (control condition)

The intercept represents the control condition at L1–L5:

Across regions under control conditions:

Interpretation: Pelvic angle is completely invariant across regions.

Effects of materials at the lumbar region (L1–L5)

All materials decrease pelvic angle:

Material –> Pelvic Angle

Interpretation: Increasing material firmness → progressively flattens pelvic angle

Pelvis behaves as a rigid unit

Suggests: Pelvic angle is governed by global alignment, not local curvature

Main takeaways

  1. Pelvic angle is driven entirely by material, not placement.
  1. All materials reduce pelvic angle relative to control.
  1. There is a clear, graded material effect.

Main Figure

library(dplyr)
library(ggplot2)
library(tidyr)
## 
## Attaching package: 'tidyr'
## The following objects are masked from 'package:Matrix':
## 
##     expand, pack, unpack
# 1. Calculate observed means
spine_means <- anatomical_df %>%
  group_by(Material, Placement) %>%
  summarize(
    mean_spinal = mean(Spinal_Angle),
    .groups = "drop"
  )

# 2. Add ideal values by region
ideal_df <- data.frame(
  Placement = c("L1-L5", "T7-T12", "T1-T6"),
  ideal_spinal = c(60, 18, 22)
)

# 3. Join ideals onto observed means
spine_compare <- spine_means %>%
  left_join(ideal_df, by = "Placement")

spine_compare
library(dplyr)
library(ggplot2)
library(tidyr)

# Mean observed spinal angle for each material and region
spine_means <- anatomical_df %>%
  group_by(Material, Placement) %>%
  summarize(
    mean_spinal = mean(Spinal_Angle),
    .groups = "drop"
  )

ideal_df <- data.frame(
  Placement = c("L1-L5", "T7-T12", "T1-T6"),
  ideal_spinal = c(60, 18, 22)
)

spine_diff_df <- spine_means %>%
  left_join(ideal_df, by = "Placement") %>%
  mutate(diff_from_ideal = mean_spinal - ideal_spinal)

ggplot(spine_diff_df,
       aes(x = Placement, y = diff_from_ideal, color = Material, group = Material)) +
  geom_hline(yintercept = 0, linetype = "dashed") +
  geom_line(linewidth = 1) +
  geom_point(size = 3) +
  theme_classic(base_size = 13) +
  labs(
    title = "Deviation from Ideal Spinal Curvature",
    x = "Spinal Region",
    y = "Observed - Ideal (°)"
  ) +
  annotate("text", x = 1.0, y = 2.5, label = "Ideal Angle", size = 4)

  1. All pillows (including control) produce less curvature than the ideal, especially in the lumbar region.
  2. While all pillows increase angle closer to ideal in the lumbar region, all were still far below the ideal standard of 60.
  3. In the upper thoracic, the polyfoam is closest (+2 above ideal), followed by latex and memory foam which were both ~5 degrees less than ideal.
  4. In the lower thoracic, Latex was closest to ideal (-1 degree), while memory foam was 5 above ideal, and polyfoam was 6 below idea, which is nearly idential to the control (no pillow at all).A material that improves one region may worsen another.
  5. While all materials fail to achieve ideal lumbar curvature, their effects diverge across thoracic regions, with no single material optimizing spinal alignment across all regions.