Programming the statistical procedures from SAS

Automatic distribution-fitting procedure.

Accepted Solution Solved
Reply
Contributor
Posts: 53
Accepted Solution

Automatic distribution-fitting procedure.

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.


Accepted Solutions
Solution
‎02-14-2012 04:38 PM
SAS Employee
Posts: 245

Automatic distribution-fitting procedure.

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


All Replies
SAS Super FREQ
Posts: 3,556

Automatic distribution-fitting procedure.

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/

Contributor
Posts: 53

Re: Automatic distribution-fitting procedure.

     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.

SAS Super FREQ
Posts: 3,556

Automatic distribution-fitting procedure.

Contributor
Posts: 53

Re: Automatic distribution-fitting procedure.

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

Solution
‎02-14-2012 04:38 PM
SAS Employee
Posts: 245

Automatic distribution-fitting procedure.

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.

Contributor
Posts: 53

Re: Automatic distribution-fitting procedure.

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?

🔒 This topic is solved and locked.

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

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