SingleTest {singlecase}R Documentation

Single score comparison

Description

crawford.t.test and SingleBayes are for comparison of an individual's score on a single test with the score of a small normative or control sample. They provide a significance test, point estimate of the abnormality of the individual's score, and confidence limits on the abnormality. crawford t-test is based on the $t$ distribution, SingleBayes is a Bayesian alternative.

Usage

crawford.t.test(patient, controls, mean.c = 0, sd.c = 0, n = 0, na.rm = FALSE)
SingleBayes(patient, controls, mean.c = 0, sd.c = 0, n = 0, 
        na.rm = FALSE, n.simul = 1e+05)

Arguments

patient a vector with the patient's score
controls a vector with the control subjects raw scores
mean.c mean of the control group
sd.c standard deviation of the control group
n size of the control group
na.rm a logical value indicating whether NA values should be stripped before the computation proceeds
n.simul a numerical value indicating the number of observations generated for the Monte Carlo estimation. Set at 100.000 by default

Details

crawford.t.test is a modified $t$-test that compare a patient's score to that of a control sample of small size. The test treats the mean and standard deviation form the control group as estimates rather than parameters. It provides a significance test, point estimate of the abnormality of the individual's score, and 95% confidence limits on the abnormality. Abnormality (or rarity) is defined as the percentage of the population that would obtain a score lower than the patient's.

SingleBayes uses Bayesian Monte Carlo methods to test if a patient's score is sufficiently below the scores of controls such that the null hypothesis that it is an observation from the control population can be rejected (i.e., it is used to test for a deficit). It also provides a point estimate of the percentage of the control population that would obtain a lower score (i.e., a point estimate of the abnormality of the score) and a 95% credible interval for this quantity.

Bayesian and frequentist methods provide converging results. Both methods may take either the raw data (using the argument controls) or summary statistics from the control population as inputs. In this later case, the control mean (mean.c), standard deviation (sd.c) and sample size (n) are required.

Value

crawford.t.test returns a list with class "htest" containing all the following components. SingleBayes only returns a list with p-value and rarity:

statistic the one-tailed value of the $t$-statistic.
df the degrees of freedom for the $t$-statistic.
p.value the $p$-value of the one-tailed hypothesis that patient's score is lower than that of the control participants.
rarity a vector containing the point estimate of the rarity of the score and a 95% interval around the rarity estimate (additional 5% and 95% bounds are also provided in the case of SingleBayes).
method a character string indicating the test used.

Author(s)

Matthieu Dubois. matthdub@gmail.com, http://www.code.ucl.ac.be/MatthieuDubois/r_code.html

References

Crawford, J. and Howell, D. (1998) Comparing an individual's test score against norms drived from small samples. Clinical Neuropsychologist, 12(4),482–486.

Crawford, J. and Garthwaite, P. (2002) Investigation of the single case in neuropsychology: Confidence limits on the abnormality of test scores and test score differences. Neuropsychologia, 40(8), 1196–208.

Crawford, J. and Garthwaite, P. (2007) Comparison of a single case to a control or normative sample in neuropsychology: Development of a bayesian approach. Cognitive Neuropsychology, 24(4), 343–372.

John Crawford's website: http://www.abdn.ac.uk/~psy086/dept/SingleCaseMethodology.htm

See Also

crawford.diff.test, DiffBayes

Examples

#function provided with either raw data or summary statistics
controls <- rnorm(15,50,10)
crawford.t.test(patient=30, controls=controls)
crawford.t.test(patient=30, mean.c = mean(controls), 
        sd.c = sd(controls), n = length(controls))

#results provided by the two methods are converging
X <- crawford.t.test(patient=30, mean.c=50, sd.c=10, n=15)
X
X$rarity
SingleBayes(patient=30, mean.c=50, sd.c=10, n=15)

[Package singlecase version 0.1 Index]