Learn R Programming

broom (version 0.4.3)

mle2_tidiers: Tidy mle2 maximum likelihood objects

Description

Tidy mle2 objects from the bbmle package.

Usage

# S3 method for mle2
tidy(x, conf.int = FALSE, conf.level = 0.95, ...)

Arguments

x

An "mle2" object

conf.int

Whether to add conf.low and conf.high columns

conf.level

Confidence level to use for interval

...

Extra arguments, not used

Examples

Run this code
# NOT RUN {
if (require("bbmle", quietly = TRUE)) {
  x <- 0:10
  y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)
  d <- data.frame(x,y)
  
  fit <- mle2(y ~ dpois(lambda = ymean),
              start = list(ymean = mean(y)), data = d)
  
  tidy(fit)
}

# }

Run the code above in your browser using DataLab