Hello,
I have a strange problem with a foreach loop with a reshape command which looks like this:
The first round of the loop works perfectly fine. When ending the first loop, the data is restored. After that (only after the first round), the code seems to skip the drop and keep command which leads stata to not beeing able to conduct the reshape command.
Any ideas?
I have a strange problem with a foreach loop with a reshape command which looks like this:
Code:
levelsof id_ne, local(levels) foreach l of local levels { preserve drop if id_ne != `l' keep raeume time_stamp_trunc persgradtagzahl reshape wide persgradtagzahl, i(time_stamp_trunc) j(raeume) save `path_temp'tempfile`l'.dta, replace restore }
Any ideas?
Comment