The code below demonstrates how to plot model diagnostics for
rmcorr. There are four diagnostic plots assessing:
1. Residuals vs. Fitted values: Linearity
2. Quantile-Quantile (Q-Q): Normality of residuals
3. Scale-Location: Equality of variance (homoscedasticity)
4. Residuals vs. Leverage: Influential observations
How much do violations of these assumptions matter? It depends. General Linear Model (GLM) is typically robust to deviations from the above assumptions, but severe violations may produce misleading results (Gelman, Hill, and Vehtari 2020). Also, the reason(s) for violations can matter: “Violations of assumptions may result from problems in the dataset, the use of an incorrect regression model, or both” (Cohen et al. 2013, 117).