*change name of path to read in fulldata.dat > infile pubid entry exit event p1 p2 p3 p4 per1234 using E:\GeneralGamma\fulldata.dat (2314 observations read) . stset exit, failure(event) enter(entry) failure event: event != 0 & event < . obs. time interval: (0, exit] enter on or after: time entry exit on or before: failure ------------------------------------------------------------------------------ 2314 total obs. 0 exclusions ------------------------------------------------------------------------------ 2314 obs. remaining, representing 1053 failures in single record/single failure data 4478.968 total analysis time at risk, at risk from t = 0 earliest observed entry t = 0 last observed exit t = 8.953 . streg if p1==1, distribution(gamma) failure _d: event analysis time _t: exit enter on or after: time entry Iteration 0: log likelihood = -1017.8641 Iteration 1: log likelihood = -837.9445 Iteration 2: log likelihood = -785.37992 Iteration 3: log likelihood = -783.87794 Iteration 4: log likelihood = -783.8584 Iteration 5: log likelihood = -783.8584 Gamma regression -- accelerated failure-time form No. of subjects = 633 Number of obs = 633 No. of failures = 388 Time at risk = 684.7939983 Wald chi2(0) = . Log likelihood = -783.8584 Prob > chi2 = . ------------------------------------------------------------------------------ _t | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | .6736712 .0716252 9.41 0.000 .5332885 .814054 -------------+---------------------------------------------------------------- /ln_sig | -.2572981 .0878631 -2.93 0.003 -.4295067 -.0850895 /kappa | 1.368894 .1890939 7.24 0.000 .9982769 1.739511 -------------+---------------------------------------------------------------- sigma | .7731377 .0679303 .6508301 .9184301 ------------------------------------------------------------------------------ *command fits a general gamma to period 1 data . streg if p2==1, distribution(gamma) failure _d: event analysis time _t: exit enter on or after: time entry Iteration 0: log likelihood = -1111.7605 Iteration 1: log likelihood = -1008.9503 Iteration 2: log likelihood = -816.54598 Iteration 3: log likelihood = -802.35401 Iteration 4: log likelihood = -802.16113 Iteration 5: log likelihood = -802.16107 Gamma regression -- accelerated failure-time form No. of subjects = 660 Number of obs = 660 No. of failures = 445 Time at risk = 911.5279998 Wald chi2(0) = . Log likelihood = -802.16107 Prob > chi2 = . ------------------------------------------------------------------------------ _t | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | .6492675 .0603397 10.76 0.000 .5310038 .7675313 -------------+---------------------------------------------------------------- /ln_sig | -.1655176 .0572386 -2.89 0.004 -.2777033 -.0533319 /kappa | .8509946 .1268085 6.71 0.000 .6024545 1.099535 -------------+---------------------------------------------------------------- sigma | .8474549 .0485072 .7575215 .9480653 ------------------------------------------------------------------------------ *command fits a general gamma to period 2 data . streg if p3==1, distribution(gamma) failure _d: event analysis time _t: exit enter on or after: time entry Iteration 0: log likelihood = -383.21433 (not concave) Iteration 1: log likelihood = -359.53351 (not concave) Iteration 2: log likelihood = -358.6222 Iteration 3: log likelihood = -358.51358 Iteration 4: log likelihood = -358.50988 Iteration 5: log likelihood = -358.50984 Gamma regression -- accelerated failure-time form No. of subjects = 472 Number of obs = 472 No. of failures = 109 Time at risk = 796.4830005 Wald chi2(0) = . Log likelihood = -358.50984 Prob > chi2 = . ------------------------------------------------------------------------------ _t | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 2.445641 .2472105 9.89 0.000 1.961117 2.930165 -------------+---------------------------------------------------------------- /ln_sig | .6972826 .4022331 1.73 0.083 -.0910797 1.485645 /kappa | .549044 .7010538 0.78 0.434 -.8249962 1.923084 -------------+---------------------------------------------------------------- sigma | 2.008288 .8077999 .9129449 4.417814 ------------------------------------------------------------------------------ *command fits a general gamma to period 3 data . streg if p4==1, distribution(gamma) failure _d: event analysis time _t: exit enter on or after: time entry Iteration 0: log likelihood = -310.37011 (not concave) Iteration 1: log likelihood = -307.33235 Iteration 2: log likelihood = -306.3483 (not concave) Iteration 3: log likelihood = -306.28785 Iteration 4: log likelihood = -306.23728 Iteration 5: log likelihood = -306.23648 Iteration 6: log likelihood = -306.23648 Gamma regression -- accelerated failure-time form No. of subjects = 549 Number of obs = 549 No. of failures = 111 Time at risk = 2086.163 Wald chi2(0) = . Log likelihood = -306.23648 Prob > chi2 = . ------------------------------------------------------------------------------ _t | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _cons | 3.070996 .4908355 6.26 0.000 2.108976 4.033016 -------------+---------------------------------------------------------------- /ln_sig | .3195047 .7679685 0.42 0.677 -1.185686 1.824695 /kappa | .8446891 1.917607 0.44 0.660 -2.913752 4.60313 -------------+---------------------------------------------------------------- sigma | 1.376446 1.057067 .3055365 6.200906 ------------------------------------------------------------------------------ *command fits a general gamma to period 4 data . exit, clear