Q.conf.int: Approximate Confidence Intervals for p-th Quantile

View source: R/Q.conf.int.R

Q.conf.intR Documentation

Approximate Confidence Intervals for p-th Quantile

Description

This function can be used to derive approximate confidence intervals for the p-th quantile of the fitted distribution (see mle).

Usage

Q.conf.int(p, model, alpha = 0.1, ln = FALSE)

Arguments

p

Vector of probabilities.

model

mle object corresponding to the fitted model.

alpha

1-alpha is the interval's coverage probability.

ln

whether or not the confidence interval of the p-th quantile should be computed on the natural logarithmic scale (see Details).

Details

The p-th quantile confidence interval is derived using the observed Fisher's information matrix in conjuction with the well-known delta method. Here, Q.conf.int allows the user to chose between two types of confidence intervals: one that is computed on the original scale and one that is computed on the quantile's natural logarithmic scale.

Value

The function returns a 3-by-length(p) array containing, for each value of p, the confidence interval's lower and upper bounds, as well as the quantile point estimate (maximum likelihood).

References

Rice, J.A. (2006) Mathematical statistics and data analysis. Duxbury Press, 3rd edition (regarding the Delta method).

See Also

plot.mle

Examples

data(yarns)
x <- yarns$x
fit.x <- mle(x,'gamma',c(.1,.1))
Q.conf.int(p=c(.5,.9,.95,.99),model=fit.x,alpha=.01,ln=FALSE)
Q.conf.int(p=c(.5,.9,.95,.99),model=fit.x,alpha=.01,ln=TRUE)

FAmle documentation built on March 18, 2022, 5:29 p.m.