Skip to contents

Computes confidence intervals for parameters from a nonlinear cross-price demand model using nlstools::confint2().

Usage

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

Arguments

object

A cp_model_nls object from fit_cp_nls().

parm

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

level

Confidence level (default 0.95).

method

Character. Method for computing intervals passed to nlstools::confint2():

  • "asymptotic" (default): Wald-type asymptotic intervals

  • "profile": Profile-t confidence intervals

...

Additional arguments passed to nlstools::confint2().

Value

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

Details

This method wraps nlstools::confint2() to provide confidence intervals for the log10-parameterized coefficients (log10_qalone, I, log10_beta).

For back-transformed natural-scale confidence intervals, apply the transformation: 10^conf.low and 10^conf.high for log10-scale parameters.

Examples

# \donttest{
data(etm)
fit <- fit_cp_nls(etm, equation = "exponentiated")
confint(fit)
#> # A tibble: 3 × 6
#>   term         estimate conf.low conf.high level method    
#>   <chr>           <dbl>    <dbl>     <dbl> <dbl> <chr>     
#> 1 log10_qalone    0.743    0.604     0.882  0.95 asymptotic
#> 2 I              -1.16    -3.53      1.21   0.95 asymptotic
#> 3 log10_beta     -0.546   -1.32      0.231  0.95 asymptotic
# }