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: RE: ml and parmby versus statsby


From   "Roger B. Newson" <[email protected]>
To   [email protected]
Subject   Re: st: RE: ml and parmby versus statsby
Date   Wed, 12 Dec 2012 19:26:52 +0000

My version of -parmby- has the same date as Nick's, and does not allow a -quietly- option, at least under my Stata/MP Version 12, which is fully up to date and dated 22 Oct 2012 according to -update query-. So I would guess that S. Suetens has reported a slightly garbled version of the -parmby- command used.

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 12/12/2012 18:05, Nick Cox wrote:
We can be pleased that you no longer see a problem, but what happened
remains mysterious.

1. -parmby- permits other options but these are in turn (if I follow
Roger's code correctly) passed to -parmest-, which does not in fact
allow a -quietly- option. So why your earlier code ran at all is a
puzzle.

2. In general, the effect of a -quietly- option in Stata would be that
something is done "quietly", although that's a convention, not a rule.
If so, results should be exactly as they were before, not different.

I spell out here, as we are all asked to do, that -parmby- is a
user-written command. I looked at -parmby-  from SSC and -which- tells
me

*! Author: Roger Newson
*! Date: 02 September 2009

Nick

On Wed, Dec 12, 2012 at 5:41 PM, S. Suetens <[email protected]> wrote:

This is very helpful.
I re-ran the parmby command, but without including the quietly option, and estimation results are the same now as those under statsby.

Roger B. Newson

I don't know how your -statsby- and -parmby- results are different, as you haven't told us. However, -statsby- creates a  dataset with 1 observation per by-group, and different variables for the estimates and standard errors for different parameters. -parmby-, on the other hand, creates a dataset with 1 observation per parameter per by-group, with 1 variable for the estimate and 1 variable for the standard error, and other variables for the confidence limits and P-values.

I am a bit mystified about the -quietly- option for -parmby-. As the author of -parmby-, I never knew that -parmby- had a -quietly- option, although it can take the -quietly- prefix like other Stata commands.

On 12/12/2012 15:52, S. Suetens wrote:

Is there anyone who can explain why maximum likelihood estimation gives different results under parmby as compared to statsby?
I have run the two commands below (based on the same likelihood function) and they give very different parameter estimates and standard errors.

statsby _b _se, by(id) saving("D:\Statsby.dta", replace) nodots: ml
model lf MaxLik (lambda: strategy =) (rhosigma: RHO SIGMA, nocons),
max difficult

parmby "ml model lf MaxLik (lambda: strategy =) (rhosigma: RHO SIGMA,
nocons), max difficult", by(id) saving("D:\Parmby.dta", replace)
quietly

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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