Skip to contents

This function calculates the mean deviances of test scores from the mean, evaluates their significance, and computes various related statistics.

Usage

discreps_from_mean(
  x,
  R = NULL,
  sem,
  sd = 15,
  dp = 2,
  names = NULL,
  conf.level = 0.9,
  threshold = -1.645,
  apply.bonferroni = FALSE
)

Arguments

x

A numeric vector of test scores.

R

A numeric matrix representing the correlation matrix. If not provided, correlation-based calculations are skipped.

sem

A numeric vector of standard error of measurement (SEM) values.

sd

Standard deviation of the test scores. Default is 15.

dp

Number of decimal places for rounding in the results. Default is 2.

names

Optional character vector of names for the test scores. If not provided, default names will be used.

conf.level

Confidence level for the confidence intervals. Default is 0.90.

threshold

Threshold for abnormality detection in Z scores. Default is z = -1.645.

apply.bonferroni

Logical, whether to apply the Bonferroni correction. Default is FALSE.

Value

A list containing various statistics and results.

Examples

sem <- c(3.000000, 3.354102, 3.674235, 4.743416)
scores <- c(118, 107, 77, 68)
R <- matrix(c(1.00, 0.61, 0.64, 0.45,
              0.61, 1.00, 0.62, 0.52,
              0.64, 0.62, 1.00, 0.51,
              0.45, 0.52, 0.51, 1.00), nrow = 4, byrow = TRUE)
names <- c("Verbal Comprehension", "Perceptual Reasoning",
           "Working Memory", "Processing Speed")
discreps_from_mean(scores, R = R, sem = sem, conf.level = 0.95, names = names)
#> ABNORMALITY of Index score deviations from the case's mean Index score:
#> Case's mean Index score: 92.50
#> 
#>  Test    Discrep        95 % CI         p-val 2t    p-val 1t    Abnormal 2d    Abnormal 1d 
#> ------  ---------  ------------------  ----------  ----------  -------------  -------------
#>   VC      25.50     19.95 to  31.05      <1e-04      <1e-04        0.26           0.13     
#>   PR      14.50      8.57 to  20.43      <1e-04      <1e-04        7.45           3.72     
#>   WM     -15.50     -21.78 to  -9.22     <1e-04      <1e-04        5.24           2.62     
#>   PS     -24.50     -32.03 to -16.97     <1e-04      <1e-04        1.26           0.63     
#> 
#> NUMBER of case's deviation scores that meet criterion for abnormality = 2
#> 
#> PERCENTAGE of normal population expected to exhibit this number or more of abnormally low scores = 4.39%