Fernando Fernandes Neto | 21 Aug 15:52 2015
Picon

Estimation of a State Space Model with Exogenous Variables in the State Transition Equation

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.


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
<div><div dir="ltr">Hi there!<div><br></div>
<div>First of all, I sincerely would like to thank all involved people for developing one of the greatest software ever seen.</div>
<div><br></div>
<div>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.</div>
<div><br></div>
<div>
<a href="http://www.anpec.org.br/encontro/2013/files_I/i4-7b01bcfd8714bd9d509c0a2e6113a6a3.pdf">http://www.anpec.org.br/encontro/2013/files_I/i4-7b01bcfd8714bd9d509c0a2e6113a6a3.pdf</a><br>
</div>
<div><br></div>
<div>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.</div>
<div><br></div>
<div>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?</div>
<div><br></div>
<div>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.&nbsp;</div>
<div><br></div>
<div>I was wondering trying to examine the exogenous variables as observables, and including an identity relationship to bypass such limitation.</div>
<div><br></div>
<div>Any ideas on that?</div>
<div><br></div>
<div>Thanks in advance for any help given.</div>
<div><br></div>
<div>Best Regards,</div>
<div><br></div>
<div>Fernando Fernandes Neto,</div>
<div>PhD Candidate - Systems Engineering - University of S&atilde;o Paulo</div>
</div></div>
Allin Cottrell | 11 Aug 19:06 2015
Picon

Re: Can not interpret data as panel

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
Steven Carter | 6 Aug 18:51 2015
Picon

Displaying Fixed Effect Coefficients in Panel Regression

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!
<div><div dir="ltr">I'm running a FE Panel model with about 150 groups over a one year period (weekly data).&nbsp; I would like to view/copy the fixed effect coefficients for the groups to use in an Excel simulation.<div><br></div>
<div>Help on getting these?&nbsp; Thanks!</div>
</div></div>
Wingenroth, Thorsten | 5 Aug 18:32 2015
Picon

Loop not automatically ending when error?

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

 

<div>
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi,<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">I tried the following script:<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">set echo off<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">set messages off<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US"># sample function call<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">nulldata 1800<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">setobs 5 2008-01-01&nbsp; # a daily dataset should be already in place<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal">loop foreach a RHT TKA<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; string ausgabe = "Aktie " ~ "$a"<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; print ausgabe<p></p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; <span lang="EN-US">series "$a"<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&nbsp;&nbsp;&nbsp; $a = yahoo_price($a)<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">endloop<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">As you might guess, the idea is to download a couple of time series from yahoo.<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">Each series should receive the name of the stock.<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">However, apart from the fact that it is not working (I am happy to get help here, too),<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">I get the following error message:<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">&gt; set messages off<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&gt; &gt; # sample function call<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&gt; nulldata 1800<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">Sorry, this command is not available in loop mode<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">Error executing script: halting<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">&gt; nulldata 1800<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">But I am not in loop mode! And the command &ldquo;nulldate&rdquo; is not in the loop!<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">To me, it seems that the loop is not finished when an error is raised.<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">When you want to replicate the error, you might need to comment out $a = yahoo_price($a), run it and then<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">remove the # and run again. Then again, comment out, run, remove the comment, run. The respective<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US">error message appears only every second run.<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks for your help!<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind regards,<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thorsten<p></p></span></p>
<p class="MsoNormal"><span lang="EN-US"><p>&nbsp;</p></span></p>
</div>
</div>
Stefan A. | 1 Aug 12:55 2015
Picon

Re: Impulse responses in gretl: levels or first differences?

Thanks for the confirmation, Jack!

(I just noticed that I hadn't replied to a message earlier this year
where you had helped me, too. Apologies and thanks for that, too!)

Stefan
Allin Cottrell | 31 Jul 19:42 2015
Picon

gretl snapshots

Hello all,

Sourceforge is gradually recovering from its meltdown of July 16, but 
there's still no write access to CVS, nor is there write access to the 
files area, so I can't up any new gretl snapshots there.

In the meantime up-to-date snapshots can be found at

Windows
http://ricardo.ecn.wfu.edu/pub/gretl/gretl_install.exe
http://ricardo.ecn.wfu.edu/pub/gretl/gretl_install-64.exe

Mac
http://ricardo.ecn.wfu.edu/pub/gretl/gretl-quartz.dmg.gz

Allin Cottrell
Carlos Andrade | 31 Jul 18:32 2015
Picon

X-12-ARIMA 64bits

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
<div><div dir="ltr">Hello Gretl users,<div>
<br clear="all"><div>I installed the 1.9.92 version of Gretl Linux x86_64 &nbsp;in Debian 8 AMD64. Where do I find the x86_64 version of X-12-ARIMA for Gretl 1.9.92?</div>
<div><br></div>
<div>Thanks.</div>-- <br><div class="gmail_signature">Atenciosamente,<br><br>Prof. Carlos A. S. de Andrade<br>LAPEA - Laborat&oacute;rio de Pesquisa em Economia Aplicada e Engenharia de Produ&ccedil;&atilde;o<br><div>Universidade Federal de Campina Grande.<br>
</div>
<div>Centro de Humanidades&nbsp;
&nbsp;</div>
<div>Unidade Acad&ecirc;mica de Economia</div>
</div>
</div>
</div></div>
Stefan A. | 31 Jul 14:58 2015
Picon

Impulse responses in gretl: levels or first differences?

Dear fellow gretl users,

I was wondering whether the impulse response functions for VEC models
in gretl are calculated in levels or in first differences? According to
the gretl guide, IRF are defined as the partial derivative of the
l.h.s. dependent variable divided by the partial derivative of an
orthogonalised shock. Since the VEC is represented similar to a VAR in
first differences (see eq. 27.2 in the gretl guide), with a vector
containing the variables in first differences on the l.h.s. and with an
error correction term containing in levels in the r.h.s. of the VEC
model equation, one might be lead to think that the impulse response
would be given in first differences. Am I correct in assuming that the
VEC is transformed to a VAR in levels (see eq. 27.1) prior to the
calculation of the IRF, though, so that the responses are in levels
also? (all of this is assuming that one puts the variables that enter
the model in levels in the GUI dialogue)

Thanks for your help and for writing such an amazing piece of software!
Stefan
JOSE FRANCISCO PERLES RIBES | 15 Jul 13:39 2015
Picon

[Angrist-Newey test and Chamberlain test]

Dear list:

Following the first code-steps in Gretl provided by Professor Schreiber and a SAS code provided by Professor Angrist (again, many thanks to both Professors for your attention), I have performed a solution in R (sorry, at the moment I'm more familiar with this language) to this issue.

The code is weird, but is written with the aim to show the step-by-step process and check the intermediate results.

If someone is interested in this topic, the data and my code could be downloaded from 


Please, be sure that any error is mine. I would be grateful for suggestions, improvements and corrections.

Thanks a lot for your attention and best regards

José Perles
University of Alicante



<div><div dir="ltr">Dear list:<div><br></div>
<div>Following the first code-steps in Gretl provided by Professor Schreiber and a SAS code provided by Professor Angrist (again, many thanks to both Professors for your attention), I have performed a solution in R (sorry, at the moment I'm more familiar with this language) to this issue.</div>
<div><br></div>
<div>The code is weird, but is written with the aim to show the step-by-step process and check the intermediate results.</div>
<div><br></div>
<div>If someone is interested in this topic, the data and my code could be downloaded from&nbsp;</div>
<div><br></div>
<div><a href="https://github.com/Joseperles/Statistical-questions/tree/master/Baltagi/My%20solution">https://github.com/Joseperles/Statistical-questions/tree/master/Baltagi/My%20solution</a></div>
<div><br></div>
<div>Please, be sure that any error is mine. I would be grateful for suggestions, improvements and corrections.</div>
<div><br></div>
<div>Thanks a lot for your attention and best regards</div>
<div><br></div>
<div>Jos&eacute; Perles</div>
<div>University of Alicante</div>
<div><br></div>
<div><br></div>
<div><br></div>
</div></div>
Sven Schreiber | 15 Jul 10:21 2015
Picon
Picon

Re: Fwd: Re: Your paper in JBES 1991

Hi,

please keep the discussion on the mailing list (I added it again here).

 From what you describe it sounds as if, yes, gretl has all these tools. 
But right now I don't have the time to implement this any further or to 
do the bug-hunting. I already gave you something that was working as a 
starting point. I'm afraid you're on your own for now. Or perhaps 
somebody else on the list is interested.

good luck,
sven

Am 15.07.2015 um 08:25 schrieb JOSE FRANCISCO PERLES RIBES:
> Dear Professor:
>
> Sorry for disturb you with this issue, but I send this mail only to
> update the information and to do a small question.
>
> After my request, professor Angrist very kindly has send me some files
> with a SAS programme to calculate the Angrist-Newet (1991) test.
>
> In the pdf_III pages 2 and 3 there is a detailed procedure to get the X2
> statistic.
>
> I have seen the relevant steps as:
>
> 1).-Compute the variables in means deviation. (page 2)
> 2).-regress a fixed effect model using as "endogenous" variables the
> means deviation transformation and save the residuals. (page 3)
> 3).-regress the residuals for each time on lags and leads of all orginal
> variables (non-transformed) **computation 3sls statistics** (page 3)
>
>
> To estimate the fixed-effect model and the test statistics he uses a SAS
> procedure based on 3SLS estimation named "PROC SYSLIN SUR VARDEF=n"
>
> So, my question is: Gretl has this kind of system estimation? or its fe
> routine leads would lead to simmilar results (as I think)?
>
> Also, looking for the Angrist code, I think the script your provide me
> to calculate the X2 statistic was correct. But would you mind to see the
> Angrist code to see if I need to adjust some of the script? Because I
> found a problem with the number of parameters estimation.
>
> Many thanks for your attention and sorry for any inconvenience.
>
> José Perles
> University of Alicante.
>

_______________________________________________
Gretl-users mailing list
Gretl-users <at> lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
Raul Gimeno | 13 Jul 15:08 2015
Picon

AR(3) calculation

First of all thank to all of you Sven, Riccardo and Ignacio

I could fix the problem.
Would it be possible to create a database with scripts so that people can
have access to fixed scripts which would be of great help for beginners.
Please find below the output of my simulation. It is not clear to me why I
get U = 0 for the first three observations (1-3). Below the script you'll
find my calculations done manually with different results. Attached the
Excel-file with my calculations.
Best regards
Raul
_______________________________________
# Defines length of time-series
? nulldata 20
periodicity: 1, maxobs: 20
observations range: 1 to 20
? setobs 1 1 --time-series
Full data range: 1 - 20 (n = 20)

# build stationary AR(3) error process for u ? 
scalar rho1 = 0.5 Generated scalar rho1 = 0.5 ? 
scalar rho2 = -0.3 Generated scalar rho2 = -0.3 ? 
scalar rho3 = 0.2 Generated scalar rho3 = 0.2 ? 
series u = 0 Generated series u (ID 2) ? 
series e = normal() Generated series e (ID 3) ? 
u = rho1*u(-1) + rho2*u(-2) + rho3*u(-3) + e Replaced series u (ID 2) ? 
print u e

u:
Full data range: 1 - 20 (n = 20)

 0.000000   0.000000   0.000000   0.736134   0.389876   0.0831032   1.27225

 0.296186   0.153867  -0.603212  -1.03987  -0.125745   1.05383   1.36702  
 1.38835   1.15469   0.0756820   0.396671  -0.373264  -0.802060  

e:
Full data range: 1 - 20 (n = 20)

-0.191291   1.79901   0.222606   0.736134   0.0218093   0.109005   1.20043  
-0.392982   0.370828  -0.845739  -0.751339   0.182452   0.925386   1.01036  
 1.04614   0.659854  -0.358562   0.427566  -0.779833  -0.511563  
_____________________________________________________________
My calculations
	U	                     e
t-3	0	
t-2	0	
t-1	0	
0	-0.191291	-0.191291
t+1	1.7033645	1.79901

-----Urspr?ngliche Nachricht-----
Von: gretl-users-bounces@...
[mailto:gretl-users-bounces@...] Im Auftrag von
gretl-users-request@...
Gesendet: Freitag, 10. Juli 2015 18:00
An: gretl-users@...
Betreff: Gretl-users Digest, Vol 102, Issue 3

Send Gretl-users mailing list submissions to
	gretl-users@...

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.wfu.edu/mailman/listinfo/gretl-users
or, via email, send a message with subject or body 'help' to
	gretl-users-request@...

You can reach the person managing the list at
	gretl-users-owner@...

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Gretl-users digest..."

Today's Topics:

   1. generate AR (Raul Gimeno)
   2. Re: generate AR (Sven Schreiber)
   3. Re: generate AR (Riccardo (Jack) Lucchetti)
   4. Re: generate AR (Ignacio Diaz-Emparanza)

----------------------------------------------------------------------

Message: 1
Date: Fri, 10 Jul 2015 09:46:51 +0200
From: "Raul Gimeno" <mrexito@...>
To: <gretl-users@...>
Subject: [Gretl-users] generate AR
Message-ID: <003101d0bae4$95777c50$c06674f0$ <at> vtxmail.ch>
Content-Type: text/plain; charset="us-ascii"

Hello

I would like to generate AR, MA and ARMA processes. Is there any function
available to do so?

Would it be possible to include in the GRETL guide a note on how to generate
simple time series? This could be of great help for beginners.

I've tried to generate an AR(3) with the following script which doesn't
work. Thank you for your help.

Raul

# seed 

set seed 89675430

# Generate an AR(3) process

scalar rho1 = 0.5

scalar rho2 = -0.3

scalar rho3 = 0.2

loop 1000

# build stationary AR(3) error process for u

    series u = 0

    series e = normal()

    u = rho1*u(-1) + rho2*u(-2) + rho3*u(-3) + e

endloop

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.wfu.edu/pipermail/gretl-users/attachments/20150710/9b51a080/at
tachment-0001.html>

------------------------------

Message: 2
Date: Fri, 10 Jul 2015 14:59:27 +0200
From: Sven Schreiber <svetosch@...>
To: gretl-users@...
Subject: Re: [Gretl-users] generate AR
Message-ID: <559FC1AF.9050707@...>
Content-Type: text/plain; charset=windows-1252

Am 10.07.2015 um 09:46 schrieb Raul Gimeno:
> Hello
> 
>  
> 
> I would like to generate AR, MA and ARMA processes. Is there any 
> function available to do so?

There is 'varsimul' which you could use also univariate AR, but it's
probably not the best way for your problem. Apart from that, specifying the
data-generating process like you tried below is the right approach.

> 
> Would it be possible to include in the GRETL guide a note on how to 
> generate simple time series? This could be of great help for beginners.
> 
> I?ve tried to generate an AR(3) with the following script which 
> doesn?t work. Thank you for your help.

"doesn't work" is a typical but almost useless component of problem reports.
Please copy&paste the error message you're getting.

> 
> # build stationary AR(3) error process for u
> 
>     series u = 0
> 
>     series e = normal()
> 
>     u = rho1*u(-1) + rho2*u(-2) + rho3*u(-3) + e
> 

This already looks quite good. Perhaps you don't have a dataset in place?
Again, report your error message.

-sven

------------------------------

Message: 3
Date: Fri, 10 Jul 2015 15:09:33 +0200 (CEST)
From: "Riccardo (Jack) Lucchetti" <r.lucchetti@...>
To: Gretl list <gretl-users@...>
Subject: Re: [Gretl-users] generate AR
Message-ID: <alpine.DEB.2.20.1507101509140.17956@...>
Content-Type: text/plain; charset="iso-8859-15"; Format="flowed"

On Fri, 10 Jul 2015, Raul Gimeno wrote:

> Hello
>
>
>
> I would like to generate AR, MA and ARMA processes. Is there any 
> function available to do so?
>
> Would it be possible to include in the GRETL guide a note on how to 
> generate simple time series? This could be of great help for beginners.

Section 16.2

-------------------------------------------------------
   Riccardo (Jack) Lucchetti
   Dipartimento di Scienze Economiche e Sociali (DiSES)

   Universit? Politecnica delle Marche
   (formerly known as Universit? di Ancona)

   r.lucchetti@...
   http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------

------------------------------

Message: 4
Date: Fri, 10 Jul 2015 15:53:00 +0200
From: Ignacio Diaz-Emparanza <ignacio.diaz-emparanza@...>
To: gretl-users@...
Subject: Re: [Gretl-users] generate AR
Message-ID: <559FCE3C.8080100@...>
Content-Type: text/plain; charset=windows-1252; format=flowed

El 10/07/15 a las 09:46, Raul Gimeno escribi?:
>
> Hello
>
> I would like to generate AR, MA and ARMA processes. Is there any 
> function available to do so?
>
> Would it be possible to include in the GRETL guide a note on how to 
> generate simple time series? This could be of great help for beginners.
>
> I?ve tried to generate an AR(3) with the following script which 
> doesn?t work. Thank you for your help.
>
> Raul
>

For simulated data you need to inform gretl the length of your time series,
with the first command

'nulldata 200'

For example this reserves space for series with 200 obs.
It may be useful also to inform that you plan to generate "time series" 
this may be done with the command 'setobs' in this way:

'setobs 1 1 --time-series'

the first number is the seasonal periodicity (1 if you are making simulated
data) the second one determines which is the first observation. The
parameter --time-series makes posiible to use some gretl features specific
for time series.

Your script with these two commands works here.

> # seed
>
> set seed 89675430
>
> # Generate an AR(3) process
>
> scalar rho1 = 0.5
>
> scalar rho2 = -0.3
>
> scalar rho3 = 0.2
>
> loop 1000
>
> # build stationary AR(3) error process for u
>
> series u = 0
>
>     series e = normal()
>
>     u = rho1*u(-1) + rho2*u(-2) + rho3*u(-3) + e
>
> endloop
>
>
>
> _______________________________________________
> Gretl-users mailing list
> Gretl-users@...
> http://lists.wfu.edu/mailman/listinfo/gretl-users

--
Ignacio D?az-Emparanza
Departamento de Econom?a Aplicada III (Econometr?a y Estad?stica)
Universidad del Pa?s Vasco - Euskalherriko Unibertsitatea, UPV/EHU
Tfno: (+34) 94 601 3732
http://www.ehu.eus/ea3

------------------------------

_______________________________________________
Gretl-users mailing list
Gretl-users@...
http://lists.wfu.edu/mailman/listinfo/gretl-users

End of Gretl-users Digest, Vol 102, Issue 3
*******************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AR(3).xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 8933 bytes
Desc: not available
URL:
<http://lists.wfu.edu/pipermail/gretl-users/attachments/20150711/fd3521f0/at
tachment-0001.xlsx>

------------------------------

Message: 2
Date: Sat, 11 Jul 2015 11:00:52 +0200
From: Sven Schreiber <svetosch@...>
To: gretl-users@...
Subject: Re: [Gretl-users] Gretl-users Digest, Vol 102, Issue 3
Message-ID: <55A0DB44.1040905@...>
Content-Type: text/plain; charset=windows-1252

Am 11.07.2015 um 10:10 schrieb Raul Gimeno:
> First of all thank to all of you Sven, Riccardo and Ignacio
> 
> I could fix the problem.
> Would it be possible to create a database with scripts so that people 
> can have access to fixed scripts which would be of great help for
beginners.

Menu: File -> script files -> exercise files (or Castilian or Basque
translation thereof)

> Please find below the output of my simulation. It is not clear to me 
> why I get U = 0 for the first three observations (1-3). Below the 
> script you'll find my calculations done manually with different results.

only the numbering of the first 3 are different. Where do you expect gretl
to store the t-1/ t-2 / t-3 starting values if not at the beginning? Does
your excel sheet say "t-1" for the 3rd row or column?
(no, of course not)

cheers,
sven

------------------------------

_______________________________________________
Gretl-users mailing list
Gretl-users@...
http://lists.wfu.edu/mailman/listinfo/gretl-users

End of Gretl-users Digest, Vol 102, Issue 4
*******************************************
Attachment (AR(3).xlsx): application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, 11 KiB
First of all thank to all of you Sven, Riccardo and Ignacio

I could fix the problem.
Would it be possible to create a database with scripts so that people can
have access to fixed scripts which would be of great help for beginners.
Please find below the output of my simulation. It is not clear to me why I
get U = 0 for the first three observations (1-3). Below the script you'll
find my calculations done manually with different results. Attached the
Excel-file with my calculations.
Best regards
Raul
_______________________________________
# Defines length of time-series
? nulldata 20
periodicity: 1, maxobs: 20
observations range: 1 to 20
? setobs 1 1 --time-series
Full data range: 1 - 20 (n = 20)

# build stationary AR(3) error process for u ? 
scalar rho1 = 0.5 Generated scalar rho1 = 0.5 ? 
scalar rho2 = -0.3 Generated scalar rho2 = -0.3 ? 
scalar rho3 = 0.2 Generated scalar rho3 = 0.2 ? 
series u = 0 Generated series u (ID 2) ? 
series e = normal() Generated series e (ID 3) ? 
u = rho1*u(-1) + rho2*u(-2) + rho3*u(-3) + e Replaced series u (ID 2) ? 
print u e

u:
Full data range: 1 - 20 (n = 20)

 0.000000   0.000000   0.000000   0.736134   0.389876   0.0831032   1.27225

 0.296186   0.153867  -0.603212  -1.03987  -0.125745   1.05383   1.36702  
 1.38835   1.15469   0.0756820   0.396671  -0.373264  -0.802060  

e:
Full data range: 1 - 20 (n = 20)

-0.191291   1.79901   0.222606   0.736134   0.0218093   0.109005   1.20043  
-0.392982   0.370828  -0.845739  -0.751339   0.182452   0.925386   1.01036  
 1.04614   0.659854  -0.358562   0.427566  -0.779833  -0.511563  
_____________________________________________________________
My calculations
	U	                     e
t-3	0	
t-2	0	
t-1	0	
0	-0.191291	-0.191291
t+1	1.7033645	1.79901

-----Urspr?ngliche Nachricht-----
Von: gretl-users-bounces@...
[mailto:gretl-users-bounces@...] Im Auftrag von
gretl-users-request@...
Gesendet: Freitag, 10. Juli 2015 18:00
An: gretl-users@...
Betreff: Gretl-users Digest, Vol 102, Issue 3

Send Gretl-users mailing list submissions to
	gretl-users@...

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.wfu.edu/mailman/listinfo/gretl-users
or, via email, send a message with subject or body 'help' to
	gretl-users-request@...

You can reach the person managing the list at
	gretl-users-owner@...

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Gretl-users digest..."

Today's Topics:

   1. generate AR (Raul Gimeno)
   2. Re: generate AR (Sven Schreiber)
   3. Re: generate AR (Riccardo (Jack) Lucchetti)
   4. Re: generate AR (Ignacio Diaz-Emparanza)

----------------------------------------------------------------------

Message: 1
Date: Fri, 10 Jul 2015 09:46:51 +0200
From: "Raul Gimeno" <mrexito@...>
To: <gretl-users@...>
Subject: [Gretl-users] generate AR
Message-ID: <003101d0bae4$95777c50$c06674f0$ <at> vtxmail.ch>
Content-Type: text/plain; charset="us-ascii"

Hello

I would like to generate AR, MA and ARMA processes. Is there any function
available to do so?

Would it be possible to include in the GRETL guide a note on how to generate
simple time series? This could be of great help for beginners.

I've tried to generate an AR(3) with the following script which doesn't
work. Thank you for your help.

Raul

# seed 

set seed 89675430

# Generate an AR(3) process

scalar rho1 = 0.5

scalar rho2 = -0.3

scalar rho3 = 0.2

loop 1000

# build stationary AR(3) error process for u

    series u = 0

    series e = normal()

    u = rho1*u(-1) + rho2*u(-2) + rho3*u(-3) + e

endloop

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.wfu.edu/pipermail/gretl-users/attachments/20150710/9b51a080/at
tachment-0001.html>

------------------------------

Message: 2
Date: Fri, 10 Jul 2015 14:59:27 +0200
From: Sven Schreiber <svetosch@...>
To: gretl-users@...
Subject: Re: [Gretl-users] generate AR
Message-ID: <559FC1AF.9050707@...>
Content-Type: text/plain; charset=windows-1252

Am 10.07.2015 um 09:46 schrieb Raul Gimeno:
> Hello
> 
>  
> 
> I would like to generate AR, MA and ARMA processes. Is there any 
> function available to do so?

There is 'varsimul' which you could use also univariate AR, but it's
probably not the best way for your problem. Apart from that, specifying the
data-generating process like you tried below is the right approach.

> 
> Would it be possible to include in the GRETL guide a note on how to 
> generate simple time series? This could be of great help for beginners.
> 
> I?ve tried to generate an AR(3) with the following script which 
> doesn?t work. Thank you for your help.

"doesn't work" is a typical but almost useless component of problem reports.
Please copy&paste the error message you're getting.

> 
> # build stationary AR(3) error process for u
> 
>     series u = 0
> 
>     series e = normal()
> 
>     u = rho1*u(-1) + rho2*u(-2) + rho3*u(-3) + e
> 

This already looks quite good. Perhaps you don't have a dataset in place?
Again, report your error message.

-sven

------------------------------

Message: 3
Date: Fri, 10 Jul 2015 15:09:33 +0200 (CEST)
From: "Riccardo (Jack) Lucchetti" <r.lucchetti@...>
To: Gretl list <gretl-users@...>
Subject: Re: [Gretl-users] generate AR
Message-ID: <alpine.DEB.2.20.1507101509140.17956@...>
Content-Type: text/plain; charset="iso-8859-15"; Format="flowed"

On Fri, 10 Jul 2015, Raul Gimeno wrote:

> Hello
>
>
>
> I would like to generate AR, MA and ARMA processes. Is there any 
> function available to do so?
>
> Would it be possible to include in the GRETL guide a note on how to 
> generate simple time series? This could be of great help for beginners.

Section 16.2

-------------------------------------------------------
   Riccardo (Jack) Lucchetti
   Dipartimento di Scienze Economiche e Sociali (DiSES)

   Universit? Politecnica delle Marche
   (formerly known as Universit? di Ancona)

   r.lucchetti@...
   http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------

------------------------------

Message: 4
Date: Fri, 10 Jul 2015 15:53:00 +0200
From: Ignacio Diaz-Emparanza <ignacio.diaz-emparanza@...>
To: gretl-users@...
Subject: Re: [Gretl-users] generate AR
Message-ID: <559FCE3C.8080100@...>
Content-Type: text/plain; charset=windows-1252; format=flowed

El 10/07/15 a las 09:46, Raul Gimeno escribi?:
>
> Hello
>
> I would like to generate AR, MA and ARMA processes. Is there any 
> function available to do so?
>
> Would it be possible to include in the GRETL guide a note on how to 
> generate simple time series? This could be of great help for beginners.
>
> I?ve tried to generate an AR(3) with the following script which 
> doesn?t work. Thank you for your help.
>
> Raul
>

For simulated data you need to inform gretl the length of your time series,
with the first command

'nulldata 200'

For example this reserves space for series with 200 obs.
It may be useful also to inform that you plan to generate "time series" 
this may be done with the command 'setobs' in this way:

'setobs 1 1 --time-series'

the first number is the seasonal periodicity (1 if you are making simulated
data) the second one determines which is the first observation. The
parameter --time-series makes posiible to use some gretl features specific
for time series.

Your script with these two commands works here.

> # seed
>
> set seed 89675430
>
> # Generate an AR(3) process
>
> scalar rho1 = 0.5
>
> scalar rho2 = -0.3
>
> scalar rho3 = 0.2
>
> loop 1000
>
> # build stationary AR(3) error process for u
>
> series u = 0
>
>     series e = normal()
>
>     u = rho1*u(-1) + rho2*u(-2) + rho3*u(-3) + e
>
> endloop
>
>
>
> _______________________________________________
> Gretl-users mailing list
> Gretl-users@...
> http://lists.wfu.edu/mailman/listinfo/gretl-users

--
Ignacio D?az-Emparanza
Departamento de Econom?a Aplicada III (Econometr?a y Estad?stica)
Universidad del Pa?s Vasco - Euskalherriko Unibertsitatea, UPV/EHU
Tfno: (+34) 94 601 3732
http://www.ehu.eus/ea3

------------------------------

_______________________________________________
Gretl-users mailing list
Gretl-users@...
http://lists.wfu.edu/mailman/listinfo/gretl-users

End of Gretl-users Digest, Vol 102, Issue 3
*******************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AR(3).xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 8933 bytes
Desc: not available
URL:
<http://lists.wfu.edu/pipermail/gretl-users/attachments/20150711/fd3521f0/at
tachment-0001.xlsx>

------------------------------

Message: 2
Date: Sat, 11 Jul 2015 11:00:52 +0200
From: Sven Schreiber <svetosch@...>
To: gretl-users@...
Subject: Re: [Gretl-users] Gretl-users Digest, Vol 102, Issue 3
Message-ID: <55A0DB44.1040905@...>
Content-Type: text/plain; charset=windows-1252

Am 11.07.2015 um 10:10 schrieb Raul Gimeno:
> First of all thank to all of you Sven, Riccardo and Ignacio
> 
> I could fix the problem.
> Would it be possible to create a database with scripts so that people 
> can have access to fixed scripts which would be of great help for
beginners.

Menu: File -> script files -> exercise files (or Castilian or Basque
translation thereof)

> Please find below the output of my simulation. It is not clear to me 
> why I get U = 0 for the first three observations (1-3). Below the 
> script you'll find my calculations done manually with different results.

only the numbering of the first 3 are different. Where do you expect gretl
to store the t-1/ t-2 / t-3 starting values if not at the beginning? Does
your excel sheet say "t-1" for the 3rd row or column?
(no, of course not)

cheers,
sven

------------------------------

_______________________________________________
Gretl-users mailing list
Gretl-users@...
http://lists.wfu.edu/mailman/listinfo/gretl-users

End of Gretl-users Digest, Vol 102, Issue 4
*******************************************

Gmane