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

From |
"Jamie Griffin" <[email protected]> |

To |
<[email protected]> |

Subject |
Re: st: Using constraints on ancillary parameters in streg |

Date |
Wed, 14 Sep 2005 11:39:03 +0100 |

The syntax you gave works for constraining kappa in the example below, except for some reason when fitting a constant-only model. In this example, when kappa is constrained to be 0 the starting values for the estimation are not feasible. The log-normal model is the same as the generalized gamma with kappa=0, so you can fit both of those to perform a likelihood ratio test of kappa=0. The options -anc()- and -anc1()- fit the ancillary parameters (or the log of the parameter) as linear combinations of the variables specified, which is not what you want here. Jamie Griffin. sysuse cancer,clear stset studytime, f(died) constraint 1 [kappa]_cons=0 streg drug, dist(gam) constraints(1) constraint 2 [kappa]_cons=0.00001 streg drug, dist(gam) constraints(2) streg drug, dist(logn) streg drug, dist(gam) streg, dist(logn) streg, dist(gam) constraint 3 [kappa]_cons=0.00001 streg , dist(gam) constraints(3) >>> [email protected] 09/14/05 10:48 am >>> Hi, listers I'm trying to perform an lrtest on survival time data. Thus I need to create a restricted model, which I would do using the -constraint- command and adding the parameter constraints(#) to the -streg- commmand. However, this does not seem to work very well and stata still calculates the kappa-parameter. Please see attached printout. I tried doing a workaround by specifying anc(kappa1) where kappa1 is a variable containing only 1's, but computing that regression has my computer running on it's third day and still going strong. Is there a way to predict approximately how much time it will take computing a regression? I mean - more than two days computational time deserves some kind of warning :) Anyway - here's my printout, hope you can give me some advice. Cheers, Steinar Fossedal . stset time, failure(default) id(kontrakt) id: kontrakt failure event: default != 0 & default < . obs. time interval: (time[_n-1], time] exit on or before: failure ------------------------------------------------------------------------ ---- 638684 total obs. 52310 obs. begin on or after (first) failure ------------------------------------------------------------------------ ---- 586374 obs. remaining, representing 31746 subjects 13582 failures in single failure-per-subject data 570537.2 total analysis time at risk, at risk from t = 0 earliest observed entry t = 0 last observed exit t = 68 . constraint 1 [kappa]_cons=0 . streg ,d(gamma) nolog time constraints(1) failure _d: default analysis time _t: time id: kontrakt Gamma regression -- accelerated failure-time form No. of subjects = 31746 Number of obs = 586374 No. of failures = 13582 Time at risk = 570537.2198 Wald chi2(0) = . Log likelihood = -27747.888 Prob > chi2 = . ------------------------------------------------------------------------ ---- _t | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------- ---- _cons | 3.534992 .0086277 409.73 0.000 3.518082 3.551902 -------------+---------------------------------------------------------- ---- /ln_sig | -.3399564 .0129331 -26.29 0.000 -.3653049 -.3146079 /kappa | .8868395 .0246913 35.92 0.000 .8384454 .9352337 -------------+---------------------------------------------------------- ---- sigma | .7118014 .0092058 .693985 .7300751 ------------------------------------------------------------------------ ---- * * 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/ * * 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/

- Prev by Date:
**Re: st: Out-of-sample prediction: Time dummy problem** - Next by Date:
**Re: st: RE: Marginal effects after ivprobit** - Previous by thread:
**st: Using constraints on ancillary parameters in streg** - Index(es):

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