florianhartig / DHARMa

Diagnostics for HierArchical Regession Models
http://florianhartig.github.io/DHARMa/
200 stars 21 forks source link

Interpretation/consequences of residual vs. predicted plot #384

Open boswel opened 10 months ago

boswel commented 10 months ago

Hello Florian, I calculated a GLMM based on the beta distribution: model_dur_red <- glmmTMB(tr_prop ~ treat + handler * day + corner * day + (1|subject), data = data_red, family = beta_family(link = "logit")) The dependent variable is a proportion of time spent receiving one of two treatments (treat) in a test of a fixed duration. All fixed effects are categorical with two levels, and I had 12 subjects. This is a reduced model; the full model also contained treat * day, but the interaction was not significant. I simulated the residuals: simulationOutput <- simulateResiduals(fittedModel = model_dur_red), and when I plot(simulationOutput), I get these graphs: DHARMa residuals Here you suggest adding a quadratic effect to a model that produces a somewhat similar graph, but that does not work for my model, as it contains only categorical predictors. Is the deviation (most likely) a problem and is there anything I can do about it? I also tried plotting the residuals against treat, the predictor of interest, but that didn’t work and I’ll open a separate issue about it. Thank you!