Hi,

The actual model isn't just based on the Y variable, it's of the form y = B1 + B2*X2 + B3*X3 . in your example you seem to generate only a Y variable and doing everything with the Y variable. I think the major problem here is I may not be understanding what I'm doing;) in gretl, when you run an arima model it estimates a bunch of stuff (the arima process) and then estimates the betas on your other explanatory variables. The same happens when you estimate a garch process. The output for the script only generates estimates of the arma process variables and the garch process variables. I'm trying to figure out how to estimate the coefficients on the other explanatory variables as well...

I really appreciate your help,

Sincerely,

Chris

On 6/7/07, **Riccardo (Jack) Lucchetti** <r.lucchetti@univpm.it> wrote:

On Thu, 7 Jun 2007, Chris wrote:

> Hi,

> Your script is confusing me a bit;)

>

> so if I had an arch process that was arch 24 and arima 1 1 would I change

> the script to this:

>

I'm reaaly on the run, but a few quick comments:

>

> function filter(series y, \

> scalar arpar, scalar mapar, \

> scalar om, scalar alpha1, scalar alpha2, \

> scalar alpha3, scalar alpha4, scalar alpha5, \

> scalar alpha6, scalar alpha7, scalar alpha8, \

> scalar alpha9, scalar alpha10, scalar alpha11, \

> scalar alpha12, scalar alpha13, scalar alpha14, \

> scalar alpha15, scalar alpha16, scalar alpha17, \

> scalar alpha18, scalar alpha19, scalar alpha20, \

> scalar alpha21, scalar alpha22, scalar alpha23, \

> scalar alpha24, \

> series *e, series *h)

Believe me, you *want* to use a vector here; besides, why don't you

collapse such a long arch part to a nice garch part?

>

> scalar err = 0

> scalar T = $nobs

> series e = 0

> series h =

> om/(1-alpha1-alpha2-alpha3-alpha4-alpha5-alpha6-alpha7-alpha8-alpha9-alpha10-alpha11-alpha12-alpha13-alpha14-alpha15-alpha16-alpha17-alpha18-alpha19-alpha20-alpha21-alpha22-alpha23-alpha24)

Again, use a vector. And be sure to check for \sum \alpha_i < 1.

> loop for i=2..T --quiet

> scalar e2lag = e[i-1]^2

> scalar e3lag = e[i-2]^2

...

well, in this case the loop shouldn't start from 2, should it? In your

case, you ought to start from 25 (when i==2, i-2 is, well, zero)

> When I run this I get the error "Bad character 'i' in date string" and the

> script halts.

see above

> Also, the script only appears to output the estimated alphas

> and arima coefficients. How would I modify this to get a more garch like

> output with coefficients estimated for the function total = B1 + B2*X2 +

> B3*X3? i.e how do I get it to estimate the B's as well?

Sorry? I don't quite understand what you mean here.

Riccardo (Jack) Lucchetti

Dipartimento di Economia

Università Politecnica delle Marche

r.lucchetti@univpm.it

http://www.econ.univpm.it/lucchetti

_______________________________________________

Gretl-users mailing list

Gretl-users@lists.wfu.edu

http://lists.wfu.edu/mailman/listinfo/gretl-users