Hi,
I've done a few GLM's with poisson distribution, the code I've used is
name<-glm(dependentvariable~independent+independent+independent,family=poisson,data=datset)
for some the dependent variable is non-normally distributed so I believe I need to use a generalised linear model. But then for some my dependent variable is normal so a normal GLM is okay.
My issue is I don't know the difference in code between general and generalised linear model. I also have an issue where my model came up with an error when I tried to add link="log" so I removed that section. I wasn't actually aware of what that section meant for the code either.
Another final question, is there a specific test I can do to check the fit of my model is correct?? For example, when doing the poisson model I tested for overdispersion after making the model and 1 of my models was overdispersed (8 point something) so i changed distribution to quasipoisson (I belive this is the correct thing to do?). I also had one where it was slightly overdispersed but I left it as poisson (it was 1. something and anything over 1 counts as overdispersion). What steps should I take other than this to ensure the model is the correct fit?
Any help or input here would be MASSIVELY appreciated! I hope this all makes sense? Thanks in advance
I've done a few GLM's with poisson distribution, the code I've used is
name<-glm(dependentvariable~independent+independent+independent,family=poisson,data=datset)
for some the dependent variable is non-normally distributed so I believe I need to use a generalised linear model. But then for some my dependent variable is normal so a normal GLM is okay.
My issue is I don't know the difference in code between general and generalised linear model. I also have an issue where my model came up with an error when I tried to add link="log" so I removed that section. I wasn't actually aware of what that section meant for the code either.
Another final question, is there a specific test I can do to check the fit of my model is correct?? For example, when doing the poisson model I tested for overdispersion after making the model and 1 of my models was overdispersed (8 point something) so i changed distribution to quasipoisson (I belive this is the correct thing to do?). I also had one where it was slightly overdispersed but I left it as poisson (it was 1. something and anything over 1 counts as overdispersion). What steps should I take other than this to ensure the model is the correct fit?
Any help or input here would be MASSIVELY appreciated! I hope this all makes sense? Thanks in advance