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

Hi

 

I'd like to have a sas table with the median output for domains with proc surveymeans.

If I do this for the mean it works perfect like in the exemple:

 

proc surveymeans data=sashelp.cars mean;
  var MSRP; 
  domain Make;
  ods output statistics=test1
  domain =test2;
run;
 
Replacing the mean with the median i don't get any output sas tables (test1 and test2) anymore. The median results are displayed, but no sas table anymore.
I think there is another ods output command for doing that, but I can't remember it. (And haven't found it here so far)
 
Can someone help me out?
 
Cheers,
Steph
 
 
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

You can get a list of the output object using Ods trace. Example:(don't forget to turn off or your log gets busy)

ods trace on;
proc surveymeans data=sashelp.cars median;
  var MSRP; 
  domain Make;
run;

ods trace off;

Which shows:

Output Added:
-------------
Name:       Summary
Label:      Data Summary
Template:   Stat.SurveyMeans.Factoid
Path:       Surveymeans.Summary
-------------

Output Added:
-------------
Name:       Statistics
Label:      Statistics
Template:   Stat.SurveyMeans.Statistics
Path:       Surveymeans.Statistics
-------------

Output Added:
-------------
Name:       Quantiles
Label:      Quantiles
Template:   Stat.SurveyMeans.Quantiles
Path:       Surveymeans.Quantiles
-------------

Output Added:
-------------
Name:       DomainQuantiles
Label:      Quantiles for Make Domains
Template:   Stat.SurveyMeans.DomainQuantiles
Path:       Surveymeans.DomainAnalysis.DomainQuantiles
-------------

So it looks like you want an ODS output for Domainquantiles.

View solution in original post

2 REPLIES 2
ballardw
Super User

You can get a list of the output object using Ods trace. Example:(don't forget to turn off or your log gets busy)

ods trace on;
proc surveymeans data=sashelp.cars median;
  var MSRP; 
  domain Make;
run;

ods trace off;

Which shows:

Output Added:
-------------
Name:       Summary
Label:      Data Summary
Template:   Stat.SurveyMeans.Factoid
Path:       Surveymeans.Summary
-------------

Output Added:
-------------
Name:       Statistics
Label:      Statistics
Template:   Stat.SurveyMeans.Statistics
Path:       Surveymeans.Statistics
-------------

Output Added:
-------------
Name:       Quantiles
Label:      Quantiles
Template:   Stat.SurveyMeans.Quantiles
Path:       Surveymeans.Quantiles
-------------

Output Added:
-------------
Name:       DomainQuantiles
Label:      Quantiles for Make Domains
Template:   Stat.SurveyMeans.DomainQuantiles
Path:       Surveymeans.DomainAnalysis.DomainQuantiles
-------------

So it looks like you want an ODS output for Domainquantiles.

Steph_C4
Calcite | Level 5
Indeed, I was looking for domainquantiles! Thanks a lot for the answer and the hint.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 2 replies
  • 253 views
  • 1 like
  • 2 in conversation