About Calculating Quintiles

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

kinon902003
Posts: 12
Joined: Tue Mar 06, 2012 7:26 pm

About Calculating Quintiles

Postby kinon902003 » Mon Mar 19, 2012 2:12 am

I am writing programmes to calculate quintiles for a matrix. I found that @quantile maybe useful.

May I confirm that the following command can calculate 20% quintile with the name "quintile_1"?

Code: Select all

scalar quintile_1 = @quantile(xxx, 0.2)
xxx is the name of the matrix

I am not sure what I have done is correct because the answer is not the same when I calculate it in Excel by the function "percentile".

Thank you very much for your help!

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

Re: About Calculating Quintiles

Postby EViews Gareth » Mon Mar 19, 2012 7:50 am

Yes, that's right, although note that the quantile will be calculated over every element in the matrix, not just the first column or row (as is the case with some other programs).

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

Re: About Calculating Quintiles

Postby EViews Glenn » Mon Mar 19, 2012 10:46 am

Note also that there are various options for defining the computation of the quantiles. The default may not line up with what Excel does, but there may be an option that will do so.

kinon902003
Posts: 12
Joined: Tue Mar 06, 2012 7:26 pm

Re: About Calculating Quintiles

Postby kinon902003 » Mon Mar 19, 2012 8:49 pm

Note also that there are various options for defining the computation of the quantiles. The default may not line up with what Excel does, but there may be an option that will do so.
Thank you so much for your confirmation.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 1 guest