Statistical programming, matrix languages, and more

Skew-Normal Distributions

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

Skew-Normal Distributions

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? 


Accepted Solutions
Solution
‎11-25-2013 07:40 AM
Contributor
Posts: 62

Re: Skew-Normal Distributions

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


All Replies
Grand Advisor
Posts: 10,241

Re: Skew-Normal Distributions

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

SAS Super FREQ
Posts: 3,419

Re: Skew-Normal Distributions

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

Occasional Contributor
Posts: 11

Re: Skew-Normal Distributions

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;

Occasional Contributor
Posts: 12

Re: Skew-Normal Distributions

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

SAS Super FREQ
Posts: 3,419

Re: Skew-Normal Distributions

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.

Solution
‎11-25-2013 07:40 AM
Contributor
Posts: 62

Re: Skew-Normal Distributions

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

Occasional Contributor
Posts: 12

Re: Skew-Normal Distributions

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 2002 views
  • 6 likes
  • 5 in conversation