File Exchange

image thumbnail

Confidence Region Radius

version 1.0.0.0 (59.3 KB) by Tom Davis
Confidence Intervals, Circles, and Spheres

5 Downloads

Updated 17 Mar 2008

View License

R = CRR(S) computes the radius of the mean-centered interval, circle, or sphere with 95% probability given S, which is either a vector of standard deviations or a covariance matrix from a multivariate normal distribution. If S is a real, symmetric, positive semidefinite matrix, CRR(S) is equivalent to CRR(SQRT(EIG(S))). Scalar S is treated as a standard deviation.

R = CRR(S,P) computes the confidence region radius with probability P instead of the default, which is 0.95.

R = CRR(S,P,TOL) uses a quadrature tolerance of TOL instead of the default, which is 1e-15. Larger values of TOL may result in fewer function evaluations and faster computation, but less accurate results. Use [] as a placeholder to obtain the default value of P.

R = CRR(S,P,TOL,M) performs a bootstrap validation with M normally distributed random samples of size 1e6. Use [] as a placeholder to obtain the default value of TOL.

R = CRR(S,P,TOL,[M N]) performs a bootstrap validation with M normally distributed random samples of size N.

Cite As

Tom Davis (2020). Confidence Region Radius (https://www.mathworks.com/matlabcentral/fileexchange/10526-confidence-region-radius), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Tom Davis

Hello, Doug

While ellipses and ellipsoids are most common, confidence regions may assume other shapes. CRR(S) returns the radius of the mean-centered circle or sphere that contains, on average, 95% of a normally distributed random sample with covariance matrix S.

Doug B

will this give me the elliptical confidence region or do I need to do the transformation myself? What is the meaning of a spherical confidence region if the distribution is elliptical?

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!