MCplot_crit | R Documentation |
This function plots the power function of one selected test statistics. An attempt to modify the critical region of the test is made aiming at improving the power.
MCplot_crit( object, d_item, nstats = c("W", "LR", "RS", "G", "U1", "U2", "St"), alpha = 0.05, xlim = 5, legend_title = ggplot2::element_blank(), legend.direction = "vertical", tag_title = ggplot2::element_blank(), name_title = ggplot2::element_blank(), tcolor = FALSE, ctr_alpha = 1, ctr_mod = c("low", "high", "both") )
object |
An object of class " |
d_item |
A vector of length k containing delta values of each item. If missing, by default all deltas are set to 0. |
nstats |
Name of test statistics chosen out of possible tests c("W", "LR", "RS", "G", "U1", "U2", "St") to be modified. Note only one test allowed. By default "U1" will be plotted. Note "U1" = "sqs" or sum of squared elements of the score function and "U2" = "abs" or sum of absolute values. |
alpha |
Probability of error of first kind (in plot shown as dotted horizontal line). |
xlim |
A numeric value, specifying the left/lower limit and the right/upper limit of the x scale. Maximum value is xlim = 10. |
legend_title |
The text for Legend. By default it is set to "Test". |
legend.direction |
layout of items in legends ("horizontal" or "vertical") |
tag_title |
The text for tag label, which will be displayed at the top-left of the plot, by default of Item 1 only. By default it is element_blank() |
name_title |
The text for title of plot. By default it is element_blank(). |
tcolor |
Logic value. If TRUE then ggplot plot will be in color otherwise black and white. |
ctr_alpha |
A numeric value. The crit. region C of selected test statistic will be 100(alpha*ctr_alpha) percent largest values of this test statistics. Default value is 1. |
ctr_mod |
Character. Which type of modification of critical region should be used. Adding low most extreme values of the respective of T statistics ("low"), adding high most extreme values of the respective of T statistics ("high"), or adding both ("both"). The latter is also Default value. |
An object of class "MCplot
" containing:
power_item |
A list of length k containing ggplot objects of power plots of each item and selected test statistics and modification of critical region (cond). |
hist_item |
Histograms of critical values of sufficient statistics t, without ("test name") and with (mod) modification of critical region. |
plotlist |
A list of length k containing combined ggplot objects of (1) power plots of each item and selected test statistics and modification of critical region, and (2) Histograms of critical values of sufficient statistics t, without ("test name") and with (mod) modification of critical region. |
resultlist |
A list of length k containing several sublists: values of sufficient statistics t "t_item", indices of 100(alpha*ctr_alpha) percent largest values ("icrit"), and 100(alpha) percent largest values of test statistic ("icrit0"), incices of modification ("imod", "imod_low", "imod_high"), difference of indices ("idiff"), union of indices in crit. reg. after modification ("icrit_mod"), local power values at all delta=0 ("lpwr_d0"), local power with vector d_item and d=0 for item i ("lpwr_d_item"), and a table of rel. frequency of values of sufficient statistics t in critical region ("t_table") |
hist_crit_reg |
A list of length k containing histograms of critical values of sufficient statistics t, without modification ("test name") and with (mod) modification of critical region. |
call |
The matched call. |
Draxler, C., & Dahm, S. (2020). Conditional or Pseudo Exact Tests with an Application in the Context of Modeling Response Times. Psych, 2(4), 198-208. https://doi.org/10.3390/psych2040017
## Not run: # Rasch model with sample size N = 60, k = 8 library(tclboot) # model parameters items <- c(0, -2, -1, -0.5, 0, 0.5, 1, 2) x <- c(rep(0,25), rep(1,35)) # generate initial data matrix y <- MCsimRasch(N = 60, splitcr = x, items = items)$X obj <- MCboot_crit(X=y, splitcr = x, n_iter = 1000) res <- MCplot_crit(object = obj, nstats = "G") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.