Hi,

I'm just learning about poison links for the glm function.

One of the data sets I'm playing with has several of the variables as factors (i.e. month, group, etc.)

When I call the glm function with a formula that has a factor variable, R automatically converts the variable to a series of variables with unique names and binary values.

For example, with this pseudo data:

y        v1        month
2        1            january
3        1.4        februrary
1.5    6.3        february
1.2    4.5        january
5.5    4.0        march

I use this call:

m <- glm(y ~ v1 + month, family="poisson")

R gives me back a model with variables of
Intercept
v1
monthJanuary
monthFebruary
monthMarch

I'm concerned that this might be doing some strange things to my model. Can anyone offer some enlightenment?

Thanks!

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to