Programming the statistical procedures from SAS

proc univariate and output , Please Help..Thank You..

Reply
Frequent Contributor
Posts: 95

proc univariate and output , Please Help..Thank You..


Hi,

I have run a Proc univariate on my data, and get the report below, I would like to have the volume that I get for each quantile or percentile (Report below). Your help will be much appreciated.

Many Thanks

Quantiles (Definition 5)
QuantileEstimate
100% Max0.1039
99%0.0468
95%0.0382
90%0.0341
75% Q30.0287
50% Median0.0237
25% Q10.0201
10%0.0179
5%0.0169
1%0.015
0% Min0.0102
Super User
Posts: 18,580

Re: proc univariate and output , Please Help..Thank You..

What's your question?

Frequent Contributor
Posts: 95

Re: proc univariate and output , Please Help..Thank You..

The volume in ecah percentile for example 0%, 1%, 5% , 10 % etc...

Trusted Advisor
Posts: 1,671

Re: proc univariate and output , Please Help..Thank You..

Hi, I don't understand either. When Reeza asks "What's your question?" and you say

The volume in ecah percentile for example 0%, 1%, 5% , 10 % etc...

This is not a question

Furthermore, you already have shown us the volume in each percentile, as computed by PROC UNIVARIATE, so you have the results. Problem solved, I think.

Frequent Contributor
Posts: 95

Re: proc univariate and output , Please Help..Thank You..

Sorry, maybe I didn't explain myself properly, I meant the actual volume...(Frequency)..for example you have first 0%, how many cutomers who fall in ecah percentile? For example when you rank your population into deciles , you will get volume like below, how do I get the volume using proc univariate (The actual number of cistomers)..Hope I make sense Many Thanks

decilenoresponseresponseTotal Volume
92,9736393,612
82,7324243,156
73,1754073,582
62,7993553,154
52,8583303,188
43,8694424,311
32,9903183,308
23,1193303,449
12,9592853,244
03,1592723,431
Super User
Posts: 18,580

Re: proc univariate and output , Please Help..Thank You..

What variable are you using to create your ranks?

I'd assume you'd run proc rank on your data followed by a proc freq to get that type of output, but you still haven't provided enough information.

Primarily what your data looks like, how you're assigning ranks.

Frequent Contributor
Posts: 95

Re: proc univariate and output , Please Help..Thank You..

Basically, my data is just probabilities per customer, I wnat to check the distribution of the probabilities.....and the proc univariate gives you the report below, but i will aslo want to see the volume....(actual number of customers who fall in each percentile of quantile)

My raw data

customer_idProbability
10020.05
10030.6
10040.8
10050.02
10060.03
10070.5
10080.6

Desired Output

Quantiles (Definition 5)
QuantileEstimateVolume
100% Max0.025?
99%0.014?
95%0.0099?
90%0.0074?
75% Q30.0037?
50% Median0.002?
25% Q10.0015?
10%0.0012?
5%0.0011?
1%0.0009?
0% Min0.0008?
Super User
Posts: 18,580

Re: proc univariate and output , Please Help..Thank You..

Defined as how?

Check the definition of percentiles:Percentile - Wikipedia, the free encyclopedia

99% percentile reflects the data point where 99% are less than this number, you seem want to bin the numbers instead.

If you want to bin the numbers use proc rank and then proc freq as indicated.

Frequent Contributor
Posts: 95

Re: proc univariate and output , Please Help..Thank You..

Hi Reeza,

So 99% of my population, let's say I have a Million of customers...so it means that 990,000 have a probability less than 0.014 for example...and if I want to know the volume of customers the 1% percentile (data point where 1% is less than 0.0009) , I just run a count(*) on customers who have less than 0.0009 and greater than 0.0008. Am I right? Thank you

Quantiles (Definition 5)
QuantileEstimateVolume
100% Max0.025?
99%0.014?
95%0.0099?
90%0.0074?
75% Q30.0037?
50% Median0.002?
25% Q10.0015?
10%0.0012?
5%0.0011?
1%0.0009?
0% Min0.0008?
Super User
Posts: 18,580

Re: proc univariate and output , Please Help..Thank You..

What would that represent though? It just tells you how many people have between 0.009 and 0.008?

What's the definition of that metric?

Super User
Super User
Posts: 6,703

Re: proc univariate and output , Please Help..Thank You..

Isn't it just roughly .99 * your N?

Otherwise output the percentiles from Proc Univariate and use them to bin your variable (?? proc score ??)  or to create a format and run the data again through a PROC FREQ with the new binned value or formatted value.

Frequent Contributor
Posts: 129

Re: proc univariate and output , Please Help..Thank You..

Sounds like what you want is just the number of cases with values between the first and second percentiles, the second and third percentiles and so on. By definition, this is always just 1% of the total number of (non-missing) cases in the file. It might be slightly above or below this if the data are not truly continuous or is weighted. In your decile example, the volume numbers are all around 10% of the sample size. Unless you are trying to look at the impact of ties in the data, it is not a particularly interesting statistic.

Ask a Question
Discussion stats
  • 11 replies
  • 381 views
  • 0 likes
  • 5 in conversation