Statalist


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

R: st: R: Estimating the probability of censoring


From   "Carlo Lazzaro" <carlo.lazzaro@tin.it>
To   <statalist@hsphsun2.harvard.edu>
Subject   R: st: R: Estimating the probability of censoring
Date   Thu, 25 Sep 2008 20:15:48 +0200

Dear Michael,
I have followed step-by-step your codes and, as you are surely already aware
of, p_cens can exceed 2.0 and this raises some concerns.
I am not sure whether the following may be a good hypothesis but typing 

 gen p_cens = exp(coeff_cens)

I find no way to constrain p_cens within the 0-1 range.

I do hope this second try will sound a little bit less obvious than the
first one. 

Kind Regards,

Carlo

tabulate  p_cens

     p_cens |      Freq.     Percent        Cum.
------------+-----------------------------------
   .8290267 |          2        4.17        4.17
   .8444218 |          1        2.08        6.25
   .8601028 |          1        2.08        8.33
   .8923438 |          1        2.08       10.42
   .9257933 |          1        2.08       12.50
   .9429854 |          2        4.17       16.67
   .9604967 |          1        2.08       18.75
   .9783332 |          1        2.08       20.83
    .996501 |          1        2.08       22.92
   1.033855 |          2        4.17       27.08
   1.072609 |          1        2.08       29.17
    1.16299 |          1        2.08       31.25
   1.206585 |          1        2.08       33.33
   1.228992 |          2        4.17       37.50
    1.27506 |          1        2.08       39.58
   1.347422 |          1        2.08       41.67
   1.372443 |          1        2.08       43.75
   1.423889 |          2        4.17       47.92
   1.504697 |          1        2.08       50.00
   1.532639 |          1        2.08       52.08
   1.619618 |          1        2.08       54.17
    1.68033 |          2        4.17       58.33
   1.724076 |          3        6.25       64.58
   1.756093 |          1        2.08       66.67
   1.788703 |          1        2.08       68.75
    1.82192 |          3        6.25       75.00
   1.925316 |          1        2.08       77.08
   1.961069 |          2        4.17       81.25
   1.997486 |          1        2.08       83.33
    2.03458 |          2        4.17       87.50
   2.072362 |          1        2.08       89.58
   2.150045 |          1        2.08       91.67
   2.189971 |          1        2.08       93.75
   2.230639 |          1        2.08       95.83
   2.314255 |          1        2.08       97.92
   2.401005 |          1        2.08      100.00
------------+-----------------------------------
      Total |         48      100.00
-----Messaggio originale-----
Da: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di Michael McCulloch
Inviato: giovedý 25 settembre 2008 19.29
A: statalist@hsphsun2.harvard.edu
Oggetto: Re: st: R: Estimating the probability of censoring

>at a very first glance, what hits the eyes is the adjusted probability of
>being censoring sometimes above the usual upper constraint. How can it be?
I
>should have missed something in your assumptions.

Yes, that's one of my main questions. Since I 
used the Stata-supplied cancer.dta file and 
provided all my methods, I'm hoping that someone 
on Statalist might have advice on how to correct 
the method for unadjusted estimation of censoring 
probability.



>
>Kind Regards,
>Carlo
>
>
>-----Messaggio originale-----
>Da: owner-statalist@hsphsun2.harvard.edu
>[mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di Michael
McCulloch
>Inviato: giovedý 25 settembre 2008 17.56
>A: Statalist
>Oggetto: st: Estimating the probability of censoring
>
>Hello,
>I'm seeking guidance on a series of commands I've written to estimate
>the probability of being censored. Might anyone be able to offer
>commentary as to whether I've done this correctly?  The resulting
>unadjusted probability of censoring ranges from 0-1, while the
>adjusted probability goes above 1.
>
>sysuse cancer.dta, clear
>gen id = _n				//  generate individual IDs
>stset studytime, failure(died==0)		//  note that total
>person-time is 744
>*estimate the unadjusted probability of censoring
>sts gen cens = s
>*estimate the adjusted probability of censoring
>stcox drug age, nohr
>predict coeff_cens, xb			// predicts linear
>coefficients of censoring
>gen p_cens = exp(coeff_cens)		// adjusted probability of
>time-to-censoring
>*lists the results
>list id drug age died cens p_cens in 40/48, clean noobs
>
>40	3	50	0	.58476475	.8601028
>41	3	55	1	.58476475	.9429854
>42	3	57	1	.51166915	.9783332
>43	3	48	0	.51166915	.8290267
>44	3	56	0	.34111277	.9604967
>45	3	60	1	.34111277	1.033855
>46	3	62	0	.22740851	1.072609
>47	3	48	0	.11370426	.8290267
>48	3	52	0	0	.8923438
>
>--
>
>Best wishes,
>Michael McCulloch
>
>
>
>Pine Street Foundation
>124 Pine St., San Anselmo, CA 94960-2674
>Tel:	(415) 407-1357
>Fax:	(415) 485-1065
>mcculloch@pinestreetfoundation.org
>www.pinestreetfoundation.org
>*
>*   For searches and help try:
>*   http://www.stata.com/help.cgi?search
>*   http://www.stata.com/support/statalist/faq
>*   http://www.ats.ucla.edu/stat/stata/
>
>
>
>*
>*   For searches and help try:
>*   http://www.stata.com/help.cgi?search
>*   http://www.stata.com/support/statalist/faq
>*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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