One sample jackknife

Share:

Description

Basic resampling. Supply the data and statistic to resample.

Usage

1
2
jackknife(data, statistic, args.stat = NULL,
          label = NULL, statisticNames = NULL, trace = FALSE)

Arguments

data

vector, matrix, or data frame.

statistic

a function, or expression (e.g. mean(myData, trim = .2).

args.stat

a list of additional arguments to pass to statistic, if it is a function.

label

used for labeling plots (in a future version).

statisticNames

a character vector the same length as the vector returned by statistic.

trace

logical, if TRUE an indication of progress is printed.

Value

a list with class "jackknife" that inherits from "resample", with components:

observed

the value of the statistic for the original data.

replicates

a matrix with R rows and p columns.

n

number of observations in the original data, or vector of length 2 in two-sample problems.

p

length(observed).

R

number of replications.

seed

the value of the seed at the start of sampling.

call

the matched call.

statistics

a data frame with p rows, with columns "observed", "mean" (the mean of the replicates), and other columns appropriate to resampling; e.g. the bootstrap objects have columns "SE" and "Bias", while the permutation test objects have "Alternative" and "PValue".

There are functions for printing and plotting these objects, in particular print, plot, hist, qqnorm, quantile.

Note

The current version only handles a single sample.

Author(s)

Tim Hesterberg timhesterberg@gmail.com,
http://www.timhesterberg.net/bootstrap

See Also

resample-package.

Examples

1
2
3
4
5
6
7
## Not run: 
# See full set of examples in resample-package
data(Verizon)
CLEC <- with(Verizon, Time[Group == "CLEC"])
jackknife(CLEC, mean)

## End(Not run)