Hi everyone. I'm trying to create a new file based on the data in my .dta file. I'm trying to create a full list of numbers based on starting and ending points in all the rows. Stata is showing invalid syntax error. Could anyone please help me point out the error in this?
The sample of the base file is:
sic_start sic_end
100 199
200 299
700 799
910 919
2048 2048
The sample of the base file is:
sic_start sic_end
100 199
200 299
700 799
910 919
2048 2048
Code:
capture confirm file ffsic.dta if !_rc erase ffsic.dta tempname ffsic postfile `ffsic' siccode using ffsic.dta forvalues j=1/`=_N' { forvalues k=sic_start[`j']/sic_end[`j'] { post `ffsic' (`k') } } postclose `ffsic'
Comment