Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Re: Trend


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: Re: Trend
Date   Thu, 9 Jan 2003 13:45:26 -0000

Chau Tak Wai
 
> why this is not valid?
> 
> for num 1/10: replace z[X]=3 if x[X]==y[X]
> response:
> ->  replace z[1]=3 if x[1]==y[1]
> weights not allowed
> r(101);
> 
> Though I understand that we don't need such statement to do 
> this task,
> but why this statement can't work?

You can't put variable subscripts to 
the left of the = sign. The [ ] 
notation is reserved for specifying weights. 

replace z = 3 in 1 

will work. 

Nick 
[email protected] 
*
*   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