Hi all,
I'm writing a script to implement the cointegration-with-break tests in Davidson &
Monticini (2010). The part I've done so far is what they call the
"incremental" version. Basically test for CI over subsamples, with the ending
date increasing by one each time.
The following block works fine in my main script:
<hansl>
# forward incremental
begdate = firstobs(y)
enddate = t0
loop while enddate<=n --quiet
smpl begdate enddate
ols y 0 time x --quiet
z = $uhat
coeffs[enddate,] = $coeff'
stderrs[enddate,] = $stderr'
adf 2 z --ct --test-down --quiet
stats[enddate] = $test
enddate++
endloop
</hansl>
But when I try to put this in a function, the smpl command generates an error:
Bad character 'b' in date string
error in new starting obs
*** error in function minmin
smpl begdate enddate
The variables 'begdate' & 'enddate' are getting set properly. I'm
using the shapshot built on 7/7, windows 7.
Any thoughts?
TIA,
PS