groupbootR {MCE} | R Documentation |
According to the CLT, the line relating MCE to 1/sqrt(R) will always pass through the origin. If a few of the points along this line can be estimated, a line of best fit with the intercept set to zero can be drawn. After the line is estimated, an estimate of R can be generated for a given MCE. This function plots this line and reports an estimate of R.
groupbootR(data, Rseq = c(100, 500), B = 20, bb = 1, targetMCE = NA, method = "bootstrap", truth = NULL, plot = FALSE, digits = 2, xAxis = NULL, yAxis = NULL, zAxis = NULL, type = "", ...)
data |
vector. replication results |
Rseq |
vector. group sizes, or R*, at which to estimate MCE in order to draw a prediction line |
B |
numeric (integer). when method="bootstrap", number of bootstrap replicates to use |
bb |
numeric (integer). numer of grouping permutations |
targetMCE |
vector or numeric. MCE's for which the prediction of R is of interest |
method |
character. either "clt" or "bootstrap" indicating the method used to estimate MCE at R* |
plot |
logical. TRUE if plot is to be shown |
digits |
numeric (integer). number of digits to display for estimated MCE |
xAxis |
vector. sequence of points to be included on the xaxis. Leaving as NULL the xaxis is calculated automatically. |
yAxis |
vector. sequence of points to be included on the yaxis. Leaving as NULL the yaxis is calculated automatically. |
zAxis |
vector. sequence of points to be included on the top axis. Leaving as NULL the zaxis is calculated automatically. |
type |
character. type of simulation result of interest including "mean", "SE", "PB" and "RE" for mean, standard error, percent bias and relative efficiency |
truth |
numeric. if type="PB" the true value. |
... |
other plotting parameters |
The following steps are used to generate the points that are used to fit the line.
estimates of R from bootstrap grouping replication plot along with the plot, if specified
This should be used cautiously when the Central Limit Theorem does not apply, or when the simulation-based estimate is not generated as an average of the replication results. Note that the top axis presents the R that corresponds to the x-axis value of 1/sqrt(R) directly below.
Elizabeth Koehler
mceCLT
, mceBoot
, RProj
, groupbootMCE
in package MCE.
percentbias<-rnorm(10000,15, 4) groupbootR(percentbias, Rseq=c(100,500,2000), B=20, bb=10, targetMCE=c(1, .5), method="bootstrap", type="PB", truth=15, plot=TRUE)