I want to express my
congratulations to Professor A. Cottrell and Professor R. Lucchetti for the awesome
gretl software. I'm studying the manual and it's impressive.
I have written this code
in order to estimate an ARMA(1,1) model on I(0)
time series using a moving window which uses only the last 20 values from the
time series, "forgetting" gradually all the past information older
than last 20 values.
The code (n = 1057):
smpl 1 20
loop for i = 1..1057
arima
1 0 1 ; ld_Close
smpl
+1 +1
endloop
Now I will try to create
two new variables which are the AR(1) and MA(1) coefficients. Do you suggest me
to use genr
to create these variables?
Does the command
genr c = $coeff
could allow me to create
such a time series of coefficients?
Thank you,
Oscar
-----Messaggio originale-----
Da: gretl-users-bounces@lists.wfu.edu
[mailto:gretl-users-bounces@lists.wfu.edu] Per conto di Allin Cottrell
Inviato: Thursday, 26 May 2011 5:38 PM
A: Gretl list
Oggetto: Re: [Gretl-users] R: Rolling parameter estimate
On Thu, 26 May 2011, Oscar Soppelsa wrote:
> Thank Artur and Riccardo very much for your answer! I've two
question now:
>
> 1. could you explain me the syntax about the selection of the
sample's
> dimension? What does this mean? ---> i=1982:1..1987:3
One standard form of loop in gretl uses the construction
loop i=1..10
which should be self-explanatory (but is also explained in the
manual). The variant above uses the convenience functionality of
representing integer observations numbers as dates (in this case,
quarterly dates).
> 2. After the rolling parameters estimation, how can I print on the
monitor a
> vertical array whose elements are coefficients, std. errors, z,
p-values
> etc.? I would need to export this array in Excel, for example.
Regression coefficients and standard errors are accessible in
matrix form as $coeff and $stderr, after estimating a model.
z-scores and p-values can easily be computed -- see the pvalue()
function. Matrices can be concatenated and reshaped at will, see
the chapter on matrices in the User's Guide. They can also be
printed in whatever form is appropriate - see the "printf"
command.
Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users