Allin Cottrell,
Make some adjust to the script but don't know does is there error
d1 d2 and d3 are different data series
Want regress d1 against d2 and d3 without const
The output would be a regress d1hat
Do a adf on d1 - d1hat
Use the bfgsmax to determine the coefficients of d2 and d3 maximising t from the adf of d1
- d11hat
function scalar adf_t (matrix *b, series y, series d2, series d3)
series d0 = y - (b[1]*d2 + b[2]*d3)
adf 0 d0 --c --quiet
scalar tau = $test
return tau
end function
Using the above script gives a error
The convergence criterion was not met
Error executing script: halting