0
$\begingroup$

I am doing my GAM regression analysis in R and by using the gam.check() function from the mgcv package I got these results and I was wondering if I can follow the outputs of my model or not? Response and fitted Values Deviance residuals Histogram of residuals residual and linear predictor

$\endgroup$
  • $\begingroup$ Do you mean "trust the outputs of your model"? Diagnostic plots for glm models such as yours can be difficult to be interpret. You should look into using the DHARMa package, which produces more easily interpretable diagnostic plots. See stats.stackexchange.com/questions/267461/…, for example. $\endgroup$ – Isabella Ghement Jan 11 at 19:45
  • $\begingroup$ Is it also appilicable for GAM ? $\endgroup$ – Ahmed Akkad Jan 12 at 15:02
  • $\begingroup$ Yes, the package manual says that DHARMa accomodates gam models fitted with the mgcv package. $\endgroup$ – Isabella Ghement Jan 12 at 15:51
  • $\begingroup$ If you added rep = 100 or some such number to the gam.check() call you'd get intervals on the QQ plot, which work simulating new data from the model and residualising them to form the reference quantiles. As this is done rep times we can form crude intervals by taking the upper and lower quantiles of the simulated values for each observation to form a reference band. $\endgroup$ – Gavin Simpson Jan 14 at 15:31
  • $\begingroup$ Thank you for your help , DHARMa package was super useful ; and your method as well $\endgroup$ – Ahmed Akkad Jan 15 at 7:37

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.