EGARCH: output
by Gabriela Nodari

Dear gretl users,
I have a quick/narrow question about the estimation of an EGARCH model with
gretl. I'm estimating it via GUI. Just to be sure:
Since EGARCH estimates the "log" of the conditional variance, is the output
(which one can save via Save --> h) in log terms? So, for sake of clarity,
shoud I take exp(h) to get the (raw) variance? Or does gretl do that
transformation?
Thanks for your time.
Gabriela
6 years, 4 months

Testing Ho: B=0 vs B>0
by Sabri Amer

Hello everybody,
How is it possible in Gretl to test Ho:B=0 vs B>0
in Y=alpha+Bx+Ut?
Thank you
Sabri Amer
6 years, 4 months

Logit command using panel data
by Jan Tille

Dear users,
I have a short question regarding the estimation of a logit model, when data is in panel format. Does Gretl automatically conduct a fixed effects estimation? I ask because for probit models, there is a random effects option.
Thanks in advance,
Jan
6 years, 4 months

Re: Missing values in MLE
by Daniel Bencik

Sven,
thanks. Regardless of how I try to see how this works, I cant figure it out. The simplest LL I work with is
<hansl>
mle ll = -ln(lambda) - xDepVars[yIdx]/lambda
series lambda = mean(xDepVars[yIdx])
series lambda = c_ + rng * xExpVars[xIdx] + err * lambda(-1)
params c_ rng err
end mle --robust
</hansl>
>From what I understood, the solution lies in writing logLambda instead of lambda, i.e.
<hansl>
mle ll = -logLambda - xDepVars[yIdx]/exp(logLambda)
series logLambda = ln(mean(xDepVars[yIdx]))
series logLambda = ln(c_ + rng * xExpVars[xIdx] + err * lambda(-1)) .... ??
params c_ rng err
end mle --robust
</hansl>but this does not solve the problem, hence the question marks and I am missing the real solution. Could I ask you for a bit more direction?Best, Daniel
6 years, 4 months

Re: [Gretl-users] Missing values in MLE
by Daniel Bencik

Allin,
thanks a lot, that was the issue. When I thus try to constrain the calculation not to go in the direction where negative lambdas are created by
<hansl>
function scalar getNegativesCount(series * xSeries)
scalar xRetVal = 0
loop xIdx = 1..$nobs
if missing( xSeries[xIdx] ) = 0
if xSeries[xIdx] < 0.0
xRetVal = xRetVal + 1
endif
endif
endloop
return xRetVal
end function
...# ESTIMATIONmle ll = xCheck == 0 ? -ln(lambda) - sqrtPark/lambda : NA series lambda = mean(sqrtPark) series lambda = c_ + rng * sqrtPark(-1) + rng2 * sqrtPark(-2) + err_ * lambda(-1) + err_2 * lambda(-2) scalar xCheck = getNegativesCount(& lambda) params c_ rng rng2 err_ err_2end mle --robust#ESTIMATION</hansl>I get a "Scalar loglikelihood: can't do QML". So, how do I tell the optimizer that in case it runs to negative lambda, it should "go away" from that parameter combination? I also tried to replace the <hansl>...mle ll = xCheck == 0 ? -ln(lambda) - sqrtPark/lambda : NA...</hansl>with <hansl>...mle ll = xCheck == 0 ? -ln(lambda) - sqrtPark/lambda : -100000...</hansl>but it produced the same error.Many thanks, Daniel
6 years, 4 months

Missing values in MLE
by Daniel Bencik

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,
Daniel
6 years, 4 months

error: read out varname using loop
by Artur T.

Hi all,
in the past this used to work:
<hansl>
open denmark.gdt -q
list X = LRM LRY
loop i=1..2 -q
string vname = varname(X[i])
print vname
endloop
</hansl>
However, using current cvs on Ubuntu, I get the error:
"varname: argument should be scalar, is series
Data types not conformable for operation"
Did I miss some recent changes, or is it a bug?
Artur
6 years, 4 months

Serial correlation and omit
by Logan Kelly

Hello,
Apologies for a very rudimentary question. Is the joint significance test performed by omit valid in the presence of serial correlation when (i) the --robust option is used to with ols and (ii) the --chi-square option is used with omit, e.g.
ols y const x z --robust
omit z --chi-square
Thanks,
Logan
6 years, 5 months

MLE with lists
by Daniel Bencik

Dear forum,
I am struggling with my variable lists once again. I expected the following two ML estimations to give the same results, but they don't. Any ideas?
#estimation 1
scalar c_ = 0.1
scalar rng = 0.1
scalar err = 0.2
mle ll = -ln(lambda) - sqrtPark/lambda
series lambda = mean(sqrtPark)
series lambda = c_ + rng * sqrtPark(-1) + err * lambda(-1)
params c_ rng err
end mle --robust
#estimation 2
list xDepVars = sqrtPark
list xExpVars = sqrtPark(-1)
c_ = 0.1
rng = 0.1
err = 0.2
series xDepVar = xDepVars[1]
series xExpVar = xExpVars[1]
mle ll2 = -ln(lambda2) - xDepVar/lambda2
series lambda2 = mean(xDepVar)
series lambda2 = c_ + rng * xExpVar + err * lambda2(-1)
params c_ rng err
end mle --robust
Many thanks in advance,
Daniel
6 years, 5 months