Statalist The Stata Listserver


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

st: Re: RE: Weights vs subscripts


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: RE: Weights vs subscripts
Date   Tue, 03 Oct 2006 16:40:40 -0400

...
Actually, the better (faster) way to do this is
replace y=y[`i'-1] +z[`i'] in `i'

Michael Blasnik


----- Original Message ----- From: "Alex Ogan" <[email protected]>
To: <[email protected]>
Sent: Tuesday, October 03, 2006 4:23 PM
Subject: st: RE: Weights vs subscripts



Somebody more knowledgeable will probably explain exactly why you can't
use subscripts on the left side like that.

But I can suggest a workaround:

replace y=y[`i'-1] +z[`i'] if _n==`i'
*
*   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