Re: [Gretl-users] Loop question
by Kehl D ániel
Dear Henrique,
you have to simply follow the syntax. Take a look at Chapter 9 in the User's Guide (Help/User's guide in the menu). Simple example on page 60 will help!
Best wishes
Daniel
-----Original Message-----
From: Henrique Andrade <henrique.coelho(a)gmail.com>
To: Gretl list <gretl-users(a)lists.wfu.edu>
Date: Tue, 25 May 2010 16:53:54 -0300
Subject: Re: [Gretl-users] Loop question
Dear Riccardo, Kehl and Artur,
Thanks a lot for your help! I'd tried all the options you gave me and
my final script looks like this:
<script>
scalar n=0
loop for (n=6;n<=24;n=n*2) --quiet
scalar m = $T - n + 1
loop j=2..nelemY --quiet
matrix R$n_$j = zeros(m,1)
loop i=1..m --quiet
loop c=1..n --quiet
row = i + n - c
R$n_$j[i] += r$j[row, c]
endloop
endloop
endloop
matrix mci$n = R$n_2 + R$n_3
endloop
</script>
Now, because I just need the values for 6, 12 and 24, I'm trying to
substitute the second line "loop for (n=6;n<=24;n=n*2)" for this:
loop for (n=6;n=12;n=24)
But the script isn't working. Any hints?
Best regards,
Henrique
2010/5/25 artur bala <artur.bala(a)laposte.net>
> Or, if your index is something like of a geometric series as it seems to
> be (let's say 6, 12, 24, 48, and so on) and too long to do manually
> you can try this one:
> <script>
> scalar count=0
> loop for (count=6;count<=24;count=count*2) --quiet
> <instructions>
> endloop
> <\script>
>
> cheers,
> artur
>
> Riccardo (Jack) Lucchetti a écrit :
> > On Tue, 25 May 2010, Henrique Andrade wrote:
> >
> >> Dear Gretl Community,
> >>
> >> I'm trying to use a loop index inside a script but I don't know how.
> >> According
> >> to "Gretl User’s Guide" the syntax looks like this:
> >>
> >> loop i=1..24
> >>
> >> But I just need the points where "i" is equal to 6, 12 and 24.
> >> Something like this:
> >>
> >> loop i=6;12;24
> >>
> >> How can I do that?
> >
> > For example, this way:
> > <script>
> > matrix foo = { 6, 12, 24 }
> > n = cols(foo)
> > loop for i=1..n
> > bar = foo[i]
> > print bar
> > end loop
> > </script>
> >
> >
> > Riccardo (Jack) Lucchetti
> > Dipartimento di Economia
> > Università Politecnica delle Marche
> >
> > r.lucchetti(a)univpm.it
> > http://www.econ.univpm.it/lucchetti
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Gretl-users mailing list
> > Gretl-users(a)lists.wfu.edu
> > http://lists.wfu.edu/mailman/listinfo/gretl-users
>
>
> _______________________________________________
> Gretl-users mailing list
> Gretl-users(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>
--
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
14 years, 7 months
Instumental variables
by Claudio Shikida (敷田治誠 クラウジオ)
Hello to all,
Straight to the point. I converted an old Eviews file to Gretl. The series
were ok, all was going well. They are time series. I updated the series and
generated the logs, d(logs) and also logs(-k) and dlogs(-k). All of this was
fine. So I went to the Instrumental Variables in order to estimate a Bewley
version of a cointegration relationship. It means I have to use logs(-k) as
instruments. Here is the problem: Gretl doesn´t show the logs(-k), neither
dlogs(-k) as options to put into the model. So I tried to created them in
this menu. New failure.
Shortly: instrumental variables just shows me the original variables and
when I try to enter the lags of several of them as instruments, I can´t. I
presume I can change the name of the variables and solve this, but I would
like to know, first, if I am doing some foolish stuff.
Thank you so much for your time and attention
Claudio
--
http://shikida.net and http://works.bepress.com/claudio_shikida/
Esta mensagem pode conter informação confidencial e/ou privilegiada. Se você
não for o destinatário ou a pessoa autorizada a receber esta mensagem, não
poderá usar, copiar ou divulgar as informações nela contidas ou tomar
qualquer ação baseada nessas informações. Se você recebeu esta mensagem por
engano, por favor avise imediatamente o remetente, respondendo o presente
e-mail e apague-o em seguida.
This message may contain confidential and/or privileged information. If you
are not the addressee or authorized to receive this for the addressee, you
must not use, copy, disclose or take any action based on this message or any
information herein. If you have received this message in error, please
advise the sender immediately by reply e-mail and delete this message.
14 years, 7 months
Re: [Gretl-users] Loop question
by Kehl D ániel
Or alternatively you can try
loop i=1..n
and use 6*i inside the loop if you need the numbers you wrote as an example.
daniel
-----Original Message-----
From: "Riccardo (Jack) Lucchetti" <r.lucchetti(a)univpm.it>
To: Gretl list <gretl-users(a)lists.wfu.edu>
Date: Tue, 25 May 2010 08:08:26 +0200 (CEST)
Subject: Re: [Gretl-users] Loop question
On Tue, 25 May 2010, Henrique Andrade wrote:
> Dear Gretl Community,
>
> I'm trying to use a loop index inside a script but I don't know how. According
> to "Gretl User’s Guide" the syntax looks like this:
>
> loop i=1..24
>
> But I just need the points where "i" is equal to 6, 12 and 24. Something like this:
>
> loop i=6;12;24
>
> How can I do that?
For example, this way:
<script>
matrix foo = { 6, 12, 24 }
n = cols(foo)
loop for i=1..n
bar = foo[i]
print bar
end loop
</script>
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti
14 years, 7 months
Feature List question
by Josiah Augenstein
I am working on a research project with a professor of mine and I am trying
to model the program we have written with GRETL. By that I mean I want to
see if GRETL has all the same functionality and see if our numbers match up
reasonably well.
The feature list I am trying to emulate is as follows.
1. Box & Jenkins for PACF
2. Least Squares PACF from Box and Jenkins
3. Thetas for MA using Innovation Algorithm
4. AIC - Pena
5. BIC - Brock
6. SIC - Shum
7. AIC checking AR(p) Brockwell
8. Differencing
9. Yule Walker initial estimate
10. ARMA using Innovation Algorithm
I have found some of the equivalents through playing around with the
program. There are also several repeats of the functions that I omitted.
Thanks for your time:)
--
Josiah
14 years, 7 months
Bug in quantile reg output export routine and a question in terms of DEVIANCE
by Pindar
Hi there,
I guess there is a small bug: I can only copy the output of a quantile reg
as plain text, all other formats crush.
More important is my question, whether it would be possible to add the
deviance
goodness of fit measure to all non linear models?
I wrote a little functions that does calculating it, but it rather tedious
and printing the deviance
directly in the output window of the regression would be really great.
Best regards
Pindar
14 years, 7 months
How to to the de-meaning by hand for fixed effects models
by Pindar
Hi there,
I need some help with the code in order to de-mean the data for each unit
and variable of interest.
It's a task in my microeconometric lecture. Unfortunately I did not succeed
in writing the right loop command.
Thanks a lot
Pindar
14 years, 7 months
Not loading import files ( ods, xls, etc. )
by Julio Acuña
Greetings,
I've compiled gretl 1.9.0, but it is unnable to import files. I'm running an Ubuntu 9.04, amd64 system.
By the way, when I run the lt-nistcheck -v i get the following message:
Couldn't open Norris.dat
Error processing Norris.dat
Couldn't open Pontius.dat
Error processing Pontius.dat
Couldn't open NoInt1.dat
Error processing NoInt1.dat
Couldn't open NoInt2.dat
Error processing NoInt2.dat
Couldn't open Filip.dat
Error processing Filip.dat
Couldn't open Longley.dat
Error processing Longley.dat
Couldn't open Wampler1.dat
Error processing Wampler1.dat
Couldn't open Wampler2.dat
Error processing Wampler2.dat
Couldn't open Wampler3.dat
Error processing Wampler3.dat
Couldn't open Wampler4.dat
Error processing Wampler4.dat
Couldn't open Wampler5.dat
Error processing Wampler5.dat
Summary of NIST linear regression test results:
* number of tests carried out: 0
* reference data files missing or corrupted: 11
* unexpected errors in estimation of models: 0
* poor or unacceptable results with libgretl: 0
* cases where results from the gretl GMP plugin disagreed with the NIST
certified values, at 12 significant figures: 0
Thanks in advance!
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969
14 years, 7 months
gretl build on windows
by RAZIA HAIDER
Hi,
I am trying to build Gretl on windows xp. It partially runs and have
following errors now.
make -C mo
make[1]: Entering directory `/c/msys/1.0/home/razia/gretl-1.9.0/win32/mo'
C:/ProgramFiles/GnuWin32/bin/msgfmt.exe -o de.mo ../../po/de.po
make[1]: C:/ProgramFiles/GnuWin32/bin/msgfmt.exe: Command not found
make[1]: *** [de.mo] Error 127
make[1]: Leaving directory `/c/msys/1.0/home/razia/gretl-1.9.0/win32/mo'
make: *** [mo/de.po] Error 2
I installed *Get Text package* and give its path in *config.mk*, but still
having same error.
Can anybody please help me in this regard.
Thanks in advance.
Cioa
Haider.
14 years, 7 months
Gretl and X-12-ARIMA
by Julio Acuña
I'm having a hard time trying to install X-12-ARIMA on my system:
Amd64, Ubuntu 9.04.
Basically all available executables for X-12-ARIMA where compiled on different systems and do not run on mine.
I tried forcing core architecture, eetc. but still the X-12 option under gretl is not working
When I visited the official website I downloaded the Binari file ( X-12-ARIMA ) and guess what? I need a fortran compiler which i'm not familiarized with and not only that, I'm also unnable to install the proper fortran compiler .
If there's anyone who know what's going on I'd be very thankful.
( I've been searching how to run x-12-arima for a day and i'm running out of time :P)
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
https://signup.live.com/signup.aspx?id=60969
14 years, 7 months