# Testing whether two percentage changes from different datasets are statistically significantly different

I have data on Male strength at 40 and 70 years, and equivalent data for Women. I can calculate the raw and % differences in strength for each sex, and of course compare the raw values to see which sex loses more strength with age in absolute terms. However, I am unsure about how to compare the % difference between the two groups. Specifically, I would like to determine whether the % difference (40-70) observed between sexes is significantly different; e.g., if 70-year-old women are 18% weaker than 40-year-old women, is this significantly different from 70-year-old men being 16% weaker than 40-year-old men?

My data are actually cross-sectional data, not longitudinal measurements of the same people. I have individual measurements, sample size, mean, St. Dev., etc. Which mathematical approach (if any) would be best for answering this question?

I predominantly work in R so any tips for R packages/commands would be particularly helpful.

Thank you very much.

It seems to me that you are looking at the interaction between sex and age, although I'm not too sure what it is exactly you want to compare. Perhaps I would start with a linear model to describe strength as a combination of age and sex allowing for interaction:

fit <- lm(strength ~ sex * age)
summary(fit)


(Maybe you need a generalized linear model, GLM, instead of the ordinary linear model)

The emmeans package should be useful to query the fitted model for comparisons of interest.

EDIT: Start by plotting strength vs age for each sex to get a feel for how the data looks like. In R and ggplot2 it may be something like:

gg <- ggplot(data= dat, aes(x= age, y= strength, colour= sex)) +
geom_line()


I am wondering if this is a homework problem, so I'll just give a hint. Consider log(strength).