Statalist The Stata Listserver


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

st: stsplit


From   "Lucy Shum" <[email protected]>
To   <[email protected]>
Subject   st: stsplit
Date   Wed, 17 Jan 2007 14:15:52 +1100

Hi,

I've got a dataset with multiple records per animal, multiple events per
record.

Here it is:

list 

     +----------------------------------------------------------+
     | id   xmast   mast   censor   dim   dimm1   dimm2   dimm3 |
     |----------------------------------------------------------|
  1. |  1       0      0        0           280       0          0
0 |
  2. |  1       3      1        0           300     150        170
250 |
  3. |  1       1      1        1           290     200         0
0 |
  4. |  2       1      1        0           450     100         0
0 |
  5. |  4       1      1        0           300     135         0
0 |
     |----------------------------------------------------------|
  6. |  4       2      1        0           210     200        208         0
|
  7. |  5       3      1        0           350      31         50
200 |
  8. |  5       2      1        0           324     280        300         0
|
  9. |  5       0      0        1           299       0          0
0 |
     +----------------------------------------------------------+

I need to examine the data with "xmast" as a time-dependent covariate since
the hazard of culling should logically alter with every additional episode
of mastitis in cows. 

"dim" is the total number of days the cow is present in the milking herd.
"dimm1" is the day when the first disease event occurs, "dimm2" is the when
the second episode happens etc. Total episodes are defined by "xmast". 

I can't specify to Stata when to split the data because these are biological
data. Further, I already KNOW when each event occurs. But how do I put it
all together, hopefully, using -stsplit-  to split the records where
"xmast>1"  and the corresponding dimm1/2 or 3 will be recorded?

Help is very appreciated!!

Lucy

Lucy Shum
Bovine Resident
University of Sydney
University Veterinary Centre Camden
Tel: +61-2-46550777
Fax: +61-2-46551212

<<attachment: winmail.dat>>




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index