tidy.logitr: Tidy a 'logitr' class object

View source: R/broom.R

tidy.logitrR Documentation

Tidy a logitr class object

Description

Tidy a logitr class object

Usage

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

Arguments

x

is an object of class logitr.

conf.int

Logical indicating whether or not to include a confidence interval in the tidied output. Defaults to FALSE.

conf.level

The confidence level to use for the confidence interval if conf.int = TRUE. Must be strictly greater than 0 and less than 1. Defaults to 0.95, which corresponds to a 95 percent confidence interval.

...

Unused, included for generic consistency only.

Value

A tidy tibble::tibble() summarizing component-level information about the model

Examples

library(logitr)

# Estimate a preference space model
mnl_pref <- logitr(
  data    = yogurt,
  outcome = "choice",
  obsID   = "obsID",
  pars    = c("price", "feat", "brand")
)

# Extract a tibble of the model coefficients
tidy(mnl_pref)

# Extract a tibble of the model coefficients with confidence intervals
tidy(mnl_pref, conf.int = TRUE)


logitr documentation built on Sept. 11, 2024, 6:40 p.m.