AAA.RPres

First Slide

Example of Poisson

a <- array(dim = c(1000,100))
for(i in 1:1000) {
  a[i,] <- rpois(100, 8)
}
mu <- apply(a, 1, mean)

Graph

plot of chunk unnamed-chunk-2

Survey Example

library(MASS)
data(survey)
tbl <- table(survey$Sex, survey$Smoke)
tbl

         Heavy Never Occas Regul
  Female     5    99     9     5
  Male       6    89    10    12