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/