Statalist The Stata Listserver

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

Re: st: Nonlinear LR Test in SUR context

From   Maarten buis <>
Subject   Re: st: Nonlinear LR Test in SUR context
Date   Tue, 21 Nov 2006 09:34:39 +0000 (GMT)

--- Gernot Wagner <> wrote:
> How do I implement a nonlinear likelihood-ratio test in a SUR
> context? 

You can do a Wald-type test based on the delta method with -testnl- or 
-nlcom-. See the example below. If you really want to do the likelihood
ratio test then you'll have to program a -sureg-like program that
contains the constraint yourself and compare the log likelihoods. I
don't think that is worth the effort, given the availability of
-testnl- and -nlcom-.


*---------- begin example -----------------
sysuse auto, clear
sureg (price foreign weight length) (mpg displ = foreign weight)
testnl _b[price:foreign]/_b[mpg:weight]=_b[price:length]
return list
nlcom example:_b[price:foreign]/_b[mpg:weight]-_b[price:length], post
di %18.14f (_b[example]/_se[example])^2 
/*compare with chi2 from -testnl-*/
*------------- end example ----------------

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

All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine
*   For searches and help try:

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