Returns confidence intervals from an object of class logitr.

# S3 method for logitr
confint(object, parm, level = 0.95, ...)

Arguments

object

is an object of class logitr (a model estimated using the 'logitr()` function).

parm

A specification of which parameters are to be given confidence intervals, either a vector of numbers or a vector of names. If missing, all parameters are considered.

level

The confidence level required.

...

further arguments.

Value

A data frame of the confidence intervals of model coefficients.

Examples

library(logitr)

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

# Compute a confidence interval
confint(mnl_pref)
#>                   2.5 %     97.5 %
#> price        -0.4148379 -0.3205359
#> feat          0.2508031  0.7229301
#> brandhiland  -3.9971858 -3.4302625
#> brandweight  -0.7464769 -0.5336879
#> brandyoplait  0.5768316  0.8953710