home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / demos / models / glm-v+r next >
Encoding:
Text File  |  1996-11-24  |  553 b   |  17 lines

  1. Fr <- c(68,42,42,30, 37,52,24,43,
  2.         66,50,33,23, 47,55,23,47,
  3.         63,53,29,27, 57,49,19,29)
  4.  
  5. Temp <- gl(2, 2, 24, labels=c("Low", "High"))
  6. Soft <- gl(3, 8, 24, labels=c("Hard","Medium","Soft"))
  7. M.user <- gl(2, 4, 24, labels=c("N", "Y"))
  8. Brand <- gl(2, 1, 24, labels=c("X", "M"))
  9.  
  10. detg <- data.frame(Fr,Temp,Soft,M.user,Brand)
  11. detg.m0 <- glm(Fr ~ M.user*Temp*Soft+Brand, family=poisson, data=detg)
  12.  
  13. detg.mod <- glm(terms(Fr~M.user*Temp*Soft+Brand*M.user*Temp,keep.order=TRUE),
  14.         family=poisson, data=detg)
  15. summary(detg.mod, correlation=FALSE)
  16.  
  17.