removing nan and inf from a matrix
by Logan Kelly
Hello,
I need to take the log difference of a matrix, i.e. log(M[2 rows(M):,]/M[1:rows(M)-1,]). Unfortunately, M has elements equal to zero. I need to replace the nan's and inf's with 0's. This almost works
M = isnan(M) ? 0 : M
but does not remove inf's. Any sugestions?
8 years, 5 months
Feature Request: "--preserve" option
by Henrique Andrade
Dear Gretl Team,
We can use the option "--preserve" with the "open" command to preserve
matrices and scalars. I would like to ask you if it is possible to include
strings too (so the "preserve" option will preserve matrices, scalars, and
strings).
Best regards,
Henrique Andrade
9 years, 5 months
Forecasting variance of a GARCH model
by Karthik Raju
Hello,
I am writing to seek help to forecast volatility of index returns using
GRETL.
In GRETL, I want to know how to perform in the sample and out of sample
forecasting after estimating index return series by using GARCH variants
in the gig package.
Thank you.
Best,
Karthik
9 years, 8 months
bivariate probit in a loop
by Artur Bala
Dear all,
I'm currently estimating a bootstraped bivariate probit through a
progressive loop and retrieve each time the $yhat matrix. At some point,
the execution is interrupted with the "warning":
The statistic you requested is not available
>> genr series predict_external = $yhat[,1]
Is there a perfect prediction symptom behind this message isn't it?
Can one, in such a loop, skip cases where the MLE estimation is not
technically possible?
Best,
Artur
9 years, 9 months
Cumulated impulse responses for VEC models
by Stefan A.
Dear fellow gretl users,
I recently started using gretl for a project that requires analysis of
VECM (Vector Error Correction models) impulse response functions for a
relatively large number of different samples and models. To summarise
the results, I would like to calculate the cumulated impulse responses
and, since I am new to gretl, I was wondering what would be the best
way to do so? Do there exist pre-made function packages for this
purpose? If not, how would one approach this in terms of retrieving the
values from the irf matrix and writing a function?
Any help would be appreciated! Thank you in advance!
Stefan
--
Stefan Angrick <stefan.a(a)portblue.net>
9 years, 9 months
Re: [Gretl-users] compact bug - thank you
by Wingenroth, Thorsten
Hi,
thanks to all of you. I am impressed how many of you responded and how constructive your comments are.
You really care about Gretl!
Your answers showed me that this program will have a future. So I will throw myself into it.
Can I be of any help to improve Gretl? My C knowledge is frankly very limited. At the moment,
I can of course report possible bugs. Anything else I can do?
Thanks again and kind regards,
Thorsten
9 years, 9 months
Follow up: Further side-effects of compact bug
by Wingenroth, Thorsten
Hi,
seems the compact-bug has further consequences:
- copying it to clipboard with comma separation gives completely different data
- ldif on DAX gives data that has nothing to do with a log-diff on yearly data
-
In contrast, doing the same thing with FONDAK works alright.
Dataset attached.
Kind regards,
Thorsten
Prof. Dr. Thorsten Wingenroth
Professor für Lehraufgaben BWL-Bank
Fakultät Wirtschaft | Studienzentrum Finanzwirtschaft (Center of Finance)
Duale Hochschule Baden-Württemberg Stuttgart
Baden-Wuerttemberg Cooperative State University Stuttgart
Herdweg 18 | 70174 Stuttgart
Fon +49 711 1849-766
thorsten.wingenroth(a)dhbw-stuttgart.de<mailto:thorsten.wingenroth@dhbw-stuttgart.de> | http://www.dhbw-stuttgart.de/bank
Master in Business Management - Banking & Finance
http://www.dhbw.de/master-finance
9 years, 9 months
Bug: Menu item compact dataset
by Wingenroth, Thorsten
Hi,
first of all: I think Gretl is great. Just what I had looking for my students and myself. Clean, fast, easy, powerful but - most of all - a nice user interface. That's what R is missing. That said:
I am new to this list so I am not sure if this is the right place to report bugs. But since I didn't find any other place to do so, I will just start:
The menu item for compacting series does not work correctly. Although the option "last" is specified in the attributes, another method to compact is used. In contrast, if you use the command line interface, everything works fine.
If you want to try out yourself, just try to compact these two files via the menu to a frequency of 1 year. A lot of data gets lost at the beginning of the series.
Kind regards and thank you for your help
Thorsten
9 years, 9 months
Re: [Gretl-users] Missing values in MLE
by Daniel Bencik
Hello,
I noticed one more thing ... when I estimate a model using the log()/exp() way, I receive an error about a Hessian calculation fail, whereas when I do it using the non-log()/exp() way, the estimation finished without problems. This problem arises when I add an "MA" term into the estimation. Is there a way to circumvent this?
Best regards,
Daniel
9 years, 9 months
Re: [Gretl-users] Missing values in MLE
by Daniel Bencik
...
> The idea is to force certain quantities to be positive so that lambda
> cannot be negative, eg:
>
> <hansl>
> series y = xDepVars[yIdx]
> series x = xDepVars[xIdx]
> scalar m = mean(y) # assume this is positive
> matrix b = zeros(3,1)
>
> mle ll = ?-ln(lambda) - xDepVars[yIdx]/lambda
> series lambda = m
> scalar c_ = exp(b[1])
> scalar rng = exp(b[2])
> scalar err = exp(b[3])
> series lambda = c_ + rng * x + err * lambda(-1)
> params b
> end mle --robust
>
> matrix c = exp(b)
> matrix V = $vcv .* (c*c') # delta method
> matrix s = sqrt(diag(V))
>
> matrix cs = c ~ s
> string parnames = "C_,rng,err"
>
> modelprint cs parnames
> </hansl>?
Riccardo,
thanks a LOT, both for the exp/log trick and for getting the params allright for the modprint.
Take care,
Daniel
9 years, 9 months