So I'm trying to fit a binary logistic regression model for a question to estimate the odds of the disease and here is the original disease outbreak data (there are 196 observations and I deleted some data entries):
Column 1: ID (person)
Column 2: Age of the person
Column 3: SES (Socio-economic status of the person) (1=upper class, 2=middle class, 3=lower class)
Column 4: Sect (categorical: two different regions)
Column 5: Y (1=disease, 0=no disease)
Column 6: Savings (1=person has savings, 0=no savings)
1 33 1 1 0 1
2 35 1 1 0 1
3 6 1 1 0 0
...
194 31 3 1 0 0
195 85 3 1 0 1
196 24 2 1 0 0
I tried the following command to fit the binary regression model:
lm1=glm(Y~factor(Age)+factor(SES)+factor(Sect)+factor(Savings),family=binomial("logit"))
summary(lm1)
and not surprisingly, it is a mess because there are too many age terms (the age terms are from 2 to 85)... So my question is, would someone be able to help me to modify my command so I'm able to have an age estimate, for example, 5 or 10 year intervals increment?
Also, the above model doesn't include any interaction terms. So if I was about to consider, say SES*Age interaction and I would like to see the age estimate for each every 5 or 10 years, how should I write the input command?