parametricBootstrapTest(data, statistic, rsampler,
B=999, args.stat = NULL, args.rsampler = NULL,
null.value, alternative="two.sided", ...)
args.stat.
mean(x, trim=.2).
If
data is given by name (e.g.
data=x) then use that name
in the expression,
otherwise (e.g.
data=air[,4]) use the name
data in the expression.
If
data is a data frame, the expression may involve variables
in the data frame.
n).
Other arguments, including those necessary to ensure sampling under
the null distribution,
should be provided in a list (
args.rsampler).
B=999 causes p-values to be multiples of 1/1000.
statistic when calculating
the statistic on the resamples.
n) passed to
rsampler when performing
the parametric sampling. If elements of the list have names, the
names must match the argument names of
rsampler. The arguments
giving parameter values should be consistent with the null hypothesis,
so that sampling is from the null distribution.
c("mean(x) = 0", "sd(x) = 3"). This should be the same length
as the observed statistic.
These values may be used in the
print and other
methods, but otherwise have no effect: the null distribution
is specified parametrically by
rsampler and
args.rsampler.
two.sided,
greater, or
less. This may be a vector the
same length as the statistic.
parametricBootstrap.
See
for details.
parametricBootstrapTest which inherits from
resamp.
This function is implemented as a front end to
parametricBootstrap.
If
statistic returns a vector-valued result, then p-values are
calculated (independently) for each dimension of the result. In this case,
alternative may be a vector of the same length as the statistic,
indicating which kind of test should be used for each dimension
of the result.
Davison, A.C. and Hinkley, D.V. (1997), Bootstrap Methods and Their Application, Cambridge University Press.
Print, summarize, plot: , , , ,
Description of a "parametricBootstrapTest" object, extract parts: , .
Modify a "parametricBootstrapTest" object: , .
For an annotated list of functions in the package, including other high-level resampling functions, see: .
dd <- data.frame(x=1:30, y=rnorm(30))
plot(dd$x,dd$y); abline(lm(y ~ x, data=dd))
obj <- parametricBootstrapTest(dd, cor(dd$x, dd$y),
rsampler=function(n) data.frame(x=1:n, y=rnorm(30)),
null.value = 0.0, alternative="greater")