[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Constraints in stcox
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?
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
This addition would also allow rologit to have a constraint option.
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
WWW (personal): http://www.nd.edu/~rwilliam
WWW (department): http://www.nd.edu/~soc
* For searches and help try: