# Contrasts for relative change in proportions #emmeans

I have data indicating quality of life (QOL) as a percentage score from questionnaire data. The data is longitudinal (collected at baseline, 3, 6, 9 and 12 months) and there are other covariates such as site and cancer type. To model these percentage scores I used a glm with binomial family and logit link. In R this was done by:

f1 <- glm(score_prop ~ time_fac + site + cancer, data=df, family = binomial(link="logit"))


where score_prop was the percentage score divided by 100 to convert to a proportion and time_fac was a categorical variable with 0 as the reference level and the other levels being the followup months. After fitting the model, cluster robust estimation was performed (subject id as a cluster).

As I understand it, the exponents of the model coefficients for time_fac are odds ratios. However, their interpretation is somewhat different to, say, a binary logistic regression. I would interpret the exponentiated coefficients as a multiplicative change in the "odds" of the QOL score relative to baseline (time_fac = 0). However, I am not so sure this kind "odds" (i.e. factional score / 1-fractional score) can be meaningfully interpreted.

In order to attempt at something more meaningful, I used the emmeans R package to compute contrasts of the estimated marginal mean proportions (percentages) as opposed to odds using:

em <- emmeans(f1, specs = "time_fac", type="response")

contrast(regrid(em), method="trt.vs.ctrl")


As I understand this, the absolute difference in marginal mean QOL % score at 3 months vs. baseline (top row) is 0.4% and this difference is not significant.

I wondered, however, if there is a way to get contrasts for the relative change? For example, the ratio of estimated marginal mean percentage score at each month compared to that at baseline. Or a contrast for the percentage change in the marginal mean percentage scores between time points (if that makes sense?)? I guess these would be ratio measures if they can be computed...?

Preface: There is another initial issue here, which is that your outcome looks like a continuous-style measure expressed as a proportion rather than a truly categorical outcome per se. So it may be that you can analyse these data treating the outcome as continuous, for example using a linear mixed model with a linear link: for estimating differences in means it seems unlikely that you'd be pushing the assumptions of such a model. I have addressed the question as written about estimating ratios from below.

For categorical outcomes, the answer is yes, you can take a logistic regression model and calculate absolute marginal differences (as you have here using emmeans) or relative marginal differences (the ratio of the two proportions).

Calculating these ratios (where sensible) might be possible using emmeans, but the package marginaleffects in my opinion wraps up some of these marginal estimation methods a bit more succinctly. The function in question is comparisons, and you can request ratio-type estimates using the comparison = "ratioavg" option.