Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Problems with ml max Survival analysis


From   "Amparo Nagore Garcia" <[email protected]>
To   <[email protected]>
Subject   Re: st: Problems with ml max Survival analysis
Date   Fri, 08 Nov 2013 15:41:21 +0100

On Viernes 8 Noviembre 2013 14:51 CET, "Amparo Nagore Garcia" <[email protected]> wrote: 
 
> Dear Stephen, 
> 
> Thank you very much for your answer. My objective is to estimate a MPH model with two competing risks (recurrent) and correlated unobserved heterogeneity. Maybe the best option will be mass points for frailty. I have the code of a multistate model with 4 exits as a reference.
> My duration variable is continuous, data are multi-spell and there are time-varying covariates.
> However, as I am a beginner programming my own functions with Stata I have moved to the easiest model. So, now I am assuming each spell independent (as if multi-spells are not there), no time-varying variables, and less covariates. The distribution of the baseline would be an exponential with one constant.
> 
> As it may be modeled with standard commands I have compared the results from them with the results form my code, and it should be any mistake in my code or I am confused with what standard command is returning.Just below you can find the results and code for that with both options.
> 
> Again, any help is really appreciated. Thank you very much. 
> 
> ***Using standard command:
> *******Exponential model with constant, no time-varying covariates, not cluster. 
> streg  u_rate   male  h_skill m_skill non_manual  municipio spanish_speakers no_spanish_speaker Aged05_16_19  Aged05_20_24 Aged05_25_29 Aged05_30_34 Aged05_35_39 Aged05_40_44 Aged05_45_51 Aged05_older61 responsabilities if minusvalido==0, d(e) nohr difficult tech(nr) 
> 
> **************************************************************************
> *Results
>          failure _d:  f_s
>    analysis time _t:  (fecha_baja_def-origin)
>              origin:  time fecha_alta_def
>   exit on or before:  time .
> 
> Iteration 0:   log likelihood = -99556.633  
> Iteration 1:   log likelihood = -97671.107  
> Iteration 2:   log likelihood = -97554.267  
> Iteration 3:   log likelihood = -97553.745  
> Iteration 4:   log likelihood = -97553.745  
> 
> Exponential regression -- log relative-hazard form 
> 
> No. of subjects =        92241                     Number of obs   =     92241
> No. of failures =        35279
> Time at risk    =     13882868
>                                                    LR chi2(17)     =   4005.78
> Log likelihood  =   -97553.745                     Prob > chi2     =    0.0000
> 
> ------------------------------------------------------------------------------
>           _t |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
> -------------+----------------------------------------------------------------
>       u_rate |  -3.470225   .1540974   -22.52   0.000     -3.77225   -3.168199
>         male |   .1223463   .0125432     9.75   0.000     .0977621    .1469305
>      h_skill |   .1232418   .0148745     8.29   0.000     .0940882    .1523953
>      m_skill |  -.0622976    .013535    -4.60   0.000    -.0888258   -.0357694
>   non_manual |  -.0295926   .0123417    -2.40   0.016    -.0537818   -.0054034
>    municipio |  -.0982955   .0108838    -9.03   0.000    -.1196274   -.0769636
> spanish_sp~s |   .0313498   .0340245     0.92   0.357    -.0353369    .0980365
> no_spanish~r |   -.111788   .0268639    -4.16   0.000    -.1644403   -.0591357
> Aged05_16_19 |   .4164596   .0764584     5.45   0.000     .2666039    .5663152
> Aged05_20_24 |   .5386681   .0262935    20.49   0.000     .4871338    .5902024
> Aged05_25_29 |   .5426311   .0227125    23.89   0.000     .4981154    .5871468
> Aged05_30_34 |   .4748284   .0226967    20.92   0.000     .4303436    .5193132
> Aged05_35_39 |   .4650016   .0234231    19.85   0.000     .4190931      .51091
> Aged05_40_44 |    .564306   .0240364    23.48   0.000     .5171956    .6114165
> Aged05_45_51 |   .5439411   .0238558    22.80   0.000     .4971845    .5906977
> Aged0  .       .            .           .
> >         tp11 |     -.8875          .        .       .            .           .
> >         tp12 |       -.88          .        .       .            .           .
> >         tp13 |     -.8825          .        .       .            .           .
> >         tp14 |    -.89625          .        .       .            .           .
> >         tp15 |     -.9025          .        .       .            .           .
> >         tp16 |    -.89875          .        .       .            .           .
> >         tp17 |      -.915          .        .       .            .           .
> >         tp18 |       -.93          .        .       .            .           .
> >         tp19 |    -.92625          .        .       .            .           .
> >         tp20 |    -.93625          .        .       .            .           .
> >         tp21 |    -.96375          .        .       .            .           .
> >         tp22 |    -.92625          .        .       .            .           .
> >         tp23 |      -.925          .        .       .            .           .
> >         tp24 |     -.9475          .        .       .            .           .
> >         tp25 |    -.82375          .        .       .            .           .
> >         tp26 |      -1.12          .        .       .            .           .
> >         tp27 |   -1.00875          .        .       .            .           .
> >         tp28 |   -1.15375          .        .       .            .           .
> >       u_rate |   -.469875          .        .       .            .           .
> >         male |    .014625          .        .       .            .           .
> >      h_skill |     .01775          .        .       .            .           .
> >      m_skill |    .000375          .        .       .            .           .
> >   non_manual |      .0035          .        .       .            .           .
> >    municipio |     .00075          .        .       .            .           .
> > spanish_sp~s |    -.01375          .        .       .            .           .
> > no_spanish~r |    -.03125          .        .       .            .           .
> >   Aged_16_19 |    -.00875          .        .       .            .           .
> >   Aged_20_24 |       .026          .        .       .            .           .
> >   Aged_25_29 |        .04          .        .       .            .           .
> >   Aged_30_34 |       .041          .        .       .            .           .
> >   Aged_35_39 |     .04325          .        .       .            .           .
> >   Aged_40_44 |       .045          .        .       .            .           .
> >   Aged_45_51 |    .042875          .        .       .            .           .
> >      older61 |     -.0725          .        .       .            .           .
> > responsabi~s |    .015625          .        .       .            .           .
> > construction |     .02325          .        .       .            .           .
> >     industry |       .006          .        .       .            .           .
> >       size_0 |    -.00375          .        .       .            .           .
> >   size_10_19 |    .012125          .        .       .            .           .
> >   size_20_49 |      .0215          .        .       .            .           .
> >  size_50_249 |       .029          .        .       .            .           .
> >     size_250 |     .02475          .        .       .            .           .
> > discontinu~s |       .223          .        .       .            .           .
> >     fix_term |    .062625          .        .       .            .           .
> >      on_call |    .115625          .        .       .            .           .
> >   duration_1 |  -3.88e-06          .        .       .            .           .
> > coefte_num_1 |    .002375          .        .       .            .           .
> >    prest_emp |    -.08625          .        .       .            .           .
> > - ------------------------------------------------------------------------------
> > 
> > . 
> > end of do-file
> > 
> > 
> > 
> > Please access the attached hyperlink for an important electronic communications disclaimer: http://lse.ac.uk/emailDisclaimer
> > 
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/help.cgi?search
> > *   http://www.stata.com/support/faqs/resources/statalist-faq/
> > *   http://www.ats.ucla.edu/stat/stata/
> > 
>  
>  
>  
> -- 
> ==========================
> Amparo Nagore García
> Profesor Ayudante
> Departamento de Economia Aplicada
> Facultad de Economia
> Universidad de Valencia
> ====================== 
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
> 
 
 
 
-- 
==========================
Amparo Nagore García
Profesor Ayudante
Departamento de Economia Aplicada
Facultad de Economia
Universidad de Valencia
====================== 


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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index