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

Re: st: Using mlogit estimates

From   "Tonya Cropper" <[email protected]>
To   "Statalist" <[email protected]>
Subject   Re: st: Using mlogit estimates
Date   Tue, 10 May 2005 14:23:25 -0400

Thanks Kevin and Christian for your response. However, the ouput from a mlogit output is a little different. Below, I show the estimates from the two possible outcomes (0 and 2, where 1 is the omitted comparison group). I need to reference the variables (1 thru 6, and constant) separately for each output possibilities (0 and 2). In a normal matrix, I can reference the elements of the matrix by the matrix name and the row and column., I do not know how to do this in Stata. I want to be able to reference each coefficient separately, for example B[2:v1] which is .10867021 . Thanks, Tonya

(Outcome pred==1 is the comparison group)

. matrix B = e(b)

. matrix list B


0: 0: 0: 0: 0: 0: 0:

v1 v2 v3 v4 v5 v6 _cons

y1 .09088532 -.04337326 -.71709113 .15899163 .43313382 1.4292313 -.4900333

2: 2: 2: 2: 2: 2: 2:

v1 v2 v3 v4 v5 v6 _cons

y1 .10867021 -.00630561 -.44842215 .21496372 .16636787 .79510967 -.04767481

----- Original Message ----- From: <[email protected]>
To: <[email protected]>
Sent: Tuesday, May 10, 2005 11:12 AM
Subject: Fwd: st: Using mlogit estimates

Dear Tonya:

For this problem, I've used matrix commands to extract the particular coefficient from the matrix:

Here is an example in relation to the e(V) matrix, but its the same idea for the e(B) matrix. I recommend looking up the matrix commands to gain familiarity with how to "list" and look at the matrix and other things.

matrix varmatrix=e(V);
local alpharow=rownumb(varmatrix,"lnalpha:_cons"); /*I needed to "list" the matrix to figure out what the name of the row I was looking for was called*/
gen selnalpha=sqrt(varmatrix[`alpharow',`alpharow']) in `writeline';


X-Sieve: CMU Sieve 2.2
X-Authentication-Warning: majordom set sender to [email protected] using -f
From: "Tonya Cropper" <[email protected]>
To: "Statalist" <[email protected]>
Subject: st: Using mlogit estimates
Date: Tue, 10 May 2005 07:32:49 -0400
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MIMETrack: Itemize by SMTP Server on KSGLDAP/KSG(Release 6.5.2|June 01, 2004) at 05/10/2005
07:32:34 AM,
Serialize by Router on KSGMTA/KSG(Release 6.0.5|March 27, 2005) at 05/10/2005
07:32:39 AM,
Serialize complete at 05/10/2005 07:32:39 AM
Sender: [email protected]
Reply-To: [email protected]
X-Spam-Score: -4.9
X-Spam-Flag: NO
X-Scanned-By: MIMEDefang 2.42


I am trying to use the estimates from a mlogit regression output to calculate the probabilities of three outcome using different data. When I type in "ereturn list" after the mlogit command is run, the matrix of the estimates referenced by e(b): 1x32 is listed. Is there anyway to reference the coefficients individually to perform a calculation such as this one:

Pr(y=2) = exp(XB2)/(1+exp(XB2)+exp(XB3))

where XB2 and XB3 are the set of estimates for each respected outcome times its respected value.

Thank you,

Tonya Cropper
PhD Candidate in Public Policy
Harvard University

* For searches and help try:

*   For searches and help try:

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