Page 1 of 1

Who to specify an ARMAX Modell HELP!!

Posted: Tue Nov 10, 2015 8:13 am
by ceci_unibe
Hello

I have a ARMAX Modell dlogAr=c + dlogAr(1)... + dlogMa+ dlogMa(1)+---+ dlogX+dlogX(-1)+...

dlogAR=dlexp
dlogMa=dlwk
dlogX=dleu

I will use 8 Lags because these are seasonly data.

I am searching to minimize the AIC and BIC to find the best modell for my data

now normaly I would use the Infoscrit (sorry the descriptions are in German) as below but It wont work because of the X

Does anyone knwo if there is a already writen Script for my Modell? If not how to solv my problem in a other way?

Thank you -> Eviews 8

Code: Select all

'Get information criteria '---------------------------- 'Originalprogramm von 'Ulf G. Erlandsson 'Department of Economics, Lund University 'http://www.nek.lu.se/nekuer/tsa04/additional.htm 'angepasst von gregor bäurle 'das programm berechnet eine matrix mit dem BIC und eine Matrix mit dem AIC für verschiedene ARMA modelle. es werden alle kombinationen bis zu einer maximalen ar- bzw ma-terme geschätzt. 'in den zeilen stehen die schätzung für eine zunehmende anzahl ma-terme (von null bis q) für eine fixe anzahl ar-terme 'in den spalten stehen die schätzung für eine zunehmende anzahl ar-terme (von null bis p) für eine fixe anzahl ma-terme !maxp=8 'hier muss die maximale anzahl ar-terme eingeben werden !maxq=8 'hier muss die maximale anzahl ma-terme eingeben werden matrix (!maxp+1,!maxq+1) aicresults matrix (!maxp+1,!maxq+1) sbcresults smpl 1980q1+!maxp+1 2015q2 'das sample wird so eingestellt, dass für alle schätzungen die gleiche anzahl beobachtungen verwendet wird. for !p=0 to !maxp if !p=0 then %arstring ="" else %arstring = %arstring + "ar(" + @str(!p) + ")" endif for !q=0 to !maxq if !q=0 then %mastring ="" else %mastring = %mastring + "ma(" + @str(!q) +")" endif equation eq1.ls dlogAR c {%arstring} {%mastring} aicresults(!p+1,!q+1) = eq1.@aic sbcresults(!p+1,!q+1) =eq1.@schwarz next next smpl @all

Re: Who to min AIC, BIC with exogenous Variable HELP!!

Posted: Tue Nov 10, 2015 8:19 am
by EViews Gareth
Which version of EViews?

Re: Who to specify an ARMAX Modell HELP!!

Posted: Thu Nov 19, 2015 10:44 am
by ceci_unibe
so now I tried with Programming the code again. But still it will not give me the min AIC for i,j and k... does anyone see a mistake?

Thanks

Code: Select all

create empty equation to be used inside the loop equation eq 'variable to store the minimum AIC. Initialise it to a large number !aic = 99999999 'variable saying how many lags to go up to !maxlags = 8 'Variable to store the "best" number of lags !bestlag = 0 'set sample to be the !maxlag'th value onwards smpl @first+!maxlags @last for !i=1 to !maxlags if !i = 0 then %arstring ="" else %arstring = %arstring + " ar(" + @str(!i) + ")" endif for !j=1 to !maxlags if !j = 0 then %mastring = "" else %mastring = %mastring + " ma(" + @str(!j) +")" endif for !k=1 to !maxlags if !k = 0 then %xstring = "" else %xstring = %xstring + " x(" + @str(!k) +")" endif eq.ls dlexp c dlexp(-1 to -!i) dlwk(-0 to -!j) dleu(-0 to -!k) next next if eq.@aic < !aic then !bestAR = !i !bestMA = !j !bestlag = !k !aic = eq.@aic endif next show eq.ls dlexp c dlexp(-1 to -!bestAR) dlwk(0 to -!bestMA) dleu(0 to -!bestlag) 'reset sample smpl @all

Re: Who to specify an ARMAX Modell HELP!!

Posted: Thu Nov 19, 2015 10:49 am
by EViews Gareth
It really isn't clear what you're doing here. Where are the ARMA terms?

Re: Who to specify an ARMAX Modell HELP!!

Posted: Thu Nov 19, 2015 11:11 am
by ceci_unibe
What do you mean with where are the ARMA terms?

I have 3 terms this are dlog's : exports exchangerate(er) and gdp

my model ist dlog(exp)_t=dlog(exp)_t-1+...+c+dlog(er)_t+dlog(er)_t-1+dlog(gdp)_t+dlog(gdp)t-1+....

so my AR term is the export
my Ma term is the exchangerate
and my X term (for ARMAX) is the gdp

Do I miss something??? I am not sure if this works :(

Re: Who to specify an ARMAX Modell HELP!!

Posted: Thu Nov 19, 2015 11:32 am
by EViews Gareth
I think you might need to spend some time studying the theory behind ARMAX models

Re: Who to specify an ARMAX Modell HELP!!

Posted: Thu Nov 19, 2015 2:47 pm
by ceci_unibe
Ok I think I see my mistake. of course my model has not only one timeseries but 3. and I want to find the dependence (elastizity) between them.

still my model dlogExp=c + a'dlogExp(1)... + b'dlogER+ dlogER(-1)+---+ c'dlogX+dlogX(-1)+...

should be correct. as the exports depends on his past on the exchange rates and on the Gdp.

can I finde the arma strukture of all three terms separately and then put them in one equation?

i think I have also cointegration problem ...