> Johan Hellstrom:
> For graphing purposes I need to create a (filter-)variable that assign a
> value to every 1.000 observation (in total there is about 80.000
> observations). Although it could be done manually, can anyone tell me
how to
> do this automatically?
You could work with a loop and -in-:
************************************
gen x = .
qui des
forvalues m = 1(1000)`r(N)' {
replace x = something in `m'
}
************************************
Note that this assigns a value to observation 1, 1001, 2001, ... , last
observation.
Johannes
> *
> * 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/
*
* 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/