Closed nl101 closed 1 year ago
Probably the wrong forum for this question - not a "problem" with DHARMa package.
Hello,
no its perfectly fine to ask questions about residuals here.
There is not indication of a dispersion problem - what sticks out to see is the bimodality for small predictions in the res ~ fitted plot
which could be an indication of zero-inflation, or else just an indication that there is a pattern of either higher or lower observed values that is not well-described by the current model.
Hi Florian.
I'm modelling temperature here (all positive values). Thank you for the comment, it got me thinking this could be seasonality of temperature extremes (rare events like cold fronts and heat waves). Do you think this sort of pattern is an indication that the model is unreasonable to use for pairwise comparisons (it can't accurately predict what temperature will be so the comparisons won't be accurate)?
Which test for dispersion is correct to use here (parametric or non-parametric)? I did two not really knowing which is best. Stupid question -> Zero-inflation is as the name implies, right? I don't need to test for it if I don't have any zeros?
I'm modelling temperature here (all positive values). Thank you for the comment, it got me thinking this could be seasonality of temperature extremes (rare events like cold fronts and heat waves).
Why is temp alway > 0, is the Fahrenheit?
Hard to say what the reason is for the bimodality, you have to investigate
Do you think this sort of pattern is an indication that the model is unreasonable to use for pairwise comparisons (it can't accurately predict what temperature will be so the comparisons won't be accurate)?
No, it just means that the residuals are not Gamma distributed for small model predictions.
Which test for dispersion is correct to use here (parametric or non-parametric)? I did two not really knowing which is best.
This is not a dispersion problem, but if you want to test for dispersion, ideal is the DHARMa test on conditional residuals, which, however, is not available with glmmTMB, so I would just stick with the default.
Stupid question -> Zero-inflation is as the name implies, right? I don't need to test for it if I don't have any zeros?
Yes, it looks then what you have is a kind of "low value inflation", i.e. for low predictions, you have high and low values, but not so many observations in-between.
I'm just saying this by looking at the residuals, you should really look at your data!
Why is temp alway > 0, is the Fahrenheit? Data comes from South FL, haha. Always Sunny :) (Degrees C)
Thank you for the help!
Yes, it looks then what you have is a kind of "low value inflation", i.e. for low predictions, you have high and low values, but not so many observations in-between.
This is really apparent here (Jan.-April=DRY, May-Dec.=WET). My hope was to compare all months, but there may be too much variability so comparisons within the same season might have to do.
I think a GAMM worked better:
Month2 = factor (Jan, Feb., etc..)
mod <- gam(temp ~ Month2 + s(time2, bs = "cr") + s(Site, bs = "re") + s(CYR, bs = "re"), family = gaussian, data = env)
I've constructed a gamma glmm solely for the purpose of doing pairwise comparisons of each group (Month2), but after building a model the residuals seem to still have a pattern (not sure if the magnitude is cause for concern or how to decide what is or what isn't). Does anything else stick out? Is dispersion a problem?
hist(res)
Subset of data: