Page 1 of 1

@quantilesby

Posted: Thu Apr 08, 2010 9:37 am
by tchaithonov
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

Re: @quantilesby

Posted: Thu Apr 08, 2010 9:52 am
by EViews Gareth
@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)

Re: @quantilesby

Posted: Thu Apr 08, 2010 10:05 am
by EViews Glenn
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...

Re: @quantilesby

Posted: Thu Apr 08, 2010 10:08 am
by tchaithonov
May I request this additional option of choosing methods for the next eviews update? :lol: Should just be a generalization of the @quantile function.

Re: @quantilesby

Posted: Thu Apr 08, 2010 10:33 am
by tchaithonov
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.

Re: @quantilesby

Posted: Thu Apr 08, 2010 1:01 pm
by EViews Glenn
@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.

Re: @quantilesby

Posted: Thu Apr 08, 2010 1:09 pm
by EViews Glenn
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

Re: @quantilesby

Posted: Thu Apr 08, 2010 2:59 pm
by tchaithonov
Cool. Thanks Glenn, I will give it a try tomorrow.