Skip to contents

This function performs a Bayesian single-case analysis to assess the abnormality of a given score compared to a control group. It generates simulated distributions of scores based on the control group's mean, standard deviation, and sample size, and provides Bayesian credible intervals, p-values, and abnormality percentages.

Usage

deficit_bayes(
  score,
  ctrl.mean,
  ctrl.sd,
  ctrl.n,
  conf.level = 0.95,
  direction = "lower",
  tail = "one.tailed",
  dp = 2,
  sims = 10000,
  treshold = 0.1
)

Arguments

score

Numeric value representing the score of the single case.

ctrl.mean

Numeric value representing the mean of the control group.

ctrl.sd

Numeric value representing the standard deviation of the control group.

ctrl.n

Integer value representing the sample size of the control group.

conf.level

Numeric value specifying the confidence level for the credible interval (default is 0.95 for 95%).

direction

Character. Specifies the direction of the hypothesis. Options are "lower" (one-tailed), "higher" (one-tailed), or "two.tailed" (default, two-tailed).

tail

Character. Specifies whether the test is one-tailed or two-tailed. Options are "one.tailed" and "two.tailed" (default)

dp

Number of decimal places for rounding the results (default is 2).

sims

Integer specifying the number of simulations to perform. Default is 10000.

treshold

Numeric value for the abnormality threshold. Default is 0.1.

Value

A list of statistical input, parameters, and results. Key outputs include:

  • t-value: The t-value calculated for the test.

  • p-value: The p-value for the test, indicating statistical significance.

  • effect-size (z-cc): The z-score (effect-size) corrected for the control group.

  • abnormality: The percentage of the population expected to score a more extreme score.

Details

NEEDS WRITING

References

  • Crawford, J.R., & Garthwaite, P.H. (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.

  • NEEDS WRITING.

  • NEEDS WRITING.

  • NEEDS WRITING.

  • NEEDS WRITING.

See also

  • deficit(): Assessing For a frequentist single dissociation between a test score and a control sample.

  • deficit_bayes(): For a Bayesian approach to assessing for a dissociation between a single test score and a control sample for a single case.

  • discrep(): For assessing a dissociation between two test scores for a single case.

  • bayestestR::hdi()

Examples

deficit_bayes(
  score = 90,
  ctrl.mean = 100,
  ctrl.sd = 15,
  ctrl.n = 30,
  conf.level = 0.95,
)
#> Assessing For a Bayesian Deficit Between a Test Score and a Control Sample.
#> 
#> INPUTS:
#> 
#> Inputs               Value
#> ------------------  ------
#> Sample mean            100
#> Sample SD               15
#> Sample size             30
#> Case's test score       90
#> 
#> PARAMETERS:
#> 
#> Parameter                         Value                                  
#> --------------------------------  ---------------------------------------
#> Deficit Method                    Bayesian (Crawford & Garthwaite, 2007) 
#> Confidence Interval Method        Bayesian                               
#> Confidence Intervals              95%                                    
#> Hypothesis                        One-Tailed                             
#> Direction Indicating Impairment   Lower                                  
#> 
#> OUTPUTS:
#> 
#> Outputs              Value    95% Credible Interval 
#> -------------------  -------  ----------------------
#> p-value (lower)      0.26                           
#> Effect size (z-cc)   -0.67    -1.06 to -0.28        
#> Abnormality          25.90%   13.59 % to 38.67 %    
#> 
#> Note.
#> - Abnormality = The percentage of controls expected to show a higher deficit.
#> - z-cc = Z for the case control.
#> 
#> See documentation for further information on how scores are computed.