cdfinv.sim: Computation of confidence intervals via simulations and CDF...

View source: R/cdfinvsim.R

cdfinv.simR Documentation

Computation of confidence intervals via simulations and CDF inversion

Description

cdfinv.sim() returns one- or two-sided confidence interval estimates.

Usage

cdfinv.sim(
  DISTR,
  PARAM,
  STAT,
  lpb = -10000,
  upb = 10000,
  bound = "two-sided",
  alpha = 0.05,
  tolb = 1e-06,
  tol = 1e-06,
  seed = 1,
  numsim = 1e+05,
  nsamp = 1,
  stat.func = mean,
  ...
)

Arguments

DISTR

name of distribution (in R) from which each datum is sampled

PARAM

name of distribution parameter for which we are computing an interval estimate

STAT

observed value of the chosen statistic

lpb

lower bound of search interval

upb

upper bound of search interval

bound

one of "two-sided", "lower", or "upper"

alpha

the confidence coefficient is 1 - alpha

tolb

search interval bound offset value

tol

convergence tolerance for uniroot function

seed

random number generator seed

numsim

number of simulated datasets

nsamp

sample size for each simulated dataset

stat.func

pointer to function computing the statistic for each dataset

...

additional arguments for DISTR's cdf function

Value

A list with interval bounds and associated cdf values.

  • DISTR - The distribution name (as given in R)

  • PARAM - The parameter name (as given in R)

  • STAT - The observed statistic value

  • bound - The interval bound(s)

  • q - The cdf quantile(s) associated with the interval bound(s)

Author(s)

Peter E. Freeman, pfreeman@cmu.edu


cdfinv documentation built on April 16, 2025, 1:09 a.m.