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

st: stsplit and cumulative dose


From   Michael Hills <[email protected]>
To   Statalist <[email protected]>
Subject   st: stsplit and cumulative dose
Date   22 Apr 2004 12:33:31 +0100

Using stlexis (stata 5) I used to be able to split follow-up time
according to cumulative dose (x) of some exposure.

For example, I could convert these three records

 id   timein   timeout   xin   xout   fail 
-------------------------------------------
  1        0         5     0     40      0 
  1        5        10    40    180      0 
  1       10        15   180    220      1 

into these five records

    id   timein   timeout   fail   exp_grp  
     1    0.000     5.000     0     0-100
     1    5.000     7.143     0     0-100 
     1    7.143    10.000     0   100-200
     1   10.000    12.500     0   100-200
     1   12.500    15.000     1   200-300

making the assumption of a linear increase in cumulative dose between
readings.

Somewhere along the line the contributed command stlexis was replaced by
the official command stsplit, but I can't figure out how to do this with
stsplit. Even worse, I can't figure out how to do it at all without
going back to stlexis.

Of course there is nothing wrong with going back to earlier programs,
but stlexis relies on the Stata 5 version of stset which is very
different from the Stata 8 version, so going back involves more hassle
than simply running the program.

Any suggestions for doing this in Stata 8?

Michael Hills



*
*   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