Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: sensitivity and specificity after xtgee


From   "Seed, Paul" <paul.seed@kcl.ac.uk>
From   "Joseph Coveney" <jcoveney@bigplanet.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: Re: sensitivity and specificity after xtgee
Date   Mon, 17 Sep 2012 22:01:34 +0100
Date   Mon, 17 Sep 2012 14:33:51 +0900

Mohammadreza Mohebbi wrote:

Is there any post-estimation option after running xtgee/ xtlogit (for
binary longitudinal regression) for calculating
sensitivity, specificity, positive and negative predictive values,
positive and negative likelihood ratios and ROC curve?

I used xtgee to fit binary regression for wheez syndrome with 3
measurements (baseline, first year and second year follow-ups) with
PD20 as exposure and broadcat and smoker_current as covariates:

xtset h_id h_int_no
xtgee wheez_symp pd_20_base i.broadcat smoker_current ,
corr(exchangeable) fam(binom) link(log/logit) eform robust

- --------------------------------------------------------------------------------

The roc areas are easy: 

     predict pred1 if h_int_no == 1, mu
     roctab wheez_symp pred1 

And likewise for visits 2 and 3.


My user-written command -diagt- will calculate all the other
indicators he wants for a given yes/no test, with simple yes/no  :
He can install it in the usual way, starting with 
     findit diagt
It will also do a few other things, such as calcualte 
confidence intervals (assuming simple random samples at each time point, 
and estimate predictive values for different 
case mixes/disease prevalences.

However, he needs to decide 
what probability of an event he wants to consider 
as positive.  50% is a common default value; 
but in practice (clinical settings), I have found much lower values 
are important (e.g. 3%, 5%, 20%), depending on the 
relative costs associated with the tow kinds of errors 
(false positive and false negative decisions).

     gen test_pos1 = pred1 >= .2 if h_int_no == 1
     diagt wheez_symp test_pos1




Paul T Seed MSc CStat CSci, Senior Lecturer in Medical Statistics, 
King's College London, Division of Women's Health
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index