Statalist


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

st: Using test after nl - not working


From   "Lina Jonsson" <lina.jonsson@vti.se>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Using test after nl - not working
Date   Thu, 11 Sep 2008 09:19:35 +0200

I'm using nl and would like to test equality between two coefficients
after estimation. According to the Stata manual test is available after
nl but I can't seem to get it to work. See my simple example below:

nl(ksumma04=exp({b0}+{b1}*boyta+{b2}*stand))


      Source |       SS       df       MS
-------------+------------------------------         Number of obs =
1738
       Model |  6.3693e+09     3  2.1231e+09         R-squared     =
0.9183
    Residual |   566726732  1735   326643.65         Adj R-squared =
0.9182
-------------+------------------------------         Root MSE      =
571.5275
       Total |  6.9360e+09  1738  3990821.75         Res. dev.     =
26995.96

------------------------------------------------------------------------
------
    ksumma04 |      Coef.   Std. Err.      t    P>|t|     [95% Conf.
Interval]
-------------+----------------------------------------------------------
------
         /b0 |   6.715197   .0407067   164.97   0.000     6.635357
6.795036
         /b1 |    .001318   .0000904    14.58   0.000     .0011408
.0014953
         /b2 |   .0224096   .0012817    17.48   0.000     .0198958
.0249234
------------------------------------------------------------------------
------
* (SEs, P values, CIs, and correlations are asymptotic approximations)


test boyta=stand
regressor boyta not found
r(111);

Any other suggestions on how to specify the command? Found an earlier
question in the Statalist archive that gave the following suggestion but
it doesn't work either.

test _b[b1]=_b[b2]
[b1] not found
r(111);

I have also tried:

. test _coef[boyta]=0
. test _b[boyta]=_b[stand]
. test b1=b2

Nothing works. Any suggestions on the right syntax or is there some
other problem?

/Lina Jonsson 

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index