Advertisement
Guest User

Untitled

a guest
Aug 28th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. cat("Test n")
  2. matrix_with <-
  3. matrix(c(12, (335-12), 4, (341-4)),
  4. nrow = 2,
  5. dimnames = list(Treated = c("Positive", "Negative"),
  6. Control = c("Positive", "Negative")))
  7. print(matrix_with)
  8. cat("Proportions postive: TX followed by controln")
  9. print(12/335)
  10. print(4/341)
  11. print(fisher.test(matrix_with, alternative = "two.sided"))
  12. #------------
  13. Fisher's Exact Test for Count Data
  14.  
  15. data: matrix_with
  16. p-value = 0.04477
  17. alternative hypothesis: true odds ratio is not equal to 1
  18. 95 percent confidence interval:
  19. 0.9348216 13.4298907
  20. sample estimates:
  21. odds ratio
  22. 3.125192
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement