Statalist The Stata Listserver


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

Re: st: Constraints in stcox


From   Richard Williams <[email protected]>
To   [email protected], [email protected]
Subject   Re: st: Constraints in stcox
Date   Thu, 19 Jan 2006 12:05:20 -0500

At 10:47 AM 1/19/2006, Benjamin M. Craig, Ph.D. wrote:
Stata 9.0 allows constraints in the clogit, but what about stcox? It would seem to be natural to have a constraint option for stcox too, but I have not found one. Has anyone else?

This addition would also allow rologit to have a constraint option.
Stata's Maximum Likelihood book, 3rd edition, includes various programs that support the constraints option. One of them is mycox, for Cox proportional hazards models. You can get the programs at

http://www.stata-press.com/data/ml3.html

These routines tend to be less feature rich, and I suspect slower, than their official Stata counterparts. But, if the main thing you are interested in is the ability to impose constraints, this may do.

As to why more Stata commands do not support constraints - i don't know. I do know that if you write a program using the -ml- command, it is easy to add support for constraints. Maybe it is harder to do so when writing programs in C or whatever it is that Stata uses.

You might also want to take a look at Jeroen Weesie's -linest- program. Its description says "linest imposes linear constraints on the last estimation results. This two-stage estimator is asymptotically equivalent to the "true" one-stage constrained estimator." It is not as good as having support for constraints built directly into the command, but it is probably the next best thing.

As a sidelight, my gologit2 and oglm commands aren't the fastest programs in the world, but they do allow you to impose linear constraints. That may make them an attractive alternative to logit, ologit, probit and ologit in some situations. Not stcox though - sorry.



-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
FAX: (574)288-4373
HOME: (574)289-5227
EMAIL: [email protected]
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
*
* 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