Quantile function

For questions regarding programming in the EViews programming language.

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

sub100036
Posts: 13
Joined: Thu Feb 25, 2010 9:11 am

Quantile function

Postby sub100036 » Wed Oct 17, 2018 7:33 am

The first program is ok. But the second program kills the Eviews and forces me to shut down.
Pnl is a data series with 100+ observations

Program 1:

%table="zz_total_stats"
table {%table}
{%table}(1,1)=@quantile(pnl,0.05,"b")
{%table}(2,1)=@quantile(pnl,0.05,"r")
{%table}(3,1)=@quantile(pnl,0.05,"o")
{%table}(4,1)=@quantile(pnl,0.05,"t")
{%table}(5,1)=@quantile(pnl,0.05,"v")
{%table}(6,1)=@quantile(pnl,0.05,"g")

Program2:
!row=0
for %type b r o t v g
!row=!row+1
{%table}(!row,1)=@quantile(pnl,0.05,{%type})
next

EViews Matt
EViews Developer
Posts: 560
Joined: Thu Apr 25, 2013 7:48 pm

Re: Quantile function

Postby EViews Matt » Wed Oct 17, 2018 9:04 am

Hello,

You don't need the {}'s around {%type} in your call to @quantile. EViews should error rather than crash in this case, we'll fix that.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 35 guests