Trouble using @pval

For questions regarding programming in the EViews programming language.

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

Gabriel de Kock
Posts: 4
Joined: Mon Jul 07, 2014 8:14 pm

Trouble using @pval

Postby Gabriel de Kock » Tue Jul 08, 2014 3:14 pm

I'm trying to save results from a cointreg estimation, but get ab error message when I try to use @pval to save p-values into a previously-created matrix. Here is a snippet of code:

exp_mod(i,1) = c(1)
exp_mod(i,2) = @tstats(1)
exp_mod(i,3) = @pval(1)

I get the following error message:
@pval is an illegal or reserved name in “exp_mod(i,3) = @pval(1)”

I get the same message when I try to use
exp_mod(i,3) = @pvals(1)

Please tell ne what I'm doing wrong here.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Trouble using @pval

Postby EViews Glenn » Tue Jul 08, 2014 3:46 pm

You need to use @pval off of a named equation, as in

Code: Select all

exp_mod(i,3) = eq1.@pval(1)

Gabriel de Kock
Posts: 4
Joined: Mon Jul 07, 2014 8:14 pm

Re: Trouble using @pval

Postby Gabriel de Kock » Wed Jul 09, 2014 6:37 am

Thank you very much. It's odd, though, that t-stats are not treated in the same way. And I did not see anything in the command reference, e.g., to make that clear.

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

Re: Trouble using @pval

Postby EViews Gareth » Wed Jul 09, 2014 7:03 am

You should always use objectname.datamember when accessing data members. Even tstats

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Trouble using @pval

Postby EViews Glenn » Wed Jul 09, 2014 7:42 am

Note that the documentation doesn't really describe the method that the original poster used. It is legacy behavior.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest