On Sun, 18 Jan 2015, Daniel Bencik wrote:
Dear group,
trying to estimate a W-CARR(2,2) model on volatility time series using mle, I
run into "Missing values encoutered" even though
1/ W-CARR(1,1) any many other (1,1)-specification models work just fine on
the same dataset
2/ the dataset is checked to contain no NAs
I read the user manual, section Missing values, also tried googling, but
found no real help, so I humbly ask for direction here. The smallest amount
of working code that shows the MLE is
<hansl>
smpl full
# base values of estimates
scalar c_ = 0.000145655
scalar rng = 0.103050
scalar rng2 = 0.0987507
scalar err_ = -0.0964818
scalar err_2 = 0.872122
scalar xFirstObs = 5 scalar xLastObs = xOosEstimationWindowSize
scalar xFcastedPeriod = -1
# having the combination of explained and explanatory variables, we create
out of sample forecasts
loop xFcastedPeriod = xLastObs + 1 .. $nobs - 1 --quiet
smpl xFirstObs xLastObs # set data range
mle ll = -ln(lambda) - sqrtPark/lambda
series lambda = mean(sqrtPark)
series lambda = c_ + rng * sqrtPark(-1) + rng2 * sqrtPark(-2) + err_
* lambda(-1) + err_2 * lambda(-2)
params c_ rng rng2 err_ err_2
end mle --robust
xFirstObs = xFirstObs + 1
xLastObs = xLastObs + 1
endloop
</hansl>
Any help is much appreciated,
We can't really tell what's going on without seeing your series
sqrtPark, but from the code above it seems quite possible that the
series named lambda may acquire some non-positive values, in which
case ln(lambda) will contain NAs and the error condition you mention
will then arise.
You probably need to constrain lambda to be strictly positive.
Allin Cottrell