Response variable as a rate: Including the exposure offset variable (instead of the absolute count).
nabaesjodar opened this issue · comments
Dear Daniel and sjplot team,
Context: a model with an offset variable, e.g. a time exposure variable in a count response with Poisson or NB distribution.
I wonder if one can (or could) plot the model and data showing the rate instead of the absolute count values in the Y axis?
It might be usefull in order to better understand how the model includes the exposure in the predictions (which occurs regardless of what we decide to plot: i.e. the predicted line should not change, if I am correct).
Cheers!
Diego N. Nabaes Jodar.
What rate are you referring to? Do you want plots of the predicted values, or the raw data?
I mean rate as the response variariable divided by the offset.
E.g. 1) n° pollinator visits/n° flowers.
E.g. 2) n° of plancton inds / water volume sampled.
In the plot of predicted values from the plot_model function (where I am also adding raw data with show.data=T), it would be nice to have the option to use that rate as the Y axis, intead of the raw response variable (not divided by the offset).
Is that already implemented in sjplot?