Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st:


From   jpitblado@stata.com (Jeff Pitblado, StataCorp LP)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st:
Date   Tue, 22 May 2007 14:30:30 -0500

Steinar Fossedal <Steinar.Fossedal@nhh.no> is getting a error while using
-sts graph, hazard-.

Steichen, Thomas J. <SteichT@rjrt.com> checked Steiner's example but did not
get an error.

> I am experiencing problems obtaining a Kaplan-Meier estimate of the
> hazard function. Using -sts graph, haz- returns an error "Variable __ub
> not found" r(111). The error does not, however, appear when requesting
> the surivival function of the same data. I can reproduce the error using
> the leukemia data from stata-press (see printout below), even after a
> complete reinstall of Stata 9. How complete it actually was is hard to
> tell, my settings were still identical to what they were prior to the
> reinstall even though I renamed the old "C:\Program Files\Stata9-folder"
> to Stata9_old. Where else does Stata store information?

The example was:

> . use http://www.stata-press.com/data/r8/leukemia, clear
>   (output omitted)
>
> . stset weeks, failure(relapse)
>   (output omitted)
>
> . sts graph, haz
>
>          failure _d:  relapse
>    analysis time _t:  weeks
> variable __ub not found
> r(111);

Steiner found a problem in the ado-file for -sts graph, hazard-.  The above
error is caused by turning off variable abbreviations in Stata (see -help
set_varabbrev-).  The reference to '__ub' is in fact an abbreviation of
'__ub1'.

A fix to -sts graph- will be available in a future ado-file update.

In the mean time, Steiner can turn variable abbreviations back on to get
around this problem.

> Until now I have been using -sts gen haz=h- instead, but today, by a one
> time fluke, stata suddenly returned different results compared to
> earlier. I would normally be willing to write this off as some fault on
> my part had it not been for the disturbing fact that the fluke-results
> were a lot more in sync with the predictions from my models. The results
> are, however, not reproducable in the same session even after doing no
> changes to the dataset.
>
> I am now wondering if the two problems are somehow related, and fear
> there is something wrong with the hazard-estimates I have been
> recieving. Can someone confirm the problem, or suggest a way to handle
> it?

We are confident that -sts generate- is computing the hazard-estimates
correctly.  The variable abbreviations setting does not affect the results
from -sts generate-.

--Jeff
jpitblado@stata.com
*
*   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