Hi everyone,
I am writing to you in order to find some help concerning construction of the loop. My aim is to build a loop which automatically create a first differences of each time serie if it does not pass the ADF test. You can find below my script but there is something wrong with it because it shows a problem with commaf 'if'.
loop foreach i xlist
adf 30 xlist.$i --test-down
genr p$i = $pvalue
if p$i < 0,05
genr d_i = diff(xlist.$i)
endloop
Do you have any ideas what should be changed?