Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: How to start writing your own estimation command


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: How to start writing your own estimation command
Date   Fri, 2 Nov 2007 13:52:58 +0000 (GMT)

--- Eva Poen <eva.poen@gmail.com> wrote:
> In the near future I will have to write my own estimation command for
> the first time. It will be a mixed model, much like an ordered probit
> where the cut-offs are known, with some extra parameters. I will need
> the Huber-White-Sandwich variance estimator, and I want to estimate
> it both with a two-step procedure and by maximum likelihood. I own a
> copy of Stata 9 and have access to Stata 10 if necessary.
> 
> I'd be grateful for some guidance on where to start. Is -ml- the way
> to go, or is it better to learn mata and use the optimization
> functions that are listed on   www.stata.com/capabilities/matrix.html
> ? 

-ml- is very powerful yet easy to use, and it automatically takes care
of a lot of things (e.g. robust standard errors, weights, displaying
results). So, -ml- would definately my first choice. 

> Will the maximum likelihood estimation book by Gould, Pitblado, and
> Sribney help in either case? 

YES (I know all-caps is shouting and usually considerd rude, but I hope
you will just read this as being over-enthusiastic and forgive me), at
least for the -ml- case that book is an absolute must have if you want
create an estimation command.

> Is there some other resource out there that tells you how to do it in
> mata and -ml-, and what the differences are? I should add that I have
> no previous experience of mata, but I did both NC151 and NC152.

The Gould, Pitblado, and Sribney book also describes in good detail how
to get started, and manage such a project. I have not needed anything
else. (Well, I took my first steps together with Nick Cox and Stephen
Jenkins (-betafit-))

Hope this helps,
Maarten


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index