Hi all:
For stratified count data,how to perform regression analysis?
My data:
age case oc count
1 1 1 21
1 1 2 26
1 2 1 17
1 2 2 59
2 1 1 18
2 1 2 88
2 2 1 7
2 2 2 95
age:
1:<40y
2:>40y
case:
1:patient
2:health
oc:
1:use drug
2:not use drug
My purpose:
Anaysis whether case and oc are correlated, and age is a stratified variable.
My solution:
1,Mantel-Haenszel test by using function "mantelhaen.test"
2,loglinear regression by using function glm(count~case*oc,family=poisson).But
I don't know how to handle variable "age",which is the stratified variable.
Many thanks for your help.
My best.
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.