Page 1 of 1

Trouble using @pval

Posted: Tue Jul 08, 2014 3:14 pm
by Gabriel de Kock
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.

Re: Trouble using @pval

Posted: Tue Jul 08, 2014 3:46 pm
by EViews Glenn
You need to use @pval off of a named equation, as in

Code: Select all

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

Re: Trouble using @pval

Posted: Wed Jul 09, 2014 6:37 am
by Gabriel de Kock
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.

Re: Trouble using @pval

Posted: Wed Jul 09, 2014 7:03 am
by EViews Gareth
You should always use objectname.datamember when accessing data members. Even tstats

Re: Trouble using @pval

Posted: Wed Jul 09, 2014 7:42 am
by EViews Glenn
Note that the documentation doesn't really describe the method that the original poster used. It is legacy behavior.