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
X-12-ARIMA 64bits
by Carlos Andrade
Hello Gretl users,
I installed the 1.9.92 version of Gretl Linux x86_64 in Debian 8 AMD64.
Where do I find the x86_64 version of X-12-ARIMA for Gretl 1.9.92?
Thanks.
--
Atenciosamente,
Prof. Carlos A. S. de Andrade
LAPEA - Laboratório de Pesquisa em Economia Aplicada e Engenharia de
Produção
Universidade Federal de Campina Grande.
Centro de Humanidades
Unidade Acadêmica de Economia
9 years, 1 month
Package getQuandl
by Carlos Andrade
Hi all,
Dear list members, how to download databases using package getQuandl?
--
Atenciosamente,
Prof. Carlos A. S. de Andrade
LAPEA - Laboratório de Pesquisa em Economia Aplicada e Engenharia de
Produção
Universidade Federal de Campina Grande.
Centro de Humanidades
Unidade Acadêmica de Economia
9 years, 3 months
Estimation of a State Space Model with Exogenous Variables in the State Transition Equation
by Fernando Fernandes Neto
Hi there!
First of all, I sincerely would like to thank all involved people for
developing one of the greatest software ever seen.
Then, I'd like to tell that I'm very interested on implementing and
calibrating a special version of the following model in the paper that can
be accessed in the following link, which is a little bit different from
those that, apparently, the Kalman Filter extension of GRETL supports.
http://www.anpec.org.br/encontro/2013/files_I/i4-7b01bcfd8714bd9d509c0a2e...
Basically, in this paper, it is implemented and calibrated a State Space
model using a Kalman Filter, where exogenous variables appear in both
Measurement Equation and State Transition Equation.
Hence, I'd like to know if it is possible to implement and calibrate such
kind of model in GRETL. If yes, how would I do that?
Before any answer like: "go read the manual", I've spent hours reading and
implementing the examples given in there, and I've got no clue how to
implement this kind of model.
I was wondering trying to examine the exogenous variables as observables,
and including an identity relationship to bypass such limitation.
Any ideas on that?
Thanks in advance for any help given.
Best Regards,
Fernando Fernandes Neto,
PhD Candidate - Systems Engineering - University of São Paulo
9 years, 3 months
Re: [Gretl-users] Can not interpret data as panel
by Allin Cottrell
Quoting Lukas Rech:
"I am trying to do some work on CDS im my bachelor thesis. Therefore,
I downloaded stock price data from DataStream and transformed the data
such that in the first column is a variable that represents the time
dimension as well as the firm codes, which are numbers from 9 to 4631.
These numbers are firm tickers from a dataset of CDS spreads, which I
want to append with my stock price data. The CDS data can be read in
perfectly as panel data, but Gretl wont let the .xlsx file to be
interpreted as panel.
"Does anyone have an idea, what I am doing wrong and how I could
transform my data, such that Gretl can recognice the panel data
structure?"
Lukas's data file was too big too post to the list, but I've taken a
look at it myself and the answer is quite simple. One check gretl does
when you try to define a dataset as a panel via index variables is
that it counts the distinct values of the unit and time variables,
finds the product of these counts (call it 'P'), and compares it with
the total number of observations, N.
If P < N that means that the unit and time variables do not jointly
provide unique ID for the observations: somewhere in the dataset there
must be at least two observations sharing the same unit and time
values, so it's malformed as a panel.
In Lukas's case it turns out to be just the first two observations,
both of which have Time = 730908 and MapNum (unit) = 9. Delete one of
those rows and the data will be read as a panel OK.
(In gretl CVS I've now made the error message for this sort of case
more informative.)
Allin Cottrell
9 years, 4 months
Displaying Fixed Effect Coefficients in Panel Regression
by Steven Carter
I'm running a FE Panel model with about 150 groups over a one year period
(weekly data). I would like to view/copy the fixed effect coefficients for
the groups to use in an Excel simulation.
Help on getting these? Thanks!
9 years, 4 months
Loop not automatically ending when error?
by Wingenroth, Thorsten
Hi,
I tried the following script:
set echo off
set messages off
# sample function call
nulldata 1800
setobs 5 2008-01-01 # a daily dataset should be already in place
loop foreach a RHT TKA
string ausgabe = "Aktie " ~ "$a"
print ausgabe
series "$a"
$a = yahoo_price($a)
endloop
As you might guess, the idea is to download a couple of time series from yahoo.
Each series should receive the name of the stock.
However, apart from the fact that it is not working (I am happy to get help here, too),
I get the following error message:
> set messages off
> > # sample function call
> nulldata 1800
Sorry, this command is not available in loop mode
Error executing script: halting
> nulldata 1800
But I am not in loop mode! And the command "nulldate" is not in the loop!
To me, it seems that the loop is not finished when an error is raised.
When you want to replicate the error, you might need to comment out $a = yahoo_price($a), run it and then
remove the # and run again. Then again, comment out, run, remove the comment, run. The respective
error message appears only every second run.
Thanks for your help!
Kind regards,
Thorsten
9 years, 4 months