.-
help for ^diagt^, ^diagti^                         (STB-56: sbe36; STB-59: sbe36.1)
.-

Report summary statistics for diagnostic tests compared to true disease status
------------------------------------------------------------------------------

	^diagt^ diagvar testvar [weight] [^if^ exp] [^in^ range] [^,^ ^prev(^#^)^
                                  ^level(^#^)^ tabulate_options]

	^diagti^ #a #b #c #d, [^,^ ^prev(^#^)^ ^level(^#^)^ tabulate_options]

^fweight^s are allowed with ^diagt^; see help @weights@.


Description 
-----------

^diagt^ displays various summary statistics for a diagnostic test,
compared to patients' true disease status, sensitivity, specificity, 
and predictive values, from a 2x2 table. ^diagti^ is the immediate 
version. #a #b #c #d are, respectively, the numbers of true positives 
(diseased subjects with correct positive test results), false negatives 
(disease, but negative test), false positives (no disease, but positive 
test) and true negatives (no disease, negative test).

Sensitivity is the proportion of diseased patients correctly identified =
a/(a+b).  Specificity is the proportion of healthy patients correctly
identified = d/(c+d).  Positive predictive value (PPV) and negative predictive
value (NPV) are respectively the proportions of test positives and test
negatives that are correct = a/(a+c) and d/(b+d).

diagvar is the variable which contains the real status of the patient, and
testvar is the variable which identifies the result of the diagnostic test.
testvar and diagvar can have only two nonmissing values. The higher value
must identify the positive result of the test or the diseased status of the
patient.

Exact binomial confidence intervals are given, as with the command ^ci^.  


Options
-------

^prev(^#^)^ specifies the estimated prevalence, in percent, of the disease to
    be used in estimating the positive and negative predicted values based on
    Bayes' theorem.  If the ^prev^ option is used, the confidence interval is
    only displayed for the sensitivity and specificity.

                       Sensitivity x Prevalence
  PPV = -------------------------------------------------------------
         Sensitivity x Prevalence + (1-Sensitivity) x (1-Prevalence)


                       Specificity x (1-Prevalence)
  NPV = -------------------------------------------------------------
         Specificity x (1-Prevalence) + (1-Specificity) x Prevalence

    Otherwise the prevalence is estimated from the data.

^level(^#^)^ specifies the confidence level, in percent, for calculation of
    confidence intervals of the sensitivity, specificity, predictive values,
    and prevalence.  The default is ^level(95)^ or as set by ^set level^.


Examples
--------

	. ^diagt truediag test [fw=n]^
	. ^diagt truediag test, [fw=n] prev(25)^
	. ^diagt truediag test, [fw=n] level(99) chi^

	. ^diagti 80 17 11 44^


Author
------

	Paul T Seed       (Paul.Seed@@kcl.ac.uk)     
	Fetal Health Research Group, GKT School of Medicine, KCL
	North Wing, St Thomas' Hospital, Lambeth Palace Road, 
	London SE1 7EH

	Based on ^diagtest^ by Aurelio Tobias (STB-56: sbe36)
	Aurelio Tobias	
	Hospital de la Santa Creu i Sant Pau, 
	Barcelona, Spain.
	Email: atobias@@cocrane.es


Also see
--------

 Manual:  ^[R] tabulate, [R] lstat, [R] lsens, [R] lroc, [R] ci^
On-line:  help for @tabulate@, @lstat@, @lsens@, @lroc@, @ci@

