Learn R Programming

mfp2 (version 1.1.1)

confint.mfp2: Confidence Intervals for mfp2 Model Parameters

Description

Wald confidence intervals for the coefficients of a fitted mfp2() model, a method for the generic stats::confint().

Usage

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

Value

A matrix with a row per selected parameter and two columns giving the lower and upper confidence limits.

Arguments

object

A fitted mfp2() object.

parm

Optional character vector of parameter names, or numeric indices, selecting which coefficients to report. Defaults to all.

level

The confidence level. Default 0.95.

...

Passed to the underlying interval method for multinomial/ordinal models.

Details

The intervals are \(\hat\beta \pm z_{1-\alpha/2}\,\mathrm{SE}(\hat\beta)\), with standard errors taken from stats::vcov() of the fitted object. These are the same Wald intervals summarised by summary.mfp2() (which displays its 95% interval with the conventional rounded multiplier 1.96, whereas confint() uses the exact normal quantile and honours level), and they apply uniformly to every scalar-coefficient family. They are used in preference to the default profile-likelihood intervals of stats::confint() for glm fits because those refit the model on mfp2's internally transformed design and fail; for GEE (gee_family()) the covariance is the robust sandwich estimator, which is the correct basis for GEE inference (and geepack supplies no confint method). Multinomial and ordinal models, whose coefficients are not a single named vector, defer to the interval method of the underlying fit.

See Also

mfp2(), summary.mfp2(), vcov()

Examples

Run this code
data("prostate")
fit <- mfp2(
  lpsa ~ fp(age) + fp(cavol) + fp(weight) + svi,
  data = prostate,
  verbose = FALSE
)
confint(fit)
confint(fit, parm = "svi.1", level = 0.9)

Run the code above in your browser using DataLab