Skip to content
Prev 247150 / 398503 Next

Don´t know what test i have to use

Hi,

That is basically correct.  You can specify the link as logit (see my
example), but that is the default so you do not strictly need to in
this case.  II would encourage you to keep your variables
(prevalencia, edad, sexo, mes) stored in a data frame, in which case
you would add the data = argument to glm().

model2 <- glm(prevalencia ~ edad * sexo * mes * zona,
  family = binomial(link = "logit"),
  data = your_dataframe)

Also, you might take a look at ?predict.glm  it has some examples with
binomial data based off the wonderful book by Drs. Venables and
Ripley.  Oh, and finally, if you have 12 levels of months, ? levels of
zones, and 2 levels of sex, you might not want the 4way interactions
that you will get by default from using the '*' operator inside a
formula.  Unless you have a theory that there is an additional effect
of being a middle aged female in the month of July for zone 8, but
not....

Cheers,

Josh
On Wed, Jan 12, 2011 at 9:51 AM, gaiarrido <gaiarrido at usal.es> wrote: