Statalist The Stata Listserver


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

st: RE: person-period data using prsnperd command


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: person-period data using prsnperd command
Date   Tue, 21 Nov 2006 15:27:10 -0000

The FAQ advises 

"Say what command(s) you are using. If they are not part of official 
Stata, say where they come from: the STB/SJ, SSC, or other archives."

In this case, some detective work reveals that -prsnperd- is 
a user-written command by Alexis Dinno, at the Harvard School 
of Public Health when the program was written. I do not know 
whether Alexis is a member of Statalist, but in any event the 
program author will be the best source of support given 
problems. It is possible, naturally, that somebody else has
used the program and/or is prepared to look at the code and 
so will be able to comment, more usefully than to point out 
that a spelling mistake is embedded in the code, which is 
all I can identify from reading this. 

Nick 
[email protected] 

Jinseok Kim

> I created a person-period data set using prsnperd command to conduct a
> discrete time hazard model and found a potential error in the data set
> created. Here's the syntax I used:
>  
> . prsnperd childid minccage1 censored, t(72)
> No variation in event occurence for period 22!
> No variation in event occurence for period 32!
> No variation in event occurence for period 66!
> No variation in event occurence for period 68!
> No variation in event occurence for period 72!
>  
> If I understand correctly, _period variable created by prsnperd should
> have values ranging from 1 to 72 because minccage1, my length-to-event
> variable in the model, has a maximum value of 72. And here's what I
> found strange:
>  
> . tab _period if _period>72&_period<100, miss
>  
>     _period |      Freq.     Percent        Cum.
> ------------+-----------------------------------
>          73 |         12        3.86        3.86
>          74 |         12        3.86        7.72
>          75 |         12        3.86       11.58
>          76 |         12        3.86       15.43
>          77 |         12        3.86       19.29
>          78 |         12        3.86       23.15
>          79 |         12        3.86       27.01
>          80 |         12        3.86       30.87
>          81 |         12        3.86       34.73
>          82 |         12        3.86       38.59
> 
> *** I intentionally cut here to save the space...*******
>  
>          94 |         11        3.54       82.32
>          95 |         11        3.54       85.85
>          96 |         11        3.54       89.39
>          97 |         11        3.54       92.93
>          98 |         11        3.54       96.46
>          99 |         11        3.54      100.00
> ------------+-----------------------------------
>       Total |        311      100.00
>  
> . tab _period if _period>1000, miss
>  
>     _period |      Freq.     Percent        Cum.
> ------------+-----------------------------------
>        1001 |          1        0.20        0.20
>        1002 |          1        0.20        0.40
>        1003 |          1        0.20        0.60
>        1004 |          1        0.20        0.81
>        1005 |          1        0.20        1.01
>        1006 |          1        0.20        1.21
>        1007 |          1        0.20        1.41
>        1008 |          1        0.20        1.61
>        1009 |          1        0.20        1.81
>        1010 |          1        0.20        2.02
>        1011 |          1        0.20        2.22
>        1012 |          1        0.20        2.42
> 
> I like to hear from you all regarding whether I missed something while
> I use it, or it is a known glitch. Thanks.

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