Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: Wald test of joint significance of all regressors in a program, when using factor variables

From   "Christoph Engel" <>
Subject   st: Wald test of joint significance of all regressors in a program, when using factor variables
Date   Thu, 06 Sep 2012 10:35:12 +0200

Dear readers of Stata list, 
Since it seems that this note, sent from my standard POP3 account, has never reached Stata list, I resend it from the webmailer. I apologize for any crossposting.

Yesterday, I have received excellent advice from Maarten Buis on another problem I had with a program I am writing. This encourages me to send another note to the list, in hopes that someone has a hint to the solution of a second problem. 

My program is a maximum likelihood estimator with two separate components. The standard ML routine generates a Wald test for the joint significance of the regressors for the first component (and makes it appear to be an overall test). I want to remedy this by offering two separate Wald tests, one for each component. In principle this is easy 

    test [eq1] indepvars1 
    test [eq2] indepvars2 

Yet to ease the definition of independent variables, and in particular to enable margins, I have made factor variables available by 

    syntax varlist(fv) 

Unfortunately, the standard syntax for a Wald test then no longer works. Shifting to the 


syntax does not help either if some of the variables that are interacted are continuous. One can solve the problem by hand, by 

    test [eq1] x y z x#y x#z y#z x#y#z 

(if one wants a saturated model), but it would be more convenient if I could program this step. Does anyone know how to do that? 

Thank you in advance for any advice 

Christoph Engel 

Prof. Dr. Christoph Engel 
Max-Planck-Institut zur 
Erforschung von Gemeinschaftsgütern 
Max Planck Institute for Research on Collective Goods 
Kurt-Schumacher-Strasse 10 
D 53113 Bonn 
Tel. +49/228/91416-10 
Fax +49/228/91416-11 

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index