hope this will help
Eg:
wd<-choose.dir()
setwd(wd)
counts <- c(579, 4219, 911, 4578, 246, 3775, 361, 4532, 291, 5261, 396, 6598)
group <- gl(2, 1, 12, labels=c("cases","controls"))
blood <- gl(2, 2, 12, labels=c("A","O"))
city <- gl(3, 4, 12, labels=c("London","Manchester","Newcastle"))
cbind(group, blood, city, counts)
z1 <- glm(counts ~ group*(city + blood), family=poisson())
names(z1) ## type to show what items you can use
write.csv(z1$coefficients,"test.csv",row.names=F,col.names=F)
write.csv(t(z1$coefficients),"test2.csv",row.names=F,col.names=F)


雷达卡



京公网安备 11010802022788号







