⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 confintp.m

📁 英国剑桥出版社出版的bootstrap一书的附录程序
💻 M
字号:
function[Lo,Up]=confintp(x,statfun,alpha,B1,varargin)%           %      [Lo,Up]=confintp(x,statfun,alpha,B1,PAR1,...)%%      Confidence interval of the estimator of a parameter%      based on the bootstrap percentile method  %%     Inputs:%           x - input vector data %     statfun - the estimator of the parameter given as a Matlab function   %      alpha  - level of significance (default alpha=0.05)  %          B1 - number of bootstrap resamplings (default B1=199)   %    PAR1,... - other parameters than x to be passed to statfun%%     Outputs:%         Lo - The lower bound %         Up - The upper bound%%     Example:%%     [Lo,Up] = confintp(randn(100,1),'mean');%  Created by A. M. Zoubir and  D. R. Iskander%  May 1998%%  References:% %  Efron, B.and Tibshirani, R.  An Introduction to the Bootstrap.%               Chapman and Hall, 1993.%%  Hall, P. Theoretical Comparison of Bootstrap Confidence%               Intervals. The Annals of Statistics, Vol  16, %               No. 3, pp. 927-953, 1988.%%  Zoubir, A.M. Bootstrap: Theory and Applications. Proceedings %               of the SPIE 1993 Conference on Advanced  Signal %               Processing Algorithms, Architectures and Imple-%               mentations. pp. 216-235, San Diego, July  1993.%%  Zoubir, A.M. and Boashash, B. The Bootstrap and Its Application%               in Signal Processing. IEEE Signal Processing Magazine, %               Vol. 15, No. 1, pp. 55-76, 1998.pstring=varargin;if (exist('B1')~=1), B1=199; end;if (exist('alpha')~=1), alpha=0.05; end;x=x(:);vhat=feval(statfun,x,pstring{:});vhatstar=bootstrp(B1,statfun,x,pstring{:});q1=floor(B1*alpha*0.5);q2=B1-q1+1;st=sort(vhatstar);Lo=st(q1);Up=st(q2);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -