Statalist The Stata Listserver


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

[no subject]



"Say exactly what you typed and exactly what Stata typed (or did) in
response. N.B. exactly! If you can, reproduce the error with one of Stata's
provided datasets or a simple concocted dataset that you include in your
posting."


Perhaps you looking for -testnl- ?

For example:

. sysuse auto,clear
(1978 Automobile Data)

. gen time = _n

. tsset time
        time variable:  time, 1 to 74

. reg mpg l.mpg d.price l.price

    Source |       SS       df       MS              Number of obs =      73
-----------+------------------------------           F(  3,    69) =   10.13
     Model |  746.994574     3  248.998191           Prob > F      =  0.0000
  Residual |  1695.96433    69  24.5791932           R-squared     =  0.3058
-----------+------------------------------           Adj R-squared =  0.2756
     Total |   2442.9589    72  33.9299848           Root MSE      =  4.9577

----------------------------------------------------------------------------
       mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-----------+----------------------------------------------------------------
       mpg |
       L1. |    .258988   .1137083     2.28   0.026     .0321462    .4858298
     price |
       D1. |    -.00099   .0002037    -4.86   0.000    -.0013964   -.0005836
       L1. |  -.0003742   .0002778    -1.35   0.182    -.0009284      .00018
     _cons |   18.14074    3.53398     5.13   0.000     11.09065    25.19084
----------------------------------------------------------------------------

. testnl _b[l.mpg]*_b[d.price] = -1*_b[l.price]

  (1)  _b[l.mpg]*_b[d.price] = -1*_b[l.price]

              F(1, 69) =        4.78
              Prob > F =        0.0323


Scott


> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Fanwell Kenala Bokosi
> Sent: Saturday, January 21, 2006 3:26 PM
> To: [email protected]
> Subject: st: Testing constraints in a linear regression
> 
> I am estimating a model which is constrained. I am trying to test the
> constraints, but stata keeps giving me an error message.
> 
> My model is
> 
> Y = (�-1)Yt-1 + � (Xt-Xt-1) + �(1- �)Xt-1 + �i
> The stata command I am using is
> 
> reg Y Yt-1  (Xt-Xt-1) Xt-1
> 
> test Yt-1 * (Xt-Xt-1)= -(Xt-1)
> 
> 
> 
> When I do that I am getting an error,
> 
> 
> 
> I have about  more than one ((Xt-Xt-1), Xt-1 variables. Please help
> 
> 



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