# How to measure goodness of fit in a simple quadratic Gaussian GLM?

I hope this question will be specific enough, I went through many of the other questions about GLM but now I am even more confused because my sample size is small and it seems that R square (or pseudo R2) is not a good measure of fit in such cases. I have read about Nagelkerke and the Shapiro-Wilk but I am not sure if they apply to my case.

My model is glm(y~poly(x,2), family = gaussian) where both X and Y are continues variables and are associated to each other pairwise, I have about 15 pairs and IM evaluating different species. (X is temperature and why is size)

this is one example of output

Call:
glm(formula = tl ~ poly(sta, 2), family = gaussian)

Deviance Residuals:
Min        1Q    Median        3Q       Max
-0.38460  -0.08427   0.01834   0.14815   0.21911

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)    3.03433    0.04329  70.089  < 2e-16 ***
poly(sta, 2)1 -0.22010    0.18367  -1.198  0.24937
poly(sta, 2)2 -0.67169    0.18367  -3.657  0.00234 **
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for gaussian family taken to be 0.03373611)

Null deviance: 1.00566  on 17  degrees of freedom
Residual deviance: 0.50604  on 15  degrees of freedom
AIC: -5.2054

Number of Fisher Scoring iterations: 2


I know that AIC is not too important because I am not comparing competing models. Basically I just need a measure that tells me if this model predicts well the value of Y based on the values of X. For this example I see from the fitting curve that this is a good model but what is the threshold to determine it?

• Have you plotted the data & the model fit? Have you plotted residuals and other model diagnostics? I can easily foresee situations where you may have a good model but a lowish $R^2$-alike. Nov 3, 2014 at 20:06
• @GavinSimpson I have tried to look at residVSfitted but I have dozens of cases and can't go through them manually. Also the residuals I need to decide a certain threshold of significance. What are some of the diagnostics you mention? Nov 3, 2014 at 21:45
• In terms of the figure you show, a linear fit would do just as well as the quadratic. Then you could compare the two fits with AIC or a likelihood ratio. Perhaps you could explain in more detail what the real problem is that you wish to solve. Also, why glm() when this is just a linear model? It is far more efficient to fit via lm(). Nov 3, 2014 at 22:13
• @GavinSimpson I just need a diagnostic that will tell me "this model fits well the data", that I use to sort through the hundreds of models I have and to explain a natural pattern and that when included in an publication will be considered a good quantitative measure of measuring model explanatory power. Nov 3, 2014 at 22:28