I'm sorry to post this problem, but I'm getting increasingly desperate ...
I'm using a loop to get rid of autocorrelated residuals, but I run in a syntax error with the following code:
The problem seems to be that
does not transfer the value of m[12] to xtwelfthpv, since di `xtwelfthpv' yield "0" while m[12] equals 1.
Can anybody tell me, where my syntax error lies? Thanks a lot!
I'm using a loop to get rid of autocorrelated residuals, but I run in a syntax error with the following code:
PHP Code:
regress variable1_variable2
drop resid
predict double resid, res
local xtwelfthpv = 0
local xlags = 0
while `xtwelfthpv' < 0.05 {
quietly regress D.resid L.resid L(0/`xlags')D.resid, nocons
quietly actest, lags(12) robust
mata {
b = st_matrix("r(results)")
m = b[.,4]
st_numscalar("twelfthpv", m[12])
m[12]
}
local xtwelfthpv = `twelfpv'
local xlags = `xlags' + 1
}
di `xtwelfthpv'
di `xlags'
PHP Code:
st_numscalar("twelfthpv", m[12])
Can anybody tell me, where my syntax error lies? Thanks a lot!
Comment