turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- qqplot or pp plot

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-08-2013 01:06 PM

Hi,

I am trying qqplot/ppplot for inverse gaussian. SAS support website says to use :

proc univariate data=name;

qqplot var/ igauss(mu= lambda= );

run;

But I am getting an error. Any idea why is it not working? I can make it work for gamma but not inv gaussian. I can't find any alternatives either.

Thanks for any help.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-08-2013 01:12 PM

For SAS 9.3 inverse gaussian isn't a valid parameter, the distributions options are:

Can you point to where the SAS support website provides that option?

Base SAS(R) 9.3 Procedures Guide: Statistical Procedures

Option | Description |
---|---|

specifies beta Q-Q plot for shape parameters and specified with mandatory ALPHA= and BETA= | |

specifies exponential Q-Q plot | |

specifies gamma Q-Q plot for shape parameter specified with mandatory ALPHA= | |

specifies gumbel Q-Q plot | |

specifies lognormal Q-Q plot for shape parameter specified with mandatory SIGMA= | |

specifies normal Q-Q plot | |

specifies generalized Pareto Q-Q plot for shape parameter specified with mandatory ALPHA= | |

specifies power function Q-Q plot for shape parameter specified with mandatory ALPHA= | |

specifies Rayleigh Q-Q plot | |

specifies three-parameter Weibull Q-Q plot for shape parameter specified with mandatory C= | |

specifies two-parameter Weibull Q-Q plot |

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-08-2013 01:31 PM

here is for ppplot:

Base SAS(R) 9.3 Procedures Guide: Statistical Procedures

got the igauss syntex from here:

Base SAS(R) 9.3 Procedures Guide: Statistical Procedures

Is there any way to get qqplot for inverse gaussian if proc univariate does not work.

Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-08-2013 03:34 PM

In 9.3, you can get a ppplot, but *not* a qqplot. If you check the documentation, igauss is only a valid option on ppplot. I just did this using:

proc univariate data=a;

var x;

ppplot x / igauss;

run;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-08-2013 04:03 PM

Hmmm! it is pretty strange. If I try the exact code with gamma option, it works, but iguass option does not work. SAS does not even recognize it as a valid option.

Thanks for the help.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-08-2013 05:22 PM

Its not a valid option for qqplot according to the SAS Docs.

The only way I could think of is pretty much brute force, generating the values and using proc gplot.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-09-2013 08:57 AM

Since the inverse Gaussian is an exponential family, you might try:

proc univariate data=a;

var x;

qqplot x / exponential;

run;

A reference line can be inserted by noting that THETA=-lambda/(2*mu*mu) and SIGMA=-lambda/2 (I think. Those might be reversed). And no guarantees on this one--it's just a possibility.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-10-2013 04:06 PM

Steve,

Your code does work. However, I need to draw a reference line at 45 degree for comparison. It might be a silly question, but I could not find any resources for help with that. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-11-2013 10:35 AM

Today's scary approach:

proc univariate data=a;

var x;

qqplot x / exponential(theta=est sigma=est);

run;

That should give you a 45 degree line, and estimates of theta and sigma. From those values, you can calculate lambda and mu for the inverse gaussian.

Why is this scary? It's untested, and right now, I don't have time to write a program that would generate 1000 inv-gaussian random variates with known lambda and mu values to check it.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-17-2013 01:01 PM

You can produce the quantiles for IGAUSS and use them to produce a Q-Q plot. See Modeling the distribution of data? Create a Q-Q plot - The DO Loop

You can use the LINEPARM statement in PROC SGPLOT to produce a diagonal line. See Add a diagonal line to a scatter plot: The SAS 9.3 way - The DO Loop

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-23-2013 11:53 AM

Hi Rick,

Thanks for your reply. There are many useful information on the links you provided. I was able to get the qqplot as per your instruction. However, I was not able to draw the diagonal line because I am using SAS9.2 so lineparm will not work.

Thanks much,

-CD

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-24-2013 09:14 AM

The very first sentence of the blog post "Add a diagonal line..." contains a link to an article that shows how to add a diagonal line at SAS 9.2.