The SAS Output Delivery System and reporting techniques

How to output the Statistics portion of PROC NPAR1WAY through ODS?

Reply
N/A
Posts: 1

How to output the Statistics portion of PROC NPAR1WAY through ODS?

I am trying to use wilcoxon rank-sum test to test median wage by foreign-born/native-born status for selected occupations. My goal is to produce a summary output.

Are there ways to output the statistics portion of proc NPAR1WAY through ODS, like how one can do in ttest?

PROC
NPAR1WAY Data=Hospy200507 WILCOXON;
CLASS
CITI;
VAR
INCWAGE_adj;
by
occ1990;
RUN
;
SAS Super FREQ
Posts: 8,744

Re: How to output the Statistics portion of PROC NPAR1WAY through ODS?

Hi:
If you do this:
[pre]
ODS TRACE ON/LABEL;
PROC NPAR1WAY Data=Hospy200507 WILCOXON;
CLASS CITI;
VAR INCWAGE_adj;
by occ1990;
RUN;
ODS TRACE OFF;
[/pre]

...and then look in the SAS log, you will see the names of the output objects that are being created by your procedure. For example, NPAR1WAY would have something like this in the LOG:
[pre]
**** Note that some of the Log output was deleted here to make the
posting smaller ****
Output Added:
-------------
Name: WilcoxonScores
Label: Scores
Template: Stat.Npar1way.ClassScores
Path: Npar1way.ByGroup1.INCWAGE_adj.Wilcoxon.WilcoxonScores
-------------

Output Added:
-------------
Name: WilcoxonTest
Label: Two-Sample Test
Template: Stat.Npar1way.StatFactoid
Path: Npar1way.ByGroup1.INCWAGE_adj.Wilcoxon.WilcoxonTest
-------------

Output Added:
-------------
Name: KruskalWallisTest
Label: Kruskal-Wallis Test
Template: Stat.Npar1way.StatFactoid
Path: Npar1way.ByGroup1.INCWAGE_adj.Wilcoxon.KruskalWallisTest
-------------
**** end of by group 1

Output Added:
-------------
Name: WilcoxonScores
Label: Scores
Template: Stat.Npar1way.ClassScores
Path: Npar1way.ByGroup2.INCWAGE_adj.Wilcoxon.WilcoxonScores
-------------

Output Added:
-------------
Name: WilcoxonTest
Label: Two-Sample Test
Template: Stat.Npar1way.StatFactoid
Path: Npar1way.ByGroup2.INCWAGE_adj.Wilcoxon.WilcoxonTest
-------------

Output Added:
-------------
Name: KruskalWallisTest
Label: Kruskal-Wallis Test
Template: Stat.Npar1way.StatFactoid
Path: Npar1way.ByGroup2.INCWAGE_adj.Wilcoxon.KruskalWallisTest
-------------
**** end of by group 2
[/pre]

Then you have to decide whether you 1) want a particular statistic or set of statistics in a particular destination result file (such as only get K-W Test in ODS HTML, but none of the other output objects) OR 2) whether you want to create SAS datasets from the OUTPUT objects.

For #1, you'd use ODS SELECT to select certain output objects for certain destinations. For #2, you'd use ODS OUTPUT to create output datasets from certain output objects.

For more information, see these papers and notes:
http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001806839.htm
http://www2.sas.com/proceedings/forum2008/172-2008.pdf
http://www2.sas.com/proceedings/sugi26/p058-26.pdf (pg 2 and 3)
http://support.sas.com/kb/25/390.html (ODS OUTPUT)

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 167 views
  • 0 likes
  • 2 in conversation