## ------------------------------------------------------------------------
library(naim)
## ------------------------------------------------------------------------
set.seed(547)
# Covariates
x <- rnorm(100, mean = 3, sd = 0.2)
# Number of trials
n <- sample(1:100, replace = TRUE)
# Successes
y <- rbinom(100, size = n, prob = 0.6)
# Data set
head(data.frame(x, n, y))
## ------------------------------------------------------------------------
NR_logit(x, y, n)
## ------------------------------------------------------------------------
NR_logit(x, y, n, verbose = TRUE)
## ------------------------------------------------------------------------
NR_logit(x, y, n, tol = 1e-15, verbose = TRUE)
## ------------------------------------------------------------------------
# Number of people who have each blood type in population
A <- 80; B <- 45; AB <- 13; O <- 100
## ------------------------------------------------------------------------
EM_blood(A, B, AB, O)
## ------------------------------------------------------------------------
EM_blood(A, B, AB, O, verbose = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.