jackstat = jackknife(jackfun,X)
jackstat = jackknife(jackfun,X,Y,...)
jackstat = jackknife(jackfun,...,'Options',option)
jackstat = jackknife(jackfun,X) draws
jackknife data samples from the
X, computes statistics on each sample using
jackfun, and returns the results in
each row of
X as one data sample, so there are
samples. Each of the
n rows of
the results of applying
jackfun to one jackknife
jackfun is a function handle specified
the results for the sample consisting of
ith row omitted:
s = x; s(i,:) = ; jackstat(i,:) = jackfun(s);
jackfunreturns a matrix or array, then this output is converted to a row vector for storage in
Xis a row vector, it is converted to a column vector.
jackstat = jackknife(jackfun,X,Y,...) accepts
additional arguments to be supplied as inputs to
They may be scalars, column vectors, or matrices.
each jackknife sample by sampling with replacement from the rows of
the non-scalar data arguments (these must have the same number of
rows). Scalar data are passed to
Non-scalar arguments must have the same number of rows, and each
jackknife sample omits the same row from these arguments.
jackstat = jackknife(jackfun,...,'Options',option) provides
an option to perform jackknife iterations in parallel, if the Parallel Computing Toolbox™ is
'Options' as a structure you create
the following field in the structure:
Estimate the bias of the MLE variance estimator of random samples taken from the vector
jackknife. The bias has a known formula
in this problem, so you can compare the
jackknife value to this
sigma = 5; y = normrnd(0,sigma,100,1); m = jackknife(@var,y,1); n = length(y); bias = -sigma^2/n % known bias formula jbias = (n-1)*(mean(m)-var(y,1)) % jackknife bias estimate bias = -0.2500 jbias = -0.3378
To run in parallel, set the
'UseParallel' option to
'UseParallel' field of the options structure to
statset and specify the
'Options' name-value pair argument in the call to this function.
For more information, see the
'Options' name-value pair argument.
For more general information about parallel computing, see Run MATLAB Functions with Automatic Parallel Support (Parallel Computing Toolbox).