library(epitools) # you may need to install or update the package source("http://192.38.117.59/~linearpredictors/datafiles/readFever.R") results <- riskratio(fever$alcogroup, fever$death, verbose=TRUE) cat("\n\nCross Table, death vs alcogroup :\n\n") results$data # Cross table cat("\n\nMeans within alcogroup:\n\n") tapply(fever$alco, fever$alcogroup, mean) cat("\nRisks:\n\n") results$p.outcome # Risks cat("\nOdds Ratio with confidence limits:\n\n") results$measure # OR and confidence limits cat("\nlog(Odds Ratio) with confidence limits:\n\n") log(results$measure) # log(OR) cat("\nlog(Odds):\n\n") risks <- results$p.outcome[,2] log(risks/(1-risks[1])) # log(odds) cat("\n")