[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Cumulative Percentiles & Accuracy Profiles

From   "Nick Cox" <>
To   <>
Subject   st: RE: Cumulative Percentiles & Accuracy Profiles
Date   Thu, 2 Apr 2009 14:35:05 +0100

It's not clear what kind of modelling you are doing but Stata already
has similar if not identical functionality under headings like -roc-. 

Even if that's not what you want, it is not clear that you need to bin;
that's just a means to an end. Sorting values to get cumulatives may be


Ronan Gallagher

I am doing some modelling using Stata and wish to draw a cumulative
profile.  Essentially I have a model from which I want to compare the
and predicted values of my dependent variable.

To do this I need to create 100 bins and assign the top 1% of all
values to the first bin, the top 2% to the second bin and so forth until
100th bin consists of the total number of observations.  I then want to
repeat this exercise for the actual value of the dependent variable.
the bins are populated I need to compare how many predicted values in a
given bin also have their actual values in the same bin.  I then need to
plot this percentage for each bin and the resultant graphic is the
cumulative accuracy profile for my model.

My uncertainty centres on the cumulative nature of the bin assignment
the first percentile of observations fall into every bin, the second
percentile into 99 bins and the final percentile into only one bin.  The
xtile command therefore is not as useful.

Any help on how to compute the appropriate percentages and display the
cumulative accuracy profile would be greatly appreciated.

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index