How to make model.append parse @ data members?

For questions regarding programming in the EViews programming language.

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

tzink
Posts: 28
Joined: Mon Oct 29, 2012 4:55 pm

How to make model.append parse @ data members?

Postby tzink » Wed Apr 16, 2014 10:47 am

What I'm trying to do is make a model that consists of the lower 95% confidence interval for a set of equations. Rather than type everything in by hand, I'm trying to make use of the @coefs and @stderrs data members of the equation object. Here's what I would expect to work:

Code: Select all

EQUATION eq.ls VAR1 c VAR2 VAR3 MODEL sample sample.append VAR1 = eq@coefs(1)-1.96*eq@stderrs(1) + (eq@coefs(2)-1.96*eq@stderrs(2))*VAR2 + (eq@coefs(3)-1.96*eq@stderrs(3))*VAR3
But that simply copies the string "VAR1 = eq@coefs(1)-1.96*eq@stderrs(1) + (eq@coefs(2)-1.96*eq@stderrs(2))*VAR2 + (eq@coefs(3)-1.96*eq@stderrs(3))*VAR3" into the equation object, and it gives the error, "EQ@COEFS is an illegal or reserved name..."

How do I make EViews not simply copy, but evaluate/parse the @coefs and @stderrs data members? I tried using replacement variables, but couldn't make it work.

Any help would be appreciated (or if there's an easier way of going about this)

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

Re: How to make model.append parse @ data members?

Postby EViews Gareth » Wed Apr 16, 2014 11:00 am

You're missing dots between your equation name and the datamembers.

tzink
Posts: 28
Joined: Mon Oct 29, 2012 4:55 pm

Re: How to make model.append parse @ data members?

Postby tzink » Wed Apr 16, 2014 11:05 am

...Oh.

Thanks :oops:


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests