Examples of Gretl scripts
by Carlos Andrade

Dear All,
Where to get examples of Gretl scripts for different types of analysis?
--
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
6 years, 10 months

Re: [Gretl-users] GARCH, Forecasting
by Allin Cottrell

On Mon, 17 Jan 2011, [ISO-8859-1] Alejandro Mosi�o wrote:
> Maybe i was not too much specific last time:
>
> I have a variable "y" that follows a GARCH(1,1) process. Then, i Gretl i
> type:
>
> garch 1 1 ; y const
>
> Then i got the result and forecasting the out-of-sample values of y can
> be done in the usual way. However, i'm interested in forecasting the
> out-of-sample variance. I don't know if such a function exists in Gretl.
There is no built-in function to do this, but you can compute a
one-step ahead forecast of the variance from the model data, as
hown in the following example script.
<script>
open b-g.gdt
garch 1 1 ; Y
series e = $uhat
series h = $h
dataset addobs 10
a0 = $coeff[2]
a1 = $coeff[3]
b1 = $coeff[4]
series hfc = h
# set future errors to their expectation
e = misszero(e)
# forecast the variance
hfc = a0 + a1 * e(-1)^2 + b1 * hfc(-1)
smpl 1970 ;
print e h hfc --byobs
</script>
Allin Cottrell
7 years, 3 months

Exponential Moving average function
by Pankaj Jagota

Good Morning all!
I am trying to create a script for recursive EWMA (Exponential Weighted Moving Average) volatilty estimation.
As I am not familiar with gretl syntax language I'm desparetly looking for your help.
The problem is following:
1) First of all I need to identify the first observation of returns series. I've tried to do this by appliying FirstObs function. But that didn't work.
2) then I would like to replicate the ewma formula in order to get the variance of return series.
for that i've seen there is a MOVAVG function. I didn't find any example of syntax in user's guide. How does this work?
I would highly appreciate your help.
Thanks a lot.
Cheers
7 years, 8 months

Ralph M Rodriguez/PO/KAIPERM is out of the office.
by Ralph.M.Rodriguez＠kp.org

I will be out of the office starting 06/23/2012 and will not return until
07/02/2012.
Hi All, I will be out of the office on PTO from Monday, June 25 through
Friday June 29 , returning to the office on Monday, July 2. If you have
any concerns with Cost Model and other construction economics matters,
please, contact Bradley Njus at 510 625 4595.
Thanks
ralph
Ralph
7 years, 8 months

Running libgretl using Xcode
by Sanzad Siddique

Hi,
I want to start using the libgretl library using Xcode. I have the GRETL
application installed and running on my mac. I could not find the gretl
"include" directory anywhere in GRETL directory tree, I cannot figure out
from where I should start, what else I need to download and install? Can
anyone help me in this regards?
Thanks,
Sanzad
7 years, 8 months

incorrect dynamic ARMA prediction
by Skipper Seabold

Hi,
I was playing around and I think I noticed a bug in ARMA prediction, or I
am missing something. You can find the data to replicate here
http://www.pastie.org/4120330
I am on a recent CVS checkout. gretl 1.9.9. I don't know cvs well enough to
get more information.
It's yearly sunspot activity starting in 1700. I don't know a better way to
demonstrate this, so here it goes. The estimated coefficients of the exact
MLE ARIMA(9,0,0) model with a constant are
48.3243
1.16071
-0.395382
-0.166341
0.150446
-0.0943926
0.00906281
0.0520530
-0.0858436
0.252392
The sum of the AR parameters is something like
0.882703
So the expected level of the process is
mu = 48.3243 * (1 - 0.882703) = 5.6682382
Now if I go to Analysis -> Forecasts. Chose start 1700 and end whatever.
Select the dynamic forecast radio button. You'll see that the first
prediction is 11.2 in 1709. This is fine and expected. The next prediction
is 9.5. This is not expected. If you replace the actual endogenous variable
at 1709 with 11.2 and do the math, you don't get 9.5.
5.6682382 + 11.0 * 0.2524 + 16.0 * -0.0858 + 23.0 * 0.0521 + 36.0 * 0.0091
+ 58.0 * -0.0944 + 29.0 * 0.1504 + 20.0 * -0.1663 + 10.0 * -0.3954 +
11.23057 * 1.1607
This equals 13.24, which is also what I get from other software such as
Stata. There aren't any pre-sample residuals or anything coming in to play,
so I'm not sure how the prediction could be 9.5. Obviously after a time,
the prediction converges to the long run mean, but the initial predictions
don't seem right to me.
Please let me know if anything isn't clear or if I'm being dense.
Thanks,
Skipper
7 years, 8 months

Wrong Coefficient Estimation for ARIMA
by Sanzad Siddique

Hi,
I have tried the ARIMA command in GRETL with the attached time series data.
The time series is constructed with the below formula ( a- is normal random
values):
z(t) = 0.50 + 0.50*z(t-1) + 0.40*z(t-2) + a(t)-0.25*a(t-1)
-0.75*a(t-2);
with the arima command (arima 2 0 2; 1), for order (2,2) , I am getting the
below output:
coefficient std. error z p-value
---------------------------------------------------------
const 4.96454 0.0275435 180.2 0.0000 ***
phi_1 -0.447238 0.789760 -0.5663 0.5712
phi_2 -0.0272188 0.390533 -0.06970 0.9444
theta_1 0.751567 0.787981 0.9538 0.3402
theta_2 -0.00643631 0.629626 -0.01022 0.9918
The output is not showing the correct coefficient values for model
parameters. I have attached the input data.
Can anyone check the attached dataset and let me know what could be the
problem.
Thanks,
7 years, 8 months

Problem with Package: lp-mfx (logit/probit marginal effects)
by izabela.baginska＠interia.pl

Hi,
I have a problem with running package: lp-mfx.
Am I doing something wrong?
I have a message:
*** error in function GUI_lp_mfx
> list Y = $ylist
Please help me
Thanks and regards
Izabela Baginska
izabela.baginska(a)interia.pl
7 years, 8 months

ARIMA ( or ARMA) Order Estimation using GRETL
by Sanzad Siddique

Hi There,
Can anyone of you know, how I can estimate the order for a given time
series data set. I can estimate the order for a AR or MA series separately
using the autocorrelation and partial autocorrelation pattern ( cut off
values), but it is not possible for mixed AR and MA. Is there any way to
estimate the order from GRETL?
Thanks,
Sanzad
7 years, 8 months