Statalist The Stata Listserver


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

st: Problem with stcompet with by variable


From   "Rachel Pearce" <[email protected]>
To   [email protected]
Subject   st: Problem with stcompet with by variable
Date   Thu, 3 Aug 2006 20:58:33 +0100

I have a problem with stcompet when I include a "by" variable; I get an error:

unrecognized command:  levels7
r(199);

This occurs even when I run the example compet_example.do:

--- begin included dialogue ---
. gen treat = _n>5000

. replace t25 = -1/.25 * log(1-uniform())
(10000 real changes made)

. replace t99 = -1/.495 * log(1-uniform()) in 5000/l
(5001 real changes made)

. replace time = min(t99,t25)
(6851 real changes made)

. replace fail = (t25<t99) + 2*(t25>=t99)
(6542 real changes made)

. replace fail = 0 if time>=2
(1567 real changes made)

. replace time = 2 if time>2
(1567 real changes made)

. stset time, f(fail==1) noshow

    failure event:  fail == 1
obs. time interval:  (0, time]
exit on or before:  failure

------------------------------------------------------------------------------
   10000  total obs.
       0  exclusions
------------------------------------------------------------------------------
   10000  obs. remaining, representing
    2160  failures in single record/single failure data
8983.392  total analysis time at risk, at risk from t =         0
                            earliest observed entry t =         0
                                 last observed exit t =         2


. stcompet Newci=ci,compet1(2) by(treat)
unrecognized command:  levels7
r(199);

--- end included dialogue ---

As you can see all previous commands in the do-file execute
successfully and correctly. I can find no reference in the
documentation to "levels7".

Does anyone know what might be the problem here?

I am running Stata9/SE 0.2 in Windows XP Home Edition SP2

Rachel Pearce
Statistician
British Society for Blood and Marrow Transplantation
*
*   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