View source: R/MCplot_simdata_ext.R
MCplot_simdata_ext | R Documentation |
This function plots the power function of selected test statistics
MCplot_simdata_ext( npers = c(10, 15, 20, 25, 30, 50), k, nstats = c("W", "LR", "RS", "G", "U1", "U2", "St"), alpha = 0.05, xlim = 5, legend_title = "n", tag_title = ggplot2::element_blank(), name_title = ggplot2::element_blank(), legend.position = c(0.5, 0.75), legend.direction = "vertical", tcolor = FALSE )
npers |
A vector of sample sizes n for cases of interest. N = 10, 15, 20, 25, 30, 50. Default value are N = 10, 20, 30, 50. |
k |
Number of items k of selected case. k = 6, 8, 10, 12, 14, 16, 18, 20, 25, 30 |
nstats |
Name of test statistics to be plotted. Note a maximum of 1 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". |
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(), |
legend.position |
the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector) |
legend.direction |
layout of items in legends ("horizontal" or "vertical") |
tcolor |
Logic value. If TRUE then ggplot plot will be in color otherwise black and white. |
An object of class "MCplot.case
" containing:
plotlist |
A list of length k containing ggplot objects of power plots of each item and selected test statistics for sample sizes. |
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: # load MC sim data of cases # with N=10,20,30,50, k=14 # and generate power plots of sqs test res <- MCplot_simdata_ext(npers = c(10,20, 30, 50), k=14, nstats = "sqs", xlim = 4, tcolor = TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.