# Is it possible to use robustlmm package for other distributions than normal?

I have a response variable that is non-normaly distributed (~Gamma). Due to the fact that I have a lot of "contamination", I would need to use a robust mixed-effects model method that is able to remove it. I was thinking on using the package robustlmm, however, I don't know if I can use it since my data don't follow a normal distribution.

Does anyone know something about that?

rlmer:robustlmm does not fit generalized linear mixed models as far as I am aware, so the gamma distribution would not be available.
• Thanks @Robert Long, so, If I understood well, there is no restriction in my case to use robustlmm::rlmer(), right? I wonder what you mean distinguishing between inference and predictions. In my case, Y is a measure of activity (m.s⁻²) of an animal taken with one device (A), and X is the measure of the same thing (=activity) with another device (B) with more restricted settings and in a different position than device A. The advantage of dev B is that it allows to record longer time periods. Then Y is more accurate measure than X might be very useful in my field (ecology). Sep 23 '20 at 10:27
• Thus, I want to assess the relationship among Y and X and discuss the suitability of using dev B. My idea was to stablish if the relationship is linear or exponential between variables and also to calculate R². What is my problem? The animal(s) moves little, meaning that I get a gamma distribution of activities. However, the biggest problem is that X measures sometimes go far from the general trend due to its settings and position, generating some extrange patterns in my plot of residuals vs predicted values. Sep 23 '20 at 10:32
• I tried log-transforming variables, using "natural splines" or using robustlmm to remove the "contamination", which is not contamination. However, I couldn't remove completely my residual patterns. Now, I wonder if I could just run the models I though from the beginning (GLMM with a gamma distribution and a log link function), and then show the residuals patterns to finally say that more research should be done for using X instead of Y, because it is clear that some settings of X are doing that predictions are better or worst depending on X value. Sep 23 '20 at 10:39
• Using GLMM I get a r2m of 80%, which means that X explains 80% of the variance of Y, however, given that I have residual patterns, I don't know what to do. Your comment about that normal distribution is (or not) required depending on if I make inferences or predictions, has made me think about all this. Could you give me your advice? I am a little bit lost. Sep 23 '20 at 10:39