#1
Hi,

doing a generalised linear model with poisson distribution, here is my model code...

model<-glm(carnivore_abundance~altitude_1+dist_stream+canopy_openess+basal_area+dist_large_river,family=poisson,data=main_data)

really frustratingly whenever I try to add link=log is doesn't work it comes up with several differnt errors depending on whether I add it in with brackets or quotations etc. The main error I get is: Error in glm.control(link = "log") : unused argument (link = "log")

I am concerned this will impact the results I get back from the test as I assume adding this section is important. Does anyone know how to solve this? Any input would be greatly appreciated
 

Dason

Ambassador to the humans
#2
You should post the code that is actually giving you an error.

But it sounds like you're just trying to add it as a parameter in the glm function. The link is specified inside of the family. So you want family=poisson(link = "log")

But poisson defaults to log link so you don't really need to specify it in this case. You can view the defaults for each family by looking up the help page for family
Code:
?family