estimate best pdl(y,!i,!j)

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

ch2324
Posts: 133
Joined: Fri May 10, 2013 10:52 am

estimate best pdl(y,!i,!j)

Postby ch2324 » Tue Mar 22, 2016 8:26 am

Hi everybody,
i have made some modification for the program in this page http://forums.eviews.com/viewtopic.php?f=5&t=1638, i would like to estimate the best pdl(y,!i,!j) by loop that minimise AIC, but when i use this code i get error message " Near singular matrix error. Regressors may be perfectly
collinear in "DO_ EQ.LS Y C PDL(Y,1,2)"; i have estimate all this models manually but i can not get this error!

Code: Select all

' open workfile wfopen C:\Users\MED\Documents\quandl_seas.WF1 pageselect quarterly '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 and order to go up to !maxlags = 12 !maxorders= 5 'Variable to store the "best" number of lags and order !bestlag = 0 !bestorder=0 'set sample to be the !maxlag'th value onwards smpl @first+!maxlags @last for !i=1 to !maxlags for !j=1 to !maxorders eq.ls y c pdl(y,!i,!j) 'run pdl of Y on a constant with different lag & order if eq.@aic < !aic then !bestlag = !i 'if this lag specification has the best AIC, then store this lag as !bestlag. !bestorders=!j 'if this order specification has the best AIC, then store this lag as !bestorder. !aic = eq.@aic endif next next show eq.ls y c pdl(y,!bestlags,!bestorders) 'reset sample smpl @all
I would highly appreciate if any of you could help me, the wf is below.
Attachments
quandl_seas.WF1
(447.26 KiB) Downloaded 274 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: estimate best pdl(y,!i,!j)

Postby EViews Gareth » Tue Mar 22, 2016 8:43 am

You can't run an estimation of Y C PDL(Y,1,2)

ch2324
Posts: 133
Joined: Fri May 10, 2013 10:52 am

Re: estimate best pdl(y,!i,!j)

Postby ch2324 » Tue Mar 22, 2016 8:50 am

sorry, I forgot.
what can i do in this case.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: estimate best pdl(y,!i,!j)

Postby EViews Gareth » Tue Mar 22, 2016 9:06 am

Not estimate Y C PDL(Y,1,2)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest