# Why the means fluctuate so wildly when using models with gamma inverse and identity? It's like taking a trippy journey

My dependent variable is reading time. My two predictors are categorical.

I conducted a lmer model with the default family and the performance package indicated that the response distribution fits better with an inverse gamma family.

So I conducted a glmer model with the gamma inverse family:

And I conducted a glmer model with the gamma identity family:

The formula was always the same, but the in the plot of the gamma inverse model seems almost like the symmetrical mirror of the x and y axis of the gamma identity. Is this a usual thing?

UPDATE:

I did not transform my data before running the models, but the RT are the sum of three reaction times:

The origin of the data is the measurement of reaction time for button presses in seconds. Which button press would reveal to the participant a new word of the sentence. I am following previous experiments, and the dependent variable is obtained as the sum of the reaction time of the last three words of the sentences (these are the words after we introduced the manipulated word). The purpose is to see in which conditions participants are slower and in which conditions they are quicker to read after the manipulation. (I personally think a gam model with the reading times predicted by word position and predictors would be more interesting here to see if the line tendency is to increase or decrease reading times in each conditions, but I am only a student.)

Model1:
minv <- glmer(RT ~ 1 + pred1 + pred2 + pred1:pred2 + (1 | id) + (1 | stimulus_id) + (1 | order), data=df, family= Gamma(link="inverse"), control = glmerControl(optimizer = "bobyqa", calc.derivs = TRUE))

cat_plot(minv, pred = pred1, modx = pred2, geom = "line", line.thickness = 2, interval = FALSE)

Model2:
mid <- glmer(RT ~ 1 + pred1 + pred2 + pred1:pred2 + (1 | id) + (1 | stimulus_id) + (1 | order), data=df, family= Gamma(link="identity"), control = glmerControl(optimizer = "bobyqa", calc.derivs = TRUE))

cat_plot(mid, pred = pred1, modx = pred2, geom = "line", line.thickness = 2, interval = FALSE)


Histogram of the reading time in each condition:

• In a comment to your previous question, @Glen_b explained that the model(s) you are fitting are for the conditional response. In other words, don't plot a histogram (and why does the histogram have only 2 bins?) for all responses lumped together. It's more appropriate to make one plot for each of the four groups determined by your two binary predictors. Mar 23, 2023 at 10:36
• As for the inverse relationship, it's to be expected as even though the formula $X\beta$ (on the right side) is the same, the link function is different. With identity link $\operatorname{E}(Y) = X\beta$ while with the inverse link $1 / \operatorname{E}(Y) = X\beta$. In your case $X\beta$ is very simple because you have 4 groups determined by your 2 binary predictors. Mar 23, 2023 at 10:50
• I think I understand the question better now. In your plots the y-axis is labeled "RT". But do you plot the response on the original scale (the reading time scale) or the linear scale (the $X\beta$ scale)? Mar 23, 2023 at 11:05
• You use the inverse link, so yes, you are doing a kind of transformation. I would suggest to follow @SextusEmpiricus advice and show your code. Mar 23, 2023 at 12:30
• What is this graph 'distribution of response'? Are those the observed reading times? Is that reading time like a variable with only values 1 or 2? Mar 23, 2023 at 13:03