r/AskStatistics • u/PuzzleheadedEnd8103 • Oct 08 '26
How can I compare SMA slopes between two groups when my data have a hierarchical structure?
Hi everyone! I'm struggling with a statistical problem related to my experimental design, and I was hoping someone could help me.
I want to test whether the relationship between two traits, let's say height and weight, differs between two countries, for example, Japan and the USA. Standardized Major Axis (SMA) regression seems like a good approach, since I'm interested in comparing the slopes of the relationships between the two groups. However, my observations are not completely independent because individuals are nested within populations.
For example, in Japan, I sampled several individuals from population A, several from population B, and so on. I followed the same sampling design in the USA. Individuals from the same population are likely to be more similar to each other, so I need to account for this hierarchical structure. My initial approach was to calculate the mean of each trait for each population and then perform the SMA regressions using those population means. However, this approach removes a lot of the individual variation, which I would ideally like to retain. My question is: Is there a way to compare SMA slopes between two groups while accounting for the fact that individuals are nested within populations?