Good day all,
I have three files named A B C and four variables named time, timeA, timeB and timeC.
I regress variables X Y and Z for file A with time variable timeA, X Y and Z for file B with time variable timeB and X Y and Z for file C with time variable timeC
Stata is indicating that my if command is not correct, that 'A' is not found.
Does anyone know what I'm doing wrong in this syntax?
I have three files named A B C and four variables named time, timeA, timeB and timeC.
I regress variables X Y and Z for file A with time variable timeA, X Y and Z for file B with time variable timeB and X Y and Z for file C with time variable timeC
Stata is indicating that my if command is not correct, that 'A' is not found.
Does anyone know what I'm doing wrong in this syntax?
Code:
foreach period in A B C{ clear all use "C:\`period'.dta" replace time=timeA if `period'=="A" replace time=timeB if `period'=="B" replace time=timeC if `period'=="C" foreach var in X Y Z{ reg diff `var' time growth size } }
Comment