Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: can I use -parmest- with -mlogit-?


From   Roger Newson <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: can I use -parmest- with -mlogit-?
Date   Mon, 14 Jun 2010 11:40:56 +0100

Yes, you can use -parmest- after -mlogit-, and I do this routinely. However, the command

parmest

(without any options) should fail after ANY estimation command, because -parmest- requires at least 1 of the output-destination options -list()-, -saving()-, -norestore- and/or -fast-. These output-destination options control whether the output dataset is listed, saved to a disk file, or written to the memory, overwriting the original data. (These options are not mutually exclusive.)

I tried to replicate something similar to Jamie's example with -mlogit-, by typing

use http://www.stata-press.com/data/lf2/ordwarm2,clear
mlogit warm yr89,nolog
parmest, list(, sepby(eq))

and this worked for me (under Stata 11.1), producing a listing of the parameters, separated by the equation variable -eq-, with P-values and confidence limits formatted more informatively than as provided by -mlogit-. I could equally have used the -saving()-, -norestore- or -fast- options, if I wanted to save the results to disk or to the memory, respectively.

I hope this helps.

Best wishes

Roger



Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected]
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/

Opinions expressed are those of the author, not of the institution.

On 14/06/2010 11:07, Jamie Fagg wrote:
Dear all,

I am trying to write estimates from an -mlogit- command using the
-parmest- by Roger Newson. He seems to suggest that this should be
possible (see http://www.stata.com/statalist/archive/2002-12/msg00025.html)

Parmest seems to work fine (using Stata 10.1) when I try it with logit
(see below), but returns an error when run with mlogit. This
replicates the error that I find when I try to use it with my own
data. I can't find any specific references to this in the parmest help
file. Do I need to specify further options to use parmest with mlogit?

Thanks,

Jamie

. use http://www.stata-press.com/data/lf2/ordwarm2,clear
(77&  89 General Social Survey)

. logit white age,nolog

Logistic regression                               Number of obs   =       2293
                                                  LR chi2(1)      =       5.84
                                                  Prob>  chi2     =     0.0157
Log likelihood = -853.93381                       Pseudo R2       =     0.0034

------------------------------------------------------------------------------
       white |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         age |   .0093244    .003902     2.39   0.017     .0016767    .0169721
       _cons |   1.550548   .1794133     8.64   0.000     1.198904    1.902191
------------------------------------------------------------------------------

. parmest

. use http://www.stata-press.com/data/lf2/ordwarm2,clear
(77&  89 General Social Survey)

. mlogit warm yr89,nolog

Multinomial logistic regression                   Number of obs   =       2293
                                                  LR chi2(3)      =      76.96
                                                  Prob>  chi2     =     0.0000
Log likelihood = -2957.2879                       Pseudo R2       =     0.0128

------------------------------------------------------------------------------
        warm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
SD           |
        yr89 |  -1.174919   .1591851    -7.38   0.000    -1.486916    -.862922
       _cons |  -.6803538    .079895    -8.52   0.000    -.8369451   -.5237625
-------------+----------------------------------------------------------------
D            |
        yr89 |  -.3810336   .1033743    -3.69   0.000    -.5836435   -.1784237
       _cons |  -.0129591   .0657255    -0.20   0.844    -.1417787    .1158604
-------------+----------------------------------------------------------------
SA           |
        yr89 |   .0964589   .1196593     0.81   0.420     -.138069    .3309868
       _cons |  -.7642883    .082184    -9.30   0.000    -.9253661   -.6032105
------------------------------------------------------------------------------
(warm==A is the base outcome)

. parmest
Data will not be replaced
Estimates and SEs could not be extracted
r(498);

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index