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

How to export the model selection in a data set?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

You seem to be using the experimental 9.22 syntax, so I can't test the solution, but try 

 

ods output AllFitStatistics = AllFit;

proc severity...etc;

run;

 

The procedure should create a data set named AllFit in the WORK libref.

View solution in original post

3 REPLIES 3
Azeddine
Obsidian | Level 7

I would like to save All fit statistics table in a sas table.

 

 

My code also available here is http://support.sas.com/documentation/cdl/en/etsug/63348/HTML/default/viewer.htm#etsug_severity_sect0...

 

 /*--- Simulate a Normal sample affected by Regressors ---*/
 data testnorm_reg(keep=y x1-x5 Sigma);
     array x{*} x1-x5;
     array b{6} _TEMPORARY_ (1 0.5 . 0.75 -2 1);
     call streaminit(34567);
     label y='Normal Response Influenced by Regressors';

     do n = 1 to 100;
         /* simulate regressors */
         do i = 1 to dim(x);
             x(i) = rand('UNIFORM');
         end;
         /* make x2 linearly dependent on x1 and x3 */
         x(2) = x(1) + 5 * x(3);

         /* compute log of the scale parameter */
         logSigma = b(1);
         do i = 1 to dim(x);
             if (i ne 2) then
                 logSigma = logSigma + b(i+1) * x(i);
         end;

         Sigma = exp(logSigma);
         y = rand('NORMAL', 25, Sigma);

         output;
     end;
 run;
 /*--- Set the search path for functions defined with PROC FCMP ---*/
 options cmplib=(work.sevexmpl);

 /*-------- Fit models with PROC SEVERITY --------*/
 proc severity data=testnorm_reg print=all plots=none;
     model y=x1-x5;
     dist Normal_s;
     dist burr;
     dist logn;
     dist pareto;
     dist weibull;
 run;

Rick_SAS
SAS Super FREQ

You seem to be using the experimental 9.22 syntax, so I can't test the solution, but try 

 

ods output AllFitStatistics = AllFit;

proc severity...etc;

run;

 

The procedure should create a data set named AllFit in the WORK libref.

Azeddine
Obsidian | Level 7

Thank you, it works for me

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1026 views
  • 0 likes
  • 2 in conversation