pivot
and
inverse
.
resampPivotT resampPivotDiff resampPivotRatio each have two components, functions with these arguments: pivot(replicates, observed) inverse(observed, quantiles)
B
rows (the number of bootstrap samples) and
k
columns;
the
replicates
component of a
bootstrap
object.
k
;
the
observed
component of a
bootstrap
object.
K
rows and
r
columns, where
r
is the number
of parameters for which intervals are desired.
pivot
function returns a matrix with
B
rows and
K
columns.
the
inverse
function returns a matrix with
K
rows and
r
columns.
For bootstrap-T intervals for the means of multivariate
data with
p
columns,
k=2p
(means and standard errors for each column)
K=p
(t-statistics for each column), and
r=p
(confidence intervals for each column).
If intervals were desired for only certain columns of the data,
then
K
and
r
could be smaller.
resampPivotT$pivot
calculates
(bootstrap estimates - observed estimates) / standardErrors
for each bootstrap sample.
Then
bootstrapT
calculates
quantiles of the bootstrap distribution of this pivotal quantity
and calls
resampPivotT$inverse
, which solves
(observed estimates - parameters) / (observed standardErrors)
for the parameter values.
For multivariate statistics those calculations are performed for each column,
assuming that the estimates are in positions 1, 3, ...
(these columns of
replicates
and positions in
observed
)
and the standard errors in positions 2, 4, ...
The corresponding pivots for
resampPivotDiff
and
resampPivotRatio
are
bootstrap estimates - observed estimates
bootstrap estimates / observed estimates
respectively.
See code of
resampPivotT
,
resampPivotDiff
or
resampPivotRatio
for examples, if you write your own pair of functions.