Sboottwosample {FRB} | R Documentation |
Calculates bootstrapped two-sample S-estimates using the Fast and Robust Bootstrap method.
Sboottwosample(X, groups, R, ests = twosampleS(X, groups))
X |
matrix or data frame |
groups |
vector of 1's and 2's, indicating group numbers |
R |
number of bootstrap samples |
ests |
original two-sample S-estimates as returned by twosampleS () |
This function is called by FRBhotellingS
, it is typically not to be used on its own.
It requires the result of twosampleS
applied on X
, supplied through the argument ests
.
If ests
is not provided, twosampleS
will be called with default arguments.
The fast and robust bootstrap was first developed by Salibian-Barrera and Zamar (2002) for univariate regression MM-estimators.
The value centered
gives a matrix with R
columns and 2*p+p*p rows (p is the number of variables in X
),
containing the recalculated estimates of the S-location for the first and second center and common S-covariance. Each column represents
a different bootstrap sample.
The first p rows are the location estimates of the first center, the next p rows are the location
estimates of the second center and the last p*p rows are the common covariance estimates (vectorized). The estimates
are centered by the original estimates, which are also returned through Sest
.
A list containing:
centered |
recalculated estimates of location of first and second center and covariance (centered by original estimates) |
Sest |
original estimates of first and second center and common covariance |
Ella Roelant and Gert Willems
Y1 <- matrix(rnorm(50*5), ncol=5) Y2 <- matrix(rnorm(50*5), ncol=5) Ybig <- rbind(Y1,Y2) grp <- c(rep(1,50),rep(2,50)) Sests <- twosampleS(Ybig, grp, bdp=0.25) bootresult <- Sboottwosample(Ybig,grp,R=1000,ests=Sests)