confint.beezdemand_nlme: Confidence Intervals for Mixed-Effects Demand Model...

View source: R/mixed-methods.R

confint.beezdemand_nlmeR Documentation

Confidence Intervals for Mixed-Effects Demand Model Parameters

Description

Computes confidence intervals for fixed effect parameters from an NLME-based mixed-effects demand model.

Usage

## S3 method for class 'beezdemand_nlme'
confint(object, parm = NULL, level = 0.95, method = c("wald", "profile"), ...)

Arguments

object

A beezdemand_nlme object from fit_demand_mixed().

parm

Character vector of parameter names to compute CIs for. Default includes all fixed effect parameters.

level

Confidence level (default 0.95).

method

Character. Method for computing intervals:

  • "wald": Wald-type intervals using asymptotic normality (default, fast)

  • "profile": Profile likelihood intervals via nlme::intervals() (slower but more accurate for small samples)

...

Additional arguments passed to nlme::intervals() when method = "profile".

Details

For Wald intervals, confidence bounds are computed as estimate ± z * SE using standard errors from the model summary.

For profile intervals, nlme::intervals() is called on the underlying nlme model object. This method provides more accurate intervals but can be computationally intensive for complex models.

Value

A tibble with columns: term, estimate, conf.low, conf.high, level, component.

Examples


data(ko)
fit <- fit_demand_mixed(ko, y_var = "y_ll4", x_var = "x",
                        id_var = "monkey", equation_form = "zben")
confint(fit)



beezdemand documentation built on March 3, 2026, 9:07 a.m.