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
@quantilesby
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13602
- Joined: Tue Sep 16, 2008 5:38 pm
Re: @quantilesby
@quantiles by doesn't accept a method, and uses the Rankit (Cleveland) method.
Your syntax is right though:
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
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...
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
May I request this additional option of choosing methods for the next eviews update?
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
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
@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.
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
Something like this should do it...
[assuming ID is the identifier series and Y is the series of interest]
[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
Cool. Thanks Glenn, I will give it a try tomorrow.
Who is online
Users browsing this forum: No registered users and 2 guests
