parametricBootstrap(data, statistic, rsampler, B=1000, args.stat, args.rsampler, dsampler, seed = .Random.seed, label, statisticNames, block.size = min(100, B), trace = resampleOptions()$trace, assign.frame1 = F, save.samples = F, statistic.is.random, seed.statistic = 500)
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
),
which will be passed in automatically by
parametricBootstrap
; other arguments,
if any, should be provided in a list (
args.rsampler
).
statistic
when calculating
the statistic on the resamples.
rsampler
when performing the
parametric sampling.
set.seed
.
for()
loops).
assign.frame1=T
if all estimates are identical (this is slower).
parametricBootstrap
which inherits from
resamp
. This has
components
call
,
observed
,
replicates
,
estimate
,
B
,
n
,
dim.obs
,
seed.start
,
seed.end
,
rsampler
,
args.rsampler
,
parent.frame
,
defaultLabel
,
and possibly
dsampler
and
label
.
The data frame
estimate
has
three columns containing the bootstrap estimates of
Bias
,
Mean
, and
SE
.
See
for a description of many components.
assign.frame1=T
, you must be sure that this assignment does not
overwrite some quantity of interest stored in frame 1.
If the function is interrupted it saves current results
(all complete sets of
block.size
replicates)
to
.parametricBootstrap.partial.results
. This object is nearly the same as if
parametricBootstrap
were called with a smaller value of
B
.
(If the function is interrupted before a complete set of
block.size
replicates is formed, a one-component list with
B
= 0 is saved
to
.parametricBootstrap.partial.results
, for use with the
function.)
Performs parametric bootstrapping for a wide scope of
statistics and expressions. Function
rsampler
and its arguments
(passed on by
args.rsampler
) specify the parametric distribution
from which bootstrap samples are drawn.
Davison, A.C. and Hinkley, D.V. (1997), Bootstrap Methods and Their Application, Cambridge University Press.
Efron, B. and Tibshirani, R.J. (1993), An Introduction to the Bootstrap, San Francisco: Chapman & Hall.
More details on some arguments, see .
Print, summarize, plot: , , , , ,
Description of a "parametricBootstrap" object, extract parts: , .
Confidence intervals: , .
Modify a "parametricBootstrap" object: , .
For an annotated list of functions in the package, including other high-level resampling functions, see: .
# Apply parametric bootstrap to mean # and demonstrate summary(), plot() temp <- parametricBootstrap(iris[,1,1], mean, rsampler = rnorm, args.rsampler = list(mean = mean(iris[,1,1]), sd = sqrt(var(iris[,1,1])))) temp summary(temp) plot(temp)