multiple estimation

For questions regarding programming in the EViews programming language.

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

Amorimneto
Posts: 11
Joined: Thu Jan 15, 2015 11:55 am

multiple estimation

Postby Amorimneto » Fri Feb 20, 2015 5:35 am

Hello, i trying to run all the possible regressions, for this i run the code:

Code: Select all

for !i=1 to xi.@count-1 %iname = xi.@seriesname(!i) for !j=!i+1 to xi.@count %jname = xi.@seriesname(!j) for !f=1 to xf.@count %fname = xf.@seriesname(!f) equation eq{%fname }{%jname}{%iname}.ls {%fname } c {%jname} {%iname} next next next
But im having a problem with the name of regression, when the name repeat and the program crush.
anyone can help me with this

Best regards
CA

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

Re: multiple estimation

Postby EViews Gareth » Fri Feb 20, 2015 6:37 am

There's nothing inherently wrong with that code. This example works just fine:

Code: Select all

create u 100 group xi for !i=1 to 5 series xi_!i=nrnd xi.add xi_!i next group xf for !i=1 to 3 series xf_!i=nrnd xf.add xf_!i next for !i=1 to xi.@count-1 %iname = xi.@seriesname(!i) for !j=!i+1 to xi.@count %jname = xi.@seriesname(!j) for !f=1 to xf.@count %fname = xf.@seriesname(!f) equation eq{%fname}{%jname}{%iname}.ls {%fname } c {%jname} {%iname} next next next


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests