Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: a bug in the new command kapci?


From   Jose Maria Pacheco de Souza <[email protected]>
To   [email protected]
Subject   st: a bug in the new command kapci?
Date   Fri, 01 Oct 2004 19:39:30 -0300

Dear David and Statalisters:

The new commands of confidence interval for kappa is welcome.
But it seems to have a bug. I compared the results on page 1519 of the article (kappa=.81, ci= .67-.92, and ci= .70-.92) executing the commands

. kap var1 var2

Expected
Agreement Agreement Kappa Std. Err. Z Prob>Z
-----------------------------------------------------------------
90.68% 51.29% 0.8086 0.0920 8.79 0.0000

. kapci var1 var2

Expected Observed -- Binomial Exact --
Agreement Agreement [95% Conf. Interval]
--------------------------------------------
51.29% 90.68% 83.93% 95.25%

Kappa [95% Conf. Interval] Z Prob>Z
-------------------------------------------------
0.8086 0.3400 0.8914 8.79 0.0000

Clearly the result 0.3400 for the lower limit is not correct.

In the ado file for kapci it is missing -(1/3)*`y2' in the equation for -lb-; adding it, I got the correct result:

kapci var1 var2

Expected Observed -- Binomial Exact --
Agreement Agreement [95% Conf. Interval]
--------------------------------------------
51.29% 90.68% 83.93% 95.25%

Kappa [95% Conf. Interval] Z Prob>Z
-------------------------------------------------
0.8086 0.6735 0.8914 8.79 0.0000

I did not checked the .ado for kappaci.
Greetings,
Jose Maria


--
Jose Maria Pacheco de Souza, Professor Titular
Departamento de Epidemiologia/Faculdade de Saude Publica, USP
Av. Dr. Arnaldo, 715
01246-904 - S. Paulo/SP - Brasil
fones (11)3082-3886; (11)3066-7724; (11)3768-8612; (11)3714-2403
fax (11)3082-2920; (11)3714-2403
www.fsp.usp.br/~jmpsouza
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index