Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Changing beta coefficients - w/ logistic regression


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: Changing beta coefficients - w/ logistic regression
Date   Thu, 21 Jul 2005 20:12:48 -0500

At 05:55 PM 7/21/2005 -0400, you wrote:
Back in April, someone posted a question about how to change beta
coefficients.

The answer given (more specifically, the sample code) works perfectly
for linear regression output. But I can't seem to get it to work when
the estimated model is a logistic regression.

Any ideas how to make the code work for LOGISTIC regression?
Don't ask me why, but the original foo.ado works fine with ologit and gologit2 (both of which, with a dichotomous dv, produce results equivalent to logit) - but it bombs with mlogit. Apparently, some programs rate and some do not. Examples:

. sysuse auto
(1978 Automobile Data)
. quietly ologit foreign mpg weight
. matrix list e(b)

e(b)[1,3]
foreign: foreign: cut1:
mpg weight _cons
y1 -.1685869 -.0039067 -13.708367

. foo
. matrix list e(b)

e(b)[1,3]
foreign: foreign: cut1:
mpg weight _cons
y1 122 -.0039067 -13.708367

. quietly gologit2 foreign mpg weight
. matrix list e(b)

e(b)[1,3]
Domestic: Domestic: Domestic:
mpg weight _cons
y1 -.1685869 -.0039067 13.708367

. foo

. matrix list e(b)

e(b)[1,3]
Domestic: Domestic: Domestic:
mpg weight _cons
y1 122 -.0039067 13.708367

. quietly mlogit foreign mpg weight, b(0)

. matrix list e(b)

e(b)[1,3]
Foreign: Foreign: Foreign:
mpg weight _cons
y1 -.1685869 -.0039067 13.708367

. foo
last estimates not found
r(301);

*
* 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