RProj {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.
RProj(data, Rseq, B, bb = 1, type = "", truth = NULL, targetMCE, plot = FALSE, digits = 2, xAxis = NULL, yAxis = NULL, zAxis = NULL, ...)
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 |
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. |
targetMCE |
vector or numeric. MCE's for which the prediction of R is of interest |
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. |
... |
other plotting parameters |
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.
Sebastien Haneuse and Elizabeth Koehler
mceCLT
, mceBoot
, RProj
, groupbootMCE
in package MCE
test <- as.matrix(cbind(rnorm(1000, mean=1, sd=0.5), rnorm(1000, mean=1, sd=1))) RProj(test, Rseq=c(100, 500, 250), type="RE", B=1000, bb=5, plot=TRUE, targetMCE=c(0.25,1))