# Re: st: Using mlogit estimates

 From "Tonya Cropper" To "Statalist" 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

B[1,14]

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: <boudreau@MIT.EDU>
To: <tonya_cropper@ksgphd.harvard.edu>
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';

Kevin.

X-Sieve: CMU Sieve 2.2
X-Authentication-Warning: hsphsun2.harvard.edu: majordom set sender to owner-statalist@hsphsun2.harvard.edu using -f
From: "Tonya Cropper" <tonya_cropper@ksgphd.harvard.edu>
To: "Statalist" <statalist-digest@hsphsun2.harvard.edu>
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: owner-statalist@hsphsun2.harvard.edu
X-Spam-Score: -4.9
X-Spam-Flag: NO
X-Scanned-By: MIMEDefang 2.42

Hello,

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
617.493.9601

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