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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 120 views
  • 1 like
  • 2 in conversation