BookmarkSubscribeRSS Feed
anupam3684
Calcite | Level 5

Hi All,

I am facing a difficulty in limiting the distributions obtained by PROC UNIVARIATE i.e. I want to have an option to set lower and upper limits within which the losses for each percentile (for each distribution) fall.

Can anyone please suggest something on the same.

Thanks

6 REPLIES 6
Reeza
Super User

Not sure what you mean exactly, but you can use a where clause to restrict your input data.

anupam3684
Calcite | Level 5

Thanks Reeza for your reply , but my problem is not related to limit the data. I will give you example . Now suppose


In case of the sample data I am using, the lowest claim is $968, but in case of fitted Normal Distribution (using PROC UNIVARIATE), the 1st, 5th and 10th percentile are coming out to be negative. Let say, had we limited the lower tail of distribution to $100, all these percentiles would been more than $100. There should be option for similar upper limit too.  Please do let me know if this helps.


Thanks



ballardw
Super User

If a value in the 10th percentile is not "valid" then your data very likely isn't normally distributed. Monetary values often have a skewed distribution.

You might need to investigate to get a better idea which distribution does fit.

Rick_SAS
SAS Super FREQ

I think that PROC UNIVARIATE is letting you know that a normal distribution does not fit your data. Are you asking for options to fit bounded distributions?

If you know that your data are always positive, you can choose to fit a bounded distribution to your data. PROC UNIVARIATE supports the  lognormal and gamma distributions, and some others.  Since you mention "claims data," you might want to look into PROC GENMOD which enables you to fit various nonnegative distributions, including count data and the Tweedie distribution.

SteveDenham
Jade | Level 19

Also, distribution free percentiles are available in PROC UNIVARIATE.  Try:

proc univariate data=yourdsn CIQUANTDF(type=asymmetric);

var value;

run;

Steve Denham

anupam3684
Calcite | Level 5

Thank you all for your responses. This is very helpful. Let me propose all the solutions to my team and see what happens. I will keep uou all posted.

Thanks Again.

Anupam

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1052 views
  • 0 likes
  • 5 in conversation