A
download covjack.m
Language: Matlab
LOC: 19
Project Info
MatLinks/Chorus(matlinks)
Server: SourceForge
Type: cvs
...chest\copyleft\gpl\stixbox\
   bincoef.m
   cat2tbl.m
   ciboot.m
   ciquant.m
   cmpmod.m
   Contents.m
   contincy.m
   corr.m
   covboot.m
   covjack.m
   cvar.m
   datas1.m
   datas10.m
   datas11.m
   datas2.m
   datas3.m
   datas4.m
   datas5.m
   datas6.m
   datas7.m
   datas8.m
   datas9.m
   dbeta.m
   dbinom.m
   dchisq.m
   df.m
   dgamma.m
   dgumbel.m
   dhypg.m
   dlognorm.m
   dnorm.m
   dt.m
   dweib.m
   egumbel.m
   getdata.m
   histo.m
   identif5.m
   identify.m
   kaplamai.m
   ldiscrim.m
   linreg.m
   lodds.m
   loddsinv.m
   logitfit.m
   lsfit.m
   lsselect.m
   normmix.m
   octvinit.m
   pairs.m
   pbeta.m
   pbinom.m
   pchisq.m
   pf.m
   pgamma.m
   pgumbel.m
   phypg.m
   plognorm.m
   plotdens.m
   plotempd.m
   plotsym.m
   pnorm.m
   pt.m
   pweib.m
   qbeta.m
   qbinom.m
   qchisq.m
   qf.m
   qgamma.m
   qgumbel.m
   qhypg.m
   qlognorm.m
   qnorm.m
   qqgamma.m
   qqgumbel.m
   qqnorm.m
   qqplot.m
   qqweib.m
   qt.m
   quantile.m
   qweib.m
   ranktrf.m
   rbeta.m
   rbinom.m
   rboot.m
   rchisq.m
   Readme.m
   rf.m
   rgamma.m
   rgumbel.m
   rhypg.m
   rlognorm.m
   rnorm.m
   rt.m
   rweib.m
   spearman.m
   stdboot.m
   stdize.m
   stdjack.m
   stixdemo.m
   test1b.m
   test1n.m
   test1r.m
   test2n.m
   test2r.m

function [C,y] = covjack(x,theta,p1,p2,p3,p4,p5,p6,p7,p8,p9)
%COVJACK  Jackknife estimate of the variance of a parameter estimate.
%
%	  C = covjack(X,'T')
%	  
%	  The function omputes T(X) with one observation removed at a 
%	  time  and uses the result to compute an estimate of the vari- 
%	  ance of T(X) assuming that X is a representative sample from  
%	  the underlying distribution of X. If T is multidimensional then
%	  the covariance matrix is estimated. Note that the jackknife  
%	  method does not work for some functions T that are not smooth 
%	  enough, the median being one example.

%       Anders Holtsberg, 14-12-94
%       Copyright (c) Anders Holtsberg

arglist = [];
for i = 3:nargin
   arglist = [arglist, ',p', num2str(i-2)];
end

if min(size(x)) == 1
   x = x(:);
end

n = size(x,1);

evalstring = [theta,'(xmi',arglist,')'];
xmi = x(2:n,:);
s = eval(evalstring);
y = [s(:) zeros(length(s(:)),n-1)];
for i = 2:n
   xmi = x([1:i-1,i+1:n],:);
   yy = eval(evalstring);
   y(:,i) = yy(:);
end

C = cov(y')*(n-1)^2 / n;

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us