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

Could anyone tell me where I could find a reference on how to automatically fit distribution function in SAS based on AIC or BIC (or Any Information Criterion).

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

PROC SEVERITY in SAS/ETS software can automatically fit all of its predefined distributions to the data and identify the best fitting distribution using several criteria such as AIC, BIC, and others.

View solution in original post

6 REPLIES 6
Rick_SAS
SAS Super FREQ

Typically people fit a distribution to data by using HISTOGRAM stmt in PROC UNIVARIATETE. However, the GOF tests in UNIVARIATE are based on the ECDF, not on an AIC/BIC criterion.

I suppose you could use a regression procedure such as  PROC GENMOD and not specify any covariates. The AIC comes out automatically, so you could compare different distributions.  The syntax would be something like

PROC GENMOD data=mydata;

model Y = / DIST=TheDist;

run;

where you need to specify TheDist according to the distribution that you are testing.  It's not clear to my WHY you would want to do this....the AIC is usually used to compare various models that have different effects (covariates) to see which competing model fits the data the best.

In any case, Step 1 is probably visualizing the distribution with a quantile-quantile plot (Q-Q plot), which you can do with the QQPLOT in PROC UNIVARIATE. For an example, see the last section of http://blogs.sas.com/content/iml/2011/10/28/modeling-the-distribution-of-data-create-a-qq-plot/

VX_Xc
Calcite | Level 5

     Thank you for your help. I could try PRCO GENMOD... in DIST option do you know how many distributions are available?

     I disagree with you regarding the use of AIC. AIC is a holistic approach to comparing different models, it can do more than comparing various models that have different covariates (it is used to compare any parametric models as it uses likelihood function). AIC is used to test models that are not nested (but of course it can be used for nested models), for example if we have totally different models not only in covariates but also in methods used to fit the model we can compare which model is a better fit by comparing AICs. As distribution functions can differ in number of parameters to estimate and as AIC also takes this in to account (-2LL + 2p), AIC and other ICs, I believe, are the best way to compare parametric models.

     Please correct me if I'm wrong.

VX_Xc
Calcite | Level 5

Thank you. Please correct me if I'm wrong regarding AIC.

StatDave
SAS Super FREQ

PROC SEVERITY in SAS/ETS software can automatically fit all of its predefined distributions to the data and identify the best fitting distribution using several criteria such as AIC, BIC, and others.

VX_Xc
Calcite | Level 5

This is what I was looking for. sad predefined distributions are so limited. Guess I could use PROC FCMP to define distributions that are not predefined. OR... do you know any site that lists other distrtibution functions using PROC FCMP?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 7268 views
  • 3 likes
  • 3 in conversation