<< covboot Resampling rboot >>

Stixbox >> Stixbox > Resampling > covjack

covjack

Jackknife estimate of the variance of a parameter estimate.

Calling Sequence

c=covjack(x,T)
[c,y]=covjack(...)

Parameters

x :

a matrix of doubles

T :

a function which computes the empirical estimate from x

c :

a 1-by-1 matrix of doubles, the estimate of the covariance matrix

y :

a m-by-n matrix of doubles, the parameter estimates of the resamples, where m is the size of the parameter estimate and n is the length of x.

Description

The function computes T(x) with one observation removed at a time and uses the result to compute an estimate of the variance 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.

The function T must have the following header:

p=T(x)
where x is the sample or the resample and p is a m-by-1 matrix of doubles. In the case where the parameter estimate has a more general shape (e.g. 2-by-2), the shape of p is reshaped into a column vector with m components.

See "T and extra arguments" for details on how to pass extra-arguments to T.

Note that the jackknife method does not work for some functions T that are not smooth enough, the median being one example.

Examples

x=distfun_unifrnd(0,1,100,1);
c=covjack(x,mean)
// Get y
[c,y]=covjack(x,mean);
size(y)

// With extra-arguments for T.
x=distfun_chi2rnd(3,20,5);
mean(x,"r")
c=covjack(x,list(mean,"r"))

Authors


Report an issue
<< covboot Resampling rboot >>