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

st: RE: Area under the curve trouble with aucdist


From   Joseph.Wagner2@med.va.gov
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: Area under the curve trouble with aucdist
Date   Wed, 25 Sep 2002 06:52:11 -0500

I tried pkexamine but got numerous error messages:

Warning: the point (0, 0) is not in your data.  It will be added.

This was my program, I have 876 patients in the dataset.  The only way I
could get the program to give me an AUC for each patient was to create a
little extra programming:

by id: pkexamine time conc, trapezoid
generate auc = r(auc)

sort id
qui by id: gen bign=_N

pkexamine time conc if idd1==1 & bign>2, trapezoid
generate auc = r(auc) if  & bign>2
foreach var of varlist idd2-idd876{
	pkexamine time conc if `var'==1 & bign>2, trapezoid
	replace auc = r(auc) if `var'==1 & bign>2
}

Do I need to have -time- initialize at 0?  The variable is in STATA date
format.  If it needs to start at 0 I could simply subtract the value for the
first -time- from the subsequent observations for each patient.  Please let
me know.




  Date: Tue, 24 Sep 2002 14:26:45 -0400
   From: "Steichen, Thomas" <STEICHT@rjrt.com>
Subject: st: RE: Area under the curve trouble with aucdist

You might try -pkexamine-, Stata's built-in program
for such data.

Tom

> -----Original Message-----
> From: Joseph.Wagner2@med.va.gov [mailto:Joseph.Wagner2@med.va.gov] 
> Sent: Tuesday, September 24, 2002 2:05 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Area under the curve trouble with aucdist
> 
> 
> 
> I need to calculate the area under the curve (viral load over 
> time) for
> about 1000 study participants using the trapezoidal rule.  I have used
> aucdist but I am not getting a result and am not sure if I'm 
> getting an
> error message.
> 
> id = patient id
> time =  time of viral load test
> conc = viral load value
> 
> aucdist   id   time   conc,   t  generate(auc)
> 
> (t specifies that the integral be computed using the simple 
> trapezoidal
> rule, and generate(auc) specifies to create a new variable 
> with the AUC (C
> max, T max, log conc 0 -inf.))
> 
> but all I'm getting is  (2000) in return which is supposed to 
> mean that I
> have no observations on which to perform the statistical operation.
> 
> I have 9500 observations with multiple observations per 
> patient, there are
> no missing data.  Any suggestions as to what I may be doing wrong?

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index