- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello - I want to output a host of Gamma distribution stats on a numeric variable grouped (or classed) by a couple of catagorical variables in an output table for easy consumption.
I think PROC UNIVARIATE is what I need. PROC UNIVARIATE can get me the range of stats I need in an output table, but where I get stuck is that as far as I can manage the stats are only for a normal distribution. i.e. I can't get a table output for Gamma distribution. I want stats about the distribution like quartiles, standard deviation, kurtosis, skewdness etc etc.
Would really appreciate your help.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I do not understand your question. All the quantiles are empirical quantiles . You want exact theory quantiles ? Check function QUANTILE() .
Or you could use histogram option OUTHISTOGRAM= OUTKERNEL= to get these histogram information.
Or you just want find a BEST Gamma curve to fit these data ? Check Rick's blog how to find the best Normal distribution parameter with a sample data. This can guide you to how to find a BEST Gamma distribution parameter to fit these data .
http://blogs.sas.com/content/iml/2011/10/12/maximum-likelihood-estimation-in-sasiml.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I find an example how to fit Gamma distribution in Documentation .
ods select ParameterEstimates GoodnessOfFit FitQuantiles;proc univariate data=Plates;
var Gap;
histogram / midpoints=0.2 to 1.8 by 0.2
gamma
vaxis = axis1
name = 'MyHist';
inset n mean(5.3) std='Std Dev'(5.3) skewness(5.3)
/ pos = ne header = 'Summary Statistics';
axis1 label=(a=90 r=0);
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I do not understand your question. All the quantiles are empirical quantiles . You want exact theory quantiles ? Check function QUANTILE() .
Or you could use histogram option OUTHISTOGRAM= OUTKERNEL= to get these histogram information.
Or you just want find a BEST Gamma curve to fit these data ? Check Rick's blog how to find the best Normal distribution parameter with a sample data. This can guide you to how to find a BEST Gamma distribution parameter to fit these data .
http://blogs.sas.com/content/iml/2011/10/12/maximum-likelihood-estimation-in-sasiml.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
From output I can see these . Is it what you need ?
Distribution of Plate Gaps
The UNIVARIATE Procedure
Fitted Gamma Distribution for Gap
Parameters for Gamma Distribution
Parameter Symbol Estimate
Threshold Theta 0
Scale Sigma 0.155198
Shape Alpha 4.082646
Mean 0.63362
Std Dev 0.313587
Goodness-of-Fit Tests for Gamma Distribution
Test ----Statistic----- ------p Value------
Kolmogorov-Smirnov D 0.09695325 Pr > D >0.250
Cramer-von Mises W-Sq 0.07398467 Pr > W-Sq >0.250
Anderson-Darling A-Sq 0.58106613 Pr > A-Sq 0.137
Quantiles for Gamma Distribution
------Quantile------
Percent Observed Estimated
1.0 0.23100 0.13326
5.0 0.24700 0.21951
10.0 0.29450 0.27938
25.0 0.37800 0.40404
50.0 0.53150 0.58271
75.0 0.74600 0.80804
90.0 1.10050 1.05392
95.0 1.54700 1.22160
99.0 1.74100 1.57939