my code-
clear all
global root "/Users/deshamithrajayasekera/Box/CES_80_2015"
forvalues i = 84(1)99 {
forvalues j = 1(1)4{
use "$root/raw/intrvw`i'/fmli`i'`j'.dta", clear
append using "$root/raw/temp.dta", force
replace temp = "`i'.`j'"
save "$root/raw/temp.dta", replace
}
}
Error: file /Users/deshamithrajayasekera/Box/CES_80_2015/raw/intrvw94/fmli941.dta not found
(datafile for the quarter 1 data in 1994 is not available)
- temp.dta is a master-file of sorts to which I append my data
- I'm working on Stata 15.1 on a mac
0 Response to Using 'forvalues' when some data files are missing in between
Post a Comment