[R-sig-eco] GLM
Bob O'Hara
bohara at senckenberg.de
Thu Mar 7 16:46:27 CET 2013
On 03/07/2013 04:24 PM, Mahnaz Rabbaniha wrote:
> Dear all
>
> I want to find regression between fish larva abundance and some
> abiotic factor ,i used this code:
>
> glm(formula = mychto ~ po4 + No3 + Si + Tn)
>
>
> result:
> Deviance Residuals:
> Min 1Q Median 3Q Max
> -26.586 -18.262 -12.296 -2.949 226.229
>
> Coefficients:
> Estimate Std. Error t value Pr(>|t|)
> (Intercept) 67.4211 73.9781 0.911 0.371
> po4 -0.2887 1.6037 -0.180 0.859
> No3 0.9151 4.5261 0.202 0.841
> Si -0.1145 0.4850 -0.236 0.815
> Tn -1.1568 4.4818 -0.258 0.798
>
> (Dispersion parameter for gaussian family taken to be 2444.917)
>
> Null deviance: 63156 on 29 degrees of freedom
> Residual deviance: 61123 on 25 degrees of freedom
> AIC: 325.72
>
>
> my question is about the acceptable this AIC, or this result with
> goodness of fit?
>
> thanks
AIC tells you nothing about goodness of fit, it is used to compare
different models.
A better way to assess goodness of fit is to look at the data and the
model. It's clear that you have very skewed data (look at the distances
between the quartiles of the residuals), so a Gaussian model, which
assumes the residuals are symmetric, is inappropriate. It might make
more sense to use a Poisson distribution, although you will probably
need to account for over-dispersion (there are a few ways of doing
this). Also, once you've fitted a glm, you can use plot() to get some
useful model-checking plots (e.g. residuals).
There is more advice in the links here:
<http://r.789695.n4.nabble.com/Checking-the-assumptions-for-a-proper-GLM-model-tp1559502p1560503.html>.
Bob
--
Bob O'Hara
Biodiversity and Climate Research Centre
Senckenberganlage 25
D-60325 Frankfurt am Main,
Germany
Tel: +49 69 7542 1863 / +49 69 798 40226
Mobile: +49 1515 888 5440
WWW: http://www.bik-f.de/root/index.php?page_id=219
Blog: http://blogs.nature.com/boboh
Journal of Negative Results - EEB: www.jnr-eeb.org
More information about the R-sig-ecology
mailing list