Code covered by the BSD License  

Highlights from
Rectangular Confidence Regions

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 85.62 KB File ID: #11627
image thumbnail

Rectangular Confidence Regions

by Tom Davis

 

03 Jul 2006 (Updated 17 Mar 2008)

Confidence Hypercubes

| Watch this File

File Information
Description

R = RCR(S) computes the semi-edge-length of the mean-centered hypercube with 95% probability given S, which is either a covariance matrix or a vector of standard deviations from a multivariate normal distribution. If S is a real, nonnegative vector, RCR(S) is equivalent to RCR(DIAG(S.^2)). Scalar S is treated as a standard deviation.

R = RCR(S,P) computes the semi-edge-length of the hypercube with probability P instead of the default, which is 0.95. R is the two-tailed, equicoordinate quantile corresponding to P. The hypercube edge-length is 2*R.

R = RCR(S,P,NP) uses NP quadrature points instead of the default, which is 2^11. Smaller values of NP result in faster computation, but may yield less accurate results. Use [] as a placeholder to obtain the default value of P.

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

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

[R,E] = RCR(S,...) returns an error estimate E.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Confidence Region Radius

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
07 Apr 2009 Viktor

Seems to be some error during call to fzero. 'options' seem to be correct. Any ideas?

>> r=rcr(1)
??? Error using ==> optimget
Too many input arguments.

Error in ==> fzero at 143
tol = optimget(options,'TolX',defaultopt,'fast');

Error in ==> rcr at 131
r=abs(fzero(@difference,R0,options,s,p,np));
 

09 Apr 2009 Tom Davis

I cannot replicate this problem using MATLAB 7.5.

r = rcr(1)

yields r = 1.9600 as expected.

14 Apr 2009 Viktor

Hi. Im using MATLAB 7.7 and the problem persists.

A general question as well which you might know. How hard is it to compute confidence regions for higher dimensions, say n=50, with correlated variables?

14 Apr 2009 Tom Davis

Please send me an email message, Viktor. Thanks.

14 Apr 2009 Tom Davis

I cannot replicate this problem using MATLAB 7.7.0.471 (Sept. 17, 2008).

r = rcr(1)

yields r = 1.9600 as expected.

Please login to add a comment or rating.
Updates
02 Oct 2006

minor revisions

16 Apr 2007

updated reference links

23 Apr 2007

improved code metrics

27 Apr 2007

improved code metrics

25 Jun 2007

description revision

02 Jul 2007

description revision

17 Mar 2008

updated contact information

Tag Activity for this File
Tag Applied By Date/Time
statistics Tom Davis 22 Oct 2008 08:31:59
probability Tom Davis 22 Oct 2008 08:31:59
multivariate normal distribution Tom Davis 22 Oct 2008 08:31:59

Contact us at files@mathworks.com