Statalist


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

RE: Re: Re: st: What wrong with this ML model command?


From   "Glenn Goldsmith" <[email protected]>
To   <[email protected]>
Subject   RE: Re: Re: st: What wrong with this ML model command?
Date   Thu, 9 Apr 2009 23:47:51 +0100

Hi Quang,

These two lines:

>            - replace `yb0' = ( `y_bo')^(`alpha') if `y_b0'>=0
>            = replace __000014 = ( )^(__00000T) if __000018>=0

Tell you that the local macro `y_bo' in the first line is empty (hence the
empty parentheses when the macro is evaluated in the second line).

I assume you mean `y_b0' instead.

As an aside, you could just code 

  generate double `yb0' = (`y_b0')^(`alpha') if `y_b0'>=0

instead of 

  generate double `yb0' = .
  replace `yb0' = (`y_b0')^(`alpha') if `y_b0'>=0

Same goes for `ya1'.

HTH,

Glenn.

Quang Nguyen <[email protected]> wrote:

Thanks Glenn and Maarten. I appreciate it.

Here is part of the "trace" that contains the error:

            - generate double `yb0' = .
            = generate double __000014 = .
            - replace `yb0' = ( `y_bo')^(`alpha') if `y_b0'>=0
            = replace __000014 = ( )^(__00000T) if __000018>=0
invalid syntax
              replace `yb1' = ( `y_b1')^(`alpha') if `y_b1'>=0

I double check the code and nothing seems wrong. Do you have any idea?

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