Skip to content

Need help with GLM on R

2 messages · icelandic1992, Jim Lemon

#
I am using some data for a population count 
This what my data is set out as 
Area   Count    Year      DOY      Rain     Wind  

all continuous effects except wind and rain and area are categorical
variables with 1 for rain and wind and 0 for no rain or wind and areas 1-27

I am trying to do a GLM analysis of certain treatment effects on Loge(total
count+1) to find out which factors significantly affect the count. I used
the formula glm.nb(Count~factor(Area)+Year+Rain+Wind+DOY)
However it does not work, and when I looked at it with the formula I was
given by someone else which was 
glm.nb(Count~factor(Area)+Year+DOY+Year*DOY) it came up with intercept as
the first area and then areas 1-27 listed and then year and DOY. 

I am unsure of what this means as i think it is comparing all the areas to
the first area. I really want it to come up with a table that looks like
this

Effect              Coefficient        SE      F-value
Area number 
Year
Wind
Rain


Any help will be greatly appreciated as I have tried to understand how to
get this table but I am struggling to understand





--
View this message in context: http://r.789695.n4.nabble.com/Need-help-with-GLM-on-R-tp4712459.html
Sent from the R help mailing list archive at Nabble.com.
#
Hi icelandic1992,
If I am correct, the default model is comparing the first area with the
rest. I assume that "area" does not refer to the physical area of the
locations, but is a nominal order variable. If I am wrong, and there are
actual "areas", that is probably what you want to have in the model, as one
would expect that larger areas would have larger populations.

Jim


On Sat, Sep 19, 2015 at 2:03 AM, icelandic1992 <georgialclack92 at outlook.com>
wrote: