crawford.test: Crawford-Garthwaite (2007) Bayesian test for single-case...

Description Usage Arguments Details Author(s) Examples

View source: R/crawford.test.R

Description

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. .

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
crawford.test(
  patient,
  controls = NULL,
  mean = NULL,
  sd = NULL,
  n = NULL,
  CI = 95,
  treshold = 0.1,
  iter = 10000,
  color_controls = "#2196F3",
  color_CI = "#E91E63",
  color_score = "black",
  color_size = 2,
  alpha_controls = 1,
  alpha_CI = 0.8
)

Arguments

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.

Details

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

Author(s)

Dominique Makowski

Examples

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)

Example output

Note: Many functions of the 'psycho' package have been (improved and) moved to other packages of the new 'easystats' collection (https://github.com/easystats). If you don't find where a function is gone, please open an issue at: https://github.com/easystats/easystats/issues
The Bayesian test for single case assessment (Crawford, Garthwaite, 2007) suggests that the patient's score (Raw = 125.00, Z = 1.67, percentile = 95.22) is significantly different from the controls (M = 100.00, SD = 15.00, p p = 0.050). The patient's score is higher than 94.98% (95% CI [0.02, 0.08]) of the control population.
Warning message:
`mutate_()` is deprecated as of dplyr 0.7.0.
Please use `mutate()` instead.
See vignette('programming') for more help
This warning is displayed once every 8 hours.
Call `lifecycle::last_warnings()` to see where this warning was generated. 
The Bayesian test for single case assessment (Crawford, Garthwaite, 2007) suggests that the patient's score (Raw = 10.00, Z = 3.24, percentile = 99.94) is significantly different from the controls (M = 0.38, SD = 2.97, p p = 0.009). The patient's score is higher than 99.06% (95% CI [8.69e-13, 0.05]) of the control population.

psycho documentation built on Jan. 19, 2021, 9:07 a.m.