View source: R/plot.statcheck.R
plot.statcheck | R Documentation |
Function for plotting of statcheck
objects. Reported p values are
plotted against recalculated p values, which allows the user to easily spot
if articles contain miscalculations of statistical results.
## S3 method for class 'statcheck'
plot(x, alpha = 0.05, APAstyle = TRUE, group = NULL, ...)
x |
A statcheck object. See |
alpha |
assumed level of significance in the scanned texts. Defaults to .05. |
APAstyle |
If TRUE, prints plot in APA style. |
group |
Indicate grouping variable to facet plot. Only works when
|
... |
arguments to be passed to methods, such as graphical parameters
(see |
If APAstyle = FALSE, inconsistencies between the reported and the recalculated p value are indicated with an orange dot. Recalculations of the p value that render a previously non significant result (p >= .5) as significant (p < .05), and vice versa, are considered decision errors, and are indicated with a red dot. Exactly reported p values (i.e. p = ..., as opposed to p < ... or p > ...) are indicated with a diamond.
Many thanks to John Sakaluk who adapted the plot code to create graphs in APA style.
statcheck
# First we need a statcheck object
# Here, we create one by running statcheck on some raw text
txt <- "This test is consistent t(28) = 0.2, p = .84, but this one is
inconsistent: F(2, 28) = 4.2, p = .01. This final test is even a
gross/decision inconsistency: z = 1.23, p = .03"
result <- statcheck(txt)
# We can then plot the statcheck object 'result' by simply calling plot() on
# "result". R will know what kind of plot to make, because "result" is of
# class "statcheck"
plot(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.