ci_score.Rd
Calculates the confidence interval around an observed test score, adjusting for test reliability. Returns the confidence interval in raw score units, z-scores, and percentiles.
ci_score(x, rtt, m, s, ci)
Numeric value representing the observed test score.
Numeric value between 0 and 1 indicating the reliability coefficient of the test (e.g., test-retest reliability).
Numeric value representing the mean of the test scores in the population.
Numeric value representing the standard deviation of the test scores in the population.
Numeric value between 0 and 1 indicating the desired confidence level (e.g., 0.95 for a 95% confidence interval).
A list containing the following components:
scale
A named numeric vector with the confidence interval in raw score units:
lower
: Lower bound of the confidence interval.
x
: The observed test score.
upper
: Upper bound of the confidence interval.
range
: Width of the confidence interval.
z
A named numeric vector with the confidence interval in z-score units:
lower
: Lower bound in z-scores.
x
: Observed score in z-scores.
upper
: Upper bound in z-scores.
range
: Width of the confidence interval in z-scores.
percentile
A named numeric vector with the confidence interval in percentiles:
lower
: Lower percentile.
x
: Percentile rank of the observed score.
upper
: Upper percentile.
range
: Width of the confidence interval in percentiles.
parameters
A named numeric vector with additional parameters:
se
: Standard error of measurement adjusted for reliability.
ci
: Confidence level used.
z
: Z-score multiplier corresponding to the confidence level.
The standard error (se
) is calculated using the formula:
$$se = s \times \sqrt{1 - rtt}$$ where s
is the standard deviation
and rtt
is the reliability coefficient.
The confidence interval is computed using the normal distribution quantile corresponding to the specified confidence level.
# Calculate a 95% confidence interval for an observed score of 100
ci_score(x = 100, rtt = 0.9, m = 100, s = 15, ci = 0.95)
#> $scale
#> lower x upper range
#> 90.70 100.00 109.30 18.59
#>
#> $z
#> lower x upper range
#> -0.62 0.00 0.62 1.24
#>
#> $percentile
#> lower x upper range
#> 26.8 50.0 73.2 46.5
#>
#> $parameters
#> se ci z
#> 4.743 0.950 1.960
#>