Skip to contents

Confidence Intervals Method for an Object of Class betamc

Usage

# S3 method for class 'betamc'
confint(object, parm = NULL, level = 0.95, ...)

Arguments

object

Object of Class betamc, that is, the output of the BetaMC(), RSqMC(), SCorMC(), DeltaRSqMC(), PCorMC(), FSqMC(), or DiffBetaMC() functions.

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.

...

additional arguments.

Value

Returns a matrix of confidence intervals.

Details

The confidence intervals are percentile intervals, \(\left[ \hat{G}^{-1} \left( \alpha / 2 \right), \hat{G}^{-1} \left( 1 - \alpha / 2 \right) \right]\), where \(\hat{G}\) is the empirical distribution function of the Monte Carlo draws (type 7 quantiles). The standard errors are the standard deviations of the draws.

Author

Ivan Jacob Agaloos Pesigan

Examples

# Data ---------------------------------------------------------------------
data("nas1982", package = "betaMC")

# Fit Model in lm ----------------------------------------------------------
object <- stats::lm(
  formula = QUALITY ~ NARTIC + PCTGRT + PCTSUPP,
  data = nas1982
)

# MC -----------------------------------------------------------------------
mc <- MC(
  object = object,
  R = 100, # use a large value e.g., 20000L for actual research
  seed = 0508
)

# BetaMC -------------------------------------------------------------------
out <- BetaMC(object = mc, alpha = 0.05)

## Methods -----------------------------------------------------------------
confint(object = out, level = 0.95)
#>             2.5 %    97.5 %
#> NARTIC  0.3106786 0.6134972
#> PCTGRT  0.2494813 0.5346903
#> PCTSUPP 0.1306721 0.4055249