Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Syntax in SPSS for SE, SPE, PPV, NPV, A

857 views
Skip to first unread message

Chrys

unread,
Nov 17, 2007, 9:23:03 AM11/17/07
to
I would be grateful to any one who could provide me with instructions
or syntax on how to calculate sensitivity , specificity, PPV, NPV
values and 95% CI and accuracy of a test in SPSS.

Regards,

Chrys

Bruce Weaver

unread,
Nov 17, 2007, 10:15:33 AM11/17/07
to

I would arrange the data so that the 4 cell counts are on a single row
in variables called A-D. Plug the cell counts into the formulae for
each of those measures (using COMPUTE commands). Compute the standard
error for each using the usual formula for the SE of a binomial
proportion. Here is an example for sensitivity:

* Compute sensitivity and 95% CI.

compute #num = a. /* numerator .
compute #den = a+c. /* denominator .
compute sens = #num/#den.
compute #se = (#num*(#den-#num)/#den**3)**0.5.
compute llsens = sens - 1.96*#se.
compute ulsens = sens + 1.96*#se.
if (llsens < 0) llsens = 0.
if (ulsens > 1) ulsens = 1.
exe.

For computing the other measures, change the #num and #den variables as
needed.

--
Bruce Weaver
bwe...@lakeheadu.ca
www.angelfire.com/wv/bwhomedir
"When all else fails, RTFM."

David Winsemius

unread,
Nov 17, 2007, 10:31:48 AM11/17/07
to

(IANASPSSU) Whether you really need to program it may depend on whether you
have data on the test results at various threshholds for positivity. If you
do, thrn look on your Graph menu or in your graphics commands; you should
be able to find an ROC curve option.

This looks to point a potentially useful resource in your quest:
<http://www.uth.tmc.edu/gsbs/courses/Biostatistics/2006%20Materials/SPSS%20LAB%20MANUAL%20Section%203.doc>

For code rather than GUI-clicking try:
<http://pages.videotron.com/rlevesqu/Syntax/ROCcurves/ROCcurvesAndYoudenIndex.txt>

Another site says:
<http://www2.chass.ncsu.edu/garson/PA765/logistic.htm>
"In SPSS, select Analyze, Regression, Binary (or Multinomial); select the
dependent and covariates; click Save; check to save predicted values
(pre1); Continue; OK. Then select Graphs, ROC Curve; set pre1 as the test
variable; select standard error and confidence interval; OK. In the output,
c is labeled as "Area." It will vary from .5 to 1.0."

If all you have are results with a single cutpoint for positive negative, then
using SPSS would be the sledgehammer method. A piece of paper and calculator (or
slide rule) would be more efficient. It's not neurosurgery, now, is it?

<http://www.drexelmed.edu/documents/ped_neurosurgery/tests_talk.pdf>

--
David Winsemius

0 new messages