R <- 41 r <- 8 s <- 24 Rprime <- 25 rprime <- 2 postmeanS <- (s+1)*Rprime/r - 1 postmeanN <- R + Rprime*s/r - 1 postmeanSref <- (s+1)*(R-2)/(r-2) - 1 postmeanNref <- R + (s+1)*(R-2)/(r-2) - 1 Shat <- R*s/r Nhat <- R + R*s/r cat("Estimate S as",postmeanS,"and N as",postmeanN,"\n") cat("Reference prior estimates S as",postmeanSref, "and N as",postmeanNref,"\n") cat("Maximum likelihood (classica) estimate of S is",Shat, "and of N is",Nhat,"\n")