@quantilesby

For questions regarding programming in the EViews programming language.

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

tchaithonov
Posts: 168
Joined: Mon Apr 13, 2009 7:39 am
Location: New York City

@quantilesby

Postby tchaithonov » Thu Apr 08, 2010 9:37 am

Hi Guys,

Question about @quantilesby. I know that for @quantile, you can specify a method, how about @quantilesby? I am trying to mimic some Excel results and I found out that Excel uses Gumbel ("g"). I wonder if I could specify that in a panel setting. Besides, what is the correct format of the function? I used @quantilesby({%var}, crossid, 0.25) where series crossid = @crossid, but I kept getting an error message. Please let me know. Thanks.

Tchaithonov

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

Re: @quantilesby

Postby EViews Gareth » Thu Apr 08, 2010 9:52 am

@quantiles by doesn't accept a method, and uses the Rankit (Cleveland) method.

Your syntax is right though:

Code: Select all

create a 1990 2000 10 series y=nrnd show @quantilesby(y,@crossid,0.25)

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

Re: @quantilesby

Postby EViews Glenn » Thu Apr 08, 2010 10:05 am

What error message did you get?

Unfortunately, it looks as though we neither't offer the quantile method option as part @quantilesby nor as part of match merge through linking. If you want to use that particular definition, I'm afraid you'll have to write the loop yourself...

I'll point this one out to the @statby guy...

tchaithonov
Posts: 168
Joined: Mon Apr 13, 2009 7:39 am
Location: New York City

Re: @quantilesby

Postby tchaithonov » Thu Apr 08, 2010 10:08 am

May I request this additional option of choosing methods for the next eviews update? :lol: Should just be a generalization of the @quantile function.

tchaithonov
Posts: 168
Joined: Mon Apr 13, 2009 7:39 am
Location: New York City

Re: @quantilesby

Postby tchaithonov » Thu Apr 08, 2010 10:33 am

I believe my error message is indeed related to the vector I am trying to assign the @quantilesby result to ... still thinking about how to fix this, but I should be able to deal with it for now.

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

Re: @quantilesby

Postby EViews Glenn » Thu Apr 08, 2010 1:01 pm

@quantilesby should output to a series.

I'll put it on the list of things to consider, but it's probably not going to be in an update since it's not quite just a simple generalization (and there are backward compatibility issues). There are a number of issues that we need to consider.

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

Re: @quantilesby

Postby EViews Glenn » Thu Apr 08, 2010 1:09 pm

Something like this should do it...
[assuming ID is the identifier series and Y is the series of interest]

Code: Select all

series qby series gid = @groupid(id) !min = @min(gid) !max = @max(gid) for !i=!min to !max smpl if gid=!i qby = @quantile(y, .25, "g") next

tchaithonov
Posts: 168
Joined: Mon Apr 13, 2009 7:39 am
Location: New York City

Re: @quantilesby

Postby tchaithonov » Thu Apr 08, 2010 2:59 pm

Cool. Thanks Glenn, I will give it a try tomorrow.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests