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, 6 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, 9 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, 10 months
Nested Logit
by David van Herick
Does anyone know if it is possible to run a nested logit model in gretl?
It seems it must be possible somehow with a hansl script or something, but
I can't seem to figure it out. I am hoping for an FIML version, but would
be happy to even find something that will do a two-step LIML version with
multinomial logit models that include logsum parameters.
10 years
Plot Commands Editor
by Randy Kesselring
I am trying to edit some of the plot commands as described in the manual. Specifically, I am trying to change the canvas size for pngcairo from 640,480 (the default size) to 480,480 or some size close to this. When I make the changes as described in the manual (at least, as I interpret the manual) either nothing happens or I get dinging bells (which I am sure indicate some kind of error). Any suggestions would be greatly appreciated.
10 years, 1 month
UDF for geometric mean and the aggregate function
by Pindar
Hi there,
I'm interested in calculating a geometric mean inside the aggregate
function in a panel dataset.
While my UDF works in plain script the results when using as aggregation
function are wrong.
Could you please help me with this issue, here is the hansl script:
function scalar fn_geomean(series X)
catch scalar Y = prodc({X})^(1/nobs(X))
if $error<>0
Y=NAN
endif
return Y
end function
open abdata.gdt
series test = abs(n)
matrix testmean = aggregate(test, const, mean)
eval mean(test)~ testmean[, 3]
matrix testgeomean = aggregate(test, const, fn_geomean)
eval fn_geomean(test) ~ testgeomean[, 3]
Cheers
Leon
10 years, 1 month
smpl --dummy syntax
by Sven Schreiber
Hi,
just a small clarifying question:
smpl some_zero_one_series --dummy
and
smpl some_zero_one_series --restrict
are equivalent, right? For me they seem to give the same result, and
then I asked myself why the '--dummy' option exists at all. Am I missing
something?
thanks,
sven
10 years, 1 month
replicated matrix in the icon view window
by Artur Bala
Dear Allin,
I'm testing a bundle function which contains a scalar and a matrix.
I saved the matrix normally. Then edited it and made some changes.
Eventually, I turn back to the bundle and wanted to save the original
matrix with the same name (to replace the old one I modified).
gretl prompts the warning "A matrix named...already exist. OK to
overwrite?" and I choose "Yes".
The result is that the old matrix is replicated instead of being replaced:
same name, same content. If I repeat the operation several time the old
matrix is replicated each time.
Besides, when selected "No" to the warning message and cancelled the saving
process the old matrix is still replicated.
Best,
Artur
10 years, 1 month
Re: [Gretl-users] bivariate probit (in a loop)
by Artur Bala
>
>
>> There's no doubt your likelihood function is misbehaved here (rho near 1
>> is worrying) and what you're seeing are numerical problems.
>>
>>
My question: When it comes to rho "near 1" what about the extreme case of
rho=1? I tried another biprobit estimation which shows up rho=1...with no
error message. At that point, should the likelihood computations have
stopped?
(just in case, here's attached the rho-equal-one output)
Artur
10 years, 2 months
Re: [Gretl-users] Wildcard problem in the latest snapshot
by henrique.andrade@bb.com.br
Dear Allin,
I think the problem with wildcards is not completely solved. Please take a look at the following script (you can find the used dataset attached):
<hansl>
open "Dados.gdt" --quiet
loop for i=1..12 --quiet
store "@dotdir\Projeções ($i passo).gdt" ibcbr proj_*_$i
endloop
loop for i=1..12 --quiet
store "@dotdir\Projeções ($i passo).gdt" *_$i
endloop
</hansl>
This commands work just fine, but that one don't:
<hansl>
loop for i=1..12 --quiet
store "@dotdir\Projeções ($i passo).gdt" ibcbr *_$i
endloop
</hansl>
Best,
Henrique Coêlho de Andrade
Diretoria de Estratégia e Organização
Divisão de Cenários e Estudos Macroeconômicos
Banco do Brasil
henrique.andrade(a)bb.com.br
Tel.: (61) 3102-6911
-----F1831737 Carlos Henrique Coelho de Andrade/BancodoBrasil escreveu: -----
Para: Gretl list <gretl-users(a)lists.wfu.edu>
De: F1831737 Carlos Henrique Coelho de Andrade/BancodoBrasil
Data: 03/10/2014 12:15
Assunto: Re: [Gretl-users] Wildcard problem in the latest snapshot
Dear Allin,
The error message is gone. But the problem remains :-( I think we found a problem greater than the wildcard handling. Take a look ate the following script:
<hansl>
open australia.gdt
list L = PAU PUS E
eval varname(L)
delete L
</hansl>
Gretl is not deleting lists.
Atenciosamente,
Henrique Coêlho de Andrade
Diretoria de Estratégia e Organização
Divisão de Cenários e Estudos Macroeconômicos
Banco do Brasil
henrique.andrade(a)bb.com.br
Tel.: (61) 3102-6911
-----gretl-users-bounces(a)lists.wfu.edu escreveu: -----
Para: Gretl list <gretl-users(a)lists.wfu.edu>
De: Allin Cottrell
Enviado por: gretl-users-bounces(a)lists.wfu.edu
Data: 01/10/2014 16:50
Assunto: Re: [Gretl-users] Wildcard problem in the latest snapshot
On Wed, 1 Oct 2014, henrique.andrade(a)bb.com.br wrote:
> Dear Allin,
>
> I think the latest snapshot (Windows and Mac) introduced a problem with the
> use of wildcards. Please take a look at the following script:
>
> <hansl>
> open australia.gdt
>
> rename e2 e_m
> rename lpus lp_m
>
> list L = dataset - *_m
> </hansl>
>
> When I execute this script I get the error message: "Unexpected symbol '_'".
> (And this message are not marked for translation).
Thanks for the report. That's now fixed in CVS; snapshots will follow.
Allin
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
10 years, 2 months