Description Usage Arguments Details Author(s) Examples
View source: R/crawford.test.R
Neuropsychologists often need to compare a single case to a small control group. However, the standard two-sample t-test does not work because the case is only one observation. Crawford and Garthwaite (2007) demonstrate that the Bayesian test is a better approach than other commonly-used alternatives. .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
patient |
Single value (patient's score). |
controls |
Vector of values (control's scores). |
mean |
Mean of the control sample. |
sd |
SD of the control sample. |
n |
Size of the control sample. |
CI |
Credible interval bounds. |
treshold |
Significance treshold. |
iter |
Number of iterations. |
color_controls |
Color of the controls distribution. |
color_CI |
Color of CI distribution. |
color_score |
Color of the line representing the patient's score. |
color_size |
Size of the line representing the patient's score. |
alpha_controls |
Alpha of the CI distribution. |
alpha_CI |
lpha of the controls distribution. |
The p value obtained when this test is used to test significance also simultaneously provides a point estimate of the abnormality of the patient’s score; for example if the one-tailed probability is .013 then we know that the patient’s score is significantly (p < .05) below the control mean and that it is estimated that 1.3
Dominique Makowski
1 2 3 4 5 6 7 8 | library(psycho)
crawford.test(patient = 125, mean = 100, sd = 15, n = 100)
plot(crawford.test(patient = 80, mean = 100, sd = 15, n = 100))
crawford.test(patient = 10, controls = c(0, -2, 5, 2, 1, 3, -4, -2))
test <- crawford.test(patient = 7, controls = c(0, -2, 5, -6, 0, 3, -4, -2))
plot(test)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.