Learn R Programming

beezdemand (version 0.2.0)

confint.beezdemand_hurdle: Confidence Intervals for Hurdle Demand Model Parameters

Description

Computes confidence intervals for fixed effect parameters from a TMB-based hurdle demand model using the asymptotic normal approximation.

Usage

# S3 method for beezdemand_hurdle
confint(
  object,
  parm = NULL,
  level = 0.95,
  report_space = c("internal", "natural"),
  ...
)

Value

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

Arguments

object

A beezdemand_hurdle object from fit_demand_hurdle().

parm

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

level

Confidence level (default 0.95).

report_space

Character. Reporting space for parameters:

  • "internal": parameters on internal/fitting scale (log for Q0, alpha)

  • "natural": back-transformed to natural scale

...

Additional arguments (ignored).

Details

Confidence intervals are computed using the asymptotic normal approximation based on standard errors from TMB::sdreport(). For parameters estimated on the log scale (Q0, alpha, k), intervals can be back-transformed to the natural scale using report_space = "natural".

The transformation uses:

  • For log-scale parameters: exp(estimate +/- z * SE)

Examples

Run this code
# \donttest{
data(apt)
fit <- fit_demand_hurdle(apt, y_var = "y", x_var = "x", id_var = "id")
confint(fit)
# }

Run the code above in your browser using DataLab