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: Wald test of joint significance of all regressors in a program, when using factor variables


From   [email protected] (Isabel Canette, StataCorp)
To   statalist <[email protected]>
Subject   Re: st: Wald test of joint significance of all regressors in a program, when using factor variables
Date   Thu, 06 Sep 2012 17:06:03 -0500

Christoph Engel <engel(at)coll(dot)mpg(dot)de> asked how to perform
a Wald test after fitting a two-equation model with -ml-.

By default, -ml- reports a Wald test for all the terms in the first
equation. However, Christoph can choose the equation by using 
the following syntax:

  test [eqno]

In order to perform a test on some of the terms in one equation,
the -testparm- command  will work with factor variables.
Here is an example:


  cscript
  program mynormal_lf
          version 12
          args lnf mu lnsigma
          quietly replace `lnf' =  ///
             ln(normalden($ML_y1,`mu',exp(`lnsigma')))
  end
     
  
  sysuse auto
  
  ml model lf mynormal_lf (mu: mpg = i.rep#c.disp head)  ///
                                       (lnsigma: i.for#c.turn)
  ml max

  *test the terms in the first equation
  test [mu]
  *test the terms in the second equation
  test [lnsigma]


  *test the term i.rep#c.disp using testparm
  testparm i.for#c.turn, eq(lnsigma)

If this solution does not address the particular problem that
Christoph needs to solve, he can send us his dataset and his
code to [email protected], and we'll be glad to provide
further assistance.

-- Isabel 
icanette(at)stata(dot)com


*
*   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