VII. Applications: sciences, economics and optimization

53. Psychometrics

Psychometric computations for interpreting test results (after the textbook "Clinical psychometrics – from a number to an interpretation") are in the "Statistics and psychometrics" form – the "Applications" section of the home screen, the Psychology field. Pick the task, the scale and what is sought and fill in the measured values; the scale prefills the norm's mean and standard deviation (IQ 100; 15, T 50; 10, scaled 10; 3, z 0; 1, sten 5.5; 2, stanin 5; 2), "Custom" lets you enter another test's norm. The "?" icon explains where the formula comes from.

Help right in the app: the "?" icon of each task in the form explains what it computes and where the formula comes from. The result shows the steps one by one, and the technical terms in them (Cohen's kappa, the ROC curve, the confidence interval, the p-value, the percentile, the true score, the predictive values …) are underlined with dots – a tap on a term shows its short explanation in plain words, often with an example. The notes at the end of the steps say how to interpret the result and what to watch out for.

Converting standard scores: z = (X − M)/SD and from it T, IQ, the scaled score, sten and stanin (rounded to a whole number within the scale) and the percentile. Score and percentile: the percentile rank PR = 100·Φ(z) assuming the normal distribution, and back the score of a given percentile.

The standard error of measurement SEM = SD·√(1 − r) from the reliability r. The confidence interval around the observed score X ± z·SEM at 80, 90, 95 or 99 % (z = 1.28; 1.645; 1.96; 2.576). The estimated true score T′ = M + r(X − M) – regression to the mean – with the interval around T′ and the standard error of estimation SEE = SD·√(r(1 − r)).

The significance of a difference of two scores of one scale (WAIS indexes, say): the standard error of the difference SE_diff = SD·√(2 − r₁₁ − r₂₂) and the critical difference z·SE_diff. A test's predictive values by Bayes' theorem: PPV and NPV from the sensitivity, specificity and prevalence – or from a 2×2 table (true and false positives and negatives), optionally with the prevalence of the population the test is used in – with the likelihood ratios LR⁺ and LR⁻.

The Spearman–Brown formula (in the same form) gives the reliability of a test lengthened k times, r′ = k·r / (1 + (k − 1)·r), or the other way round how many times to lengthen a test for a target reliability – given the current number of items, also the items needed. Bonferroni's correction gives the stricter level α′ = α/m for m comparisons, with the probability of a false significant result without a correction and Šidák's correction.

Reliability and agreement from measured data come from the chips of data(…) or of the grid's “As data” (pasted from Excel, a CSV file): Cronbach's alpha – items in columns, respondents in rows – with an item analysis (the item's correlation with the rest of the test, alpha if the item is deleted); the ICC – raters in columns, subjects in rows – all six forms by Shrout and Fleiss from an analysis-of-variance table; Cohen's kappa from two columns of ratings (categories as numbers) or from a square agreement table; the ROC curve and AUC from a column of scores and a column of the state 0/1 (1 = the condition) by the Mann–Whitney U, with the cut-off by Youden's index and a graph of the ROC curve. Alpha, the ICC, kappa and the AUC come with a confidence interval (90, 95 or 99 % by a chip): alpha by Feldt, the ICC from the F distribution, kappa from the asymptotic standard error, the AUC by Hanley and McNeil. For ordered categories kappa is computed with linear or quadratic weights too. The ROC curve can also come from two columns of two groups' scores (the first positive, of any lengths), with the Mann–Whitney test added to the AUC. Three columns – two tests' scores and the state – are compared by DeLong's test, both curves in one graph.

The steps end with an interpretive note: percentiles are ordinal (not added or averaged), converting to a percentile holds only for a normally distributed score, a significant difference isn't necessarily unusual (the discrepancy's base rate), the predictive values depend on the prevalence. The graph shows the normal curve with the score, the interval or the critical region marked.

Examples

IQ 85 in all scales: z = −1, T = 40, scaled score 7.
Input: model(scores; find=all[one]; X=85[one]; M=100[one]; SD=15[one]; scale=iq)
model(scores; find=all[one]; X=85[one]; M=100[one]; SD=15[one]; scale=iq)
model(scores; find=all[one]; X=85[one]; M=100[one]; SD=15[one]; scale=iq)model(scores; find=all[one]; X=85[one]; M=100[one]; SD=15[one]; scale=iq)
IQ 130 is the 98th percentile.
Input: model(percentile; find=PR[one]; X=130[one]; M=100[one]; SD=15[one]; scale=iq)
model(percentile; find=PR[one]; X=130[one]; M=100[one]; SD=15[one]; scale=iq)
model(percentile; find=PR[one]; X=130[one]; M=100[one]; SD=15[one]; scale=iq)model(percentile; find=PR[one]; X=130[one]; M=100[one]; SD=15[one]; scale=iq)
The T-score of the 16th percentile.
Input: model(percentile; find=X[one]; PR=16[pct]; M=50[one]; SD=10[one]; scale=t)
model(percentile; find=X[one]; PR=16[pct]; M=50[one]; SD=10[one]; scale=t)
model(percentile; find=X[one]; PR=16[pct]; M=50[one]; SD=10[one]; scale=t)model(percentile; find=X[one]; PR=16[pct]; M=50[one]; SD=10[one]; scale=t)
The standard error of measurement of a test with reliability 0.97.
Input: model(sem; find=SEM[one]; SD=15[one]; r=0.97[one]; scale=iq)
model(sem; find=SEM[one]; SD=15[one]; r=0.97[one]; scale=iq)
The 95% confidence interval around IQ 95.
Input: model(interval; find=CI[one]; X=95[one]; SD=15[one]; r=0.97[one]; scale=iq; level=95)
model(interval; find=CI[one]; X=95[one]; SD=15[one]; r=0.97[one]; scale=iq; level=95)
model(interval; find=CI[one]; X=95[one]; SD=15[one]; r=0.97[one]; scale=iq; level=95)model(interval; find=CI[one]; X=95[one]; SD=15[one]; r=0.97[one]; scale=iq; level=95)
The estimated true score of IQ 74 with reliability 0.92.
Input: model(truescore; find=T[one]; X=74[one]; M=100[one]; SD=15[one]; r=0.92[one]; scale=iq; level=95)
model(truescore; find=T[one]; X=74[one]; M=100[one]; SD=15[one]; r=0.92[one]; scale=iq; level=95)
model(truescore; find=T[one]; X=74[one]; M=100[one]; SD=15[one]; r=0.92[one]; scale=iq; level=95)model(truescore; find=T[one]; X=74[one]; M=100[one]; SD=15[one]; r=0.92[one]; scale=iq; level=95)
Two indexes 112 and 97 – is the difference significant?
Input: model(difference; find=D[one]; X1=112[one]; X2=97[one]; SD=15[one]; r1=0.95[one]; r2=0.90[one]; scale=iq; level=95)
model(difference; find=D[one]; X1=112[one]; X2=97[one]; SD=15[one]; r1=0.95[one]; r2=0.90[one]; scale=iq; level=95)
model(difference; find=D[one]; X1=112[one]; X2=97[one]; SD=15[one]; r1=0.95[one]; r2=0.90[one]; scale=iq; level=95)model(difference; find=D[one]; X1=112[one]; X2=97[one]; SD=15[one]; r1=0.95[one]; r2=0.90[one]; scale=iq; level=95)
A screening with sensitivity 92.5 % and specificity 74.6 % at a prevalence of 2 %.
Input: model(predictive; find=values[one]; sens=92.5[pct]; spec=74.6[pct]; p=2[pct]; input=rates)
model(predictive; find=values[one]; sens=92.5[pct]; spec=74.6[pct]; p=2[pct]; input=rates)
model(predictive; find=values[one]; sens=92.5[pct]; spec=74.6[pct]; p=2[pct]; input=rates)model(predictive; find=values[one]; sens=92.5[pct]; spec=74.6[pct]; p=2[pct]; input=rates)
The predictive values from a 2×2 table.
Input: model(predictive; find=values[one]; TP=37[one]; FP=10[one]; FN=3[one]; TN=50[one]; input=table)
model(predictive; find=values[one]; TP=37[one]; FP=10[one]; FN=3[one]; TN=50[one]; input=table)
model(predictive; find=values[one]; TP=37[one]; FP=10[one]; FN=3[one]; TN=50[one]; input=table)model(predictive; find=values[one]; TP=37[one]; FP=10[one]; FN=3[one]; TN=50[one]; input=table)
Internal consistency of a four-item questionnaire.
Input: data(P1 P2 P3 P4; 3 4 3 5; 2 2 3 2; 4 5 4 4; 5 4 5 5; 1 2 2 1; 3 3 4 3) Cronbach's alpha
data(P1 P2 P3 P4; 3 4 3 5; 2 2 3 2; 4 5 4 4; 5 4 5 5; 1 2 2 1; 3 3 4 3)
data(P1 P2 P3 P4; 3 4 3 5; 2 2 3 2; 4 5 4 4; 5 4 5 5; 1 2 2 1; 3 3 4 3)data(P1 P2 P3 P4; 3 4 3 5; 2 2 3 2; 4 5 4 4; 5 4 5 5; 1 2 2 1; 3 3 4 3)
Agreement of four raters on six subjects (Shrout and Fleiss's example).
Input: data(H1 H2 H3 H4; 9 2 5 8; 6 1 3 2; 8 4 6 8; 7 1 2 6; 10 5 6 9; 6 2 4 7) ICC (inter-rater reliability)
data(H1 H2 H3 H4; 9 2 5 8; 6 1 3 2; 8 4 6 8; 7 1 2 6; 10 5 6 9; 6 2 4 7)
data(H1 H2 H3 H4; 9 2 5 8; 6 1 3 2; 8 4 6 8; 7 1 2 6; 10 5 6 9; 6 2 4 7)data(H1 H2 H3 H4; 9 2 5 8; 6 1 3 2; 8 4 6 8; 7 1 2 6; 10 5 6 9; 6 2 4 7)
Agreement of two doctors in three diagnostic categories.
Input: data(A B; 1 1; 1 1; 2 2; 1 2; 2 2; 3 3; 1 1; 2 3; 3 3; 2 2; 1 1; 3 2) Cohen's kappa
data(A B; 1 1; 1 1; 2 2; 1 2; 2 2; 3 3; 1 1; 2 3; 3 3; 2 2; 1 1; 3 2)
data(A B; 1 1; 1 1; 2 2; 1 2; 2 2; 3 3; 1 1; 2 3; 3 3; 2 2; 1 1; 3 2)data(A B; 1 1; 1 1; 2 2; 1 2; 2 2; 3 3; 1 1; 2 3; 3 3; 2 2; 1 1; 3 2)
The same diagnoses with quadratic weights – neighbouring categories count as partial agreement.
Input: data(A B; 1 1; 1 1; 2 2; 1 2; 2 2; 3 3; 1 1; 2 3; 3 3; 2 2; 1 1; 3 2) Cohen's kappa, Quadratic weights
data(A B; 1 1; 1 1; 2 2; 1 2; 2 2; 3 3; 1 1; 2 3; 3 3; 2 2; 1 1; 3 2)
data(A B; 1 1; 1 1; 2 2; 1 2; 2 2; 3 3; 1 1; 2 3; 3 3; 2 2; 1 1; 3 2)data(A B; 1 1; 1 1; 2 2; 1 2; 2 2; 3 3; 1 1; 2 3; 3 3; 2 2; 1 1; 3 2)
Cohen's kappa from a 2×2 agreement table.
Input: data(20 5; 10 15) Cohen's kappa
data(20 5; 10 15)
data(20 5; 10 15)data(20 5; 10 15)
How well a test score separates patients (state 1) from healthy people (state 0).
Input: data(12 0; 15 1; 9 0; 20 1; 18 1; 11 0; 7 0; 14 1; 16 0; 10 0) ROC curve and AUC
data(12 0; 15 1; 9 0; 20 1; 18 1; 11 0; 7 0; 14 1; 16 0; 10 0)
data(12 0; 15 1; 9 0; 20 1; 18 1; 11 0; 7 0; 14 1; 16 0; 10 0)data(12 0; 15 1; 9 0; 20 1; 18 1; 11 0; 7 0; 14 1; 16 0; 10 0)
Scores of patients and healthy people in two groups of different sizes, with the Mann–Whitney test.
Input: data(pacienti = 15 20 18 14 17; zdravi = 12 9 11 7 16 10 13) ROC curve and AUC
data(pacienti = 15 20 18 14 17; zdravi = 12 9 11 7 16 10 13)
data(pacienti = 15 20 18 14 17; zdravi = 12 9 11 7 16 10 13)data(pacienti = 15 20 18 14 17; zdravi = 12 9 11 7 16 10 13)
Two tests on the same people – do they discriminate equally well? (DeLong's test)
Input: data(A B stav; 12 10 0; 15 14 1; 9 11 0; 20 13 1; 18 19 1; 11 9 0; 7 12 0; 14 16 1; 16 8 0; 10 13 0) ROC curve and AUC
data(A B stav; 12 10 0; 15 14 1; 9 11 0; 20 13 1; 18 19 1; 11 9 0; 7 12 0; 14 16 1; 16 8 0; 10 13 0)
data(A B stav; 12 10 0; 15 14 1; 9 11 0; 20 13 1; 18 19 1; 11 9 0; 7 12 0; 14 16 1; 16 8 0; 10 13 0)data(A B stav; 12 10 0; 15 14 1; 9 11 0; 20 13 1; 18 19 1; 11 9 0; 7 12 0; 14 16 1; 16 8 0; 10 13 0)
How much to lengthen a 20-item test with reliability 0.7 to reach 0.9.
Input: model(spearmanbrown; find=k[one]; r=0.7[one]; rt=0.9[one]; items=20[one])
model(spearmanbrown; find=k[one]; r=0.7[one]; rt=0.9[one]; items=20[one])
The corrected level for 10 comparisons.
Input: model(bonferroni; find=alpha[one]; alpha=0.05[one]; m=10[one])
model(bonferroni; find=alpha[one]; alpha=0.05[one]; m=10[one])

Known limitations