BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MikeHunter
Calcite | Level 5

Azzalini (1986 and on) created a family of skewed distributions based on the normal.  They are applicable to a wide range of phenomena but don't seem to have been codified as SAS functions, e.g., in Proc Univariate, or in SAS IML.  Any suggestions on programming them into SAS? 

1 ACCEPTED SOLUTION

Accepted Solutions
MohammadFayaz
Calcite | Level 5

Hi,

I have faced with skew normal in one of my biostatistical research.But I handle it with R and winbugs. Your question motivate me to search more about SAS capabilities in handling with "Skew-Normal" distributions. I find the following paper useful, it may give you some idea. Especially check the second link for SAS code of this paper:

http://www.biomedcentral.com/content/pdf/1471-2288-10-55.pdf

http://www.biomedcentral.com/content/supplementary/1471-2288-10-55-S2.PDF

View solution in original post

7 REPLIES 7
ballardw
Super User

How you want to use them might allow us to provide some hints.

Rick_SAS
SAS Super FREQ

There are many families (actually, systems) of distributions that have been proposed for generating distributions with given moments. The first four moments are mean, variance, skewness, and kurtosis.  In my book Simulating Data withSAS I discuss the Johnson system and the Fleishman system and provide SAS/IML codes for simulating data from each system (in the last chapter).

I had not heard of the skew-normal distributions until now, but it is a standard technique to generate a new random variable from another (I discuss this in the chapter "Advanced Univariate Distributions).  To implement these in SAS/IML, use the formulation at Random numbers generation

MattFlynn
Calcite | Level 5

Mike:

The good folks at Tech Support recently helped me with a similar query.  Sure would like to see some more distributions available in Base SAS PDF/CDF functions - that list has changed very little in many years.  A small example below.

Regards,

-Matt

data x;  

    mu = 0;

    sigma = 1;

    do delta = -1 to 1 by 0.25, 2, 10;             * delta is correlation coefficient 0 <= delta <= 1;    

        do eta=-5 to 5 by 0.1;

            probit = cdf('normal', eta);

            sn = 2*probbnrm( eta, 0, -delta);

            snPDF =  2*pdf('normal', eta)*cdf('normal', -delta*eta);

            sn3PDF =  2*pdf('normal', eta)*cdf('normal', -delta*eta);

            output;

        end;

    end;

run;

%setup;

proc gplot data=x;

  title 'Skew Normal PDF';

    plot snPDF*eta=delta

         /  legend=legend1;

    plot /* probit*eta=delta */ sn*eta=delta

         / legend=legend1;

run;

MikeHunter
Calcite | Level 5

Thanks, Matt...couldn't agree with you more about the limited number of available distribution functions...that's why many people prefer R's flexibility in this regard.

Tom

Rick_SAS
SAS Super FREQ

SAS and core R provide the same building blocks, which consists of 20-25 "basic" distributions (normal, gamma, beta, etc). The difference is that members of the R community have taken the time to construct more complicated distributions from these building blocks, just as Mike did here and as I've done with about a dozen other distributions in my book and on my blog.   They then share their work so that others can also use it.

Keep posting these questions, so that when someone Googles "how do I compute theSuper-Whiz-Bang distribution in SAS," there will be publically available code that that person can use. There are infinitely many distributions, but together we can construct many of the more common ones. SAS as a company can't build-in every obscure distribution, but we as SAS users can publish the four lines (in Mike's example) that are required to created lesser-known distributions from basic distributions.

MohammadFayaz
Calcite | Level 5

Hi,

I have faced with skew normal in one of my biostatistical research.But I handle it with R and winbugs. Your question motivate me to search more about SAS capabilities in handling with "Skew-Normal" distributions. I find the following paper useful, it may give you some idea. Especially check the second link for SAS code of this paper:

http://www.biomedcentral.com/content/pdf/1471-2288-10-55.pdf

http://www.biomedcentral.com/content/supplementary/1471-2288-10-55-S2.PDF

MikeHunter
Calcite | Level 5

Thanks, Mohammed...that's very helpful.  Mike

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 7 replies
  • 4671 views
  • 6 likes
  • 5 in conversation