LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (February 2012, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 22 Feb 2012 10:18:39 -0600
Reply-To:     Robin R High <rhigh@UNMC.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Robin R High <rhigh@UNMC.EDU>
Subject:      Re: Proc means to proc report
Comments: To: anon <rhian.pilling@GMAIL.COM>
In-Reply-To:  <201202221549.q1MFctfd001278@waikiki.cc.uga.edu>
Content-Type: text/plain; charset="US-ASCII"

Have you entered the missing option in TABULATE? also add the MISSING statement in a DATA step

PROC FORMAT; VALUE incm 1='less than 15000' 2='15000 to 30000' 3='30000 to 45000' 4='greater than 45000' .n="no response" .r="refused to answer" .u="unemployed" .="unknown" ; RUN;

DATA thr; MISSING n r u; * the letters n r u for numeric data refer to specific reasons for missing values of income listed in PROC FORMAT; INPUT id income @@; age = 50+5*rannor(91092); CARDS; 1 1 2 . 3 r 4 4 5 2 6 n 7 u 8 1 9 2 10 r 11 1 12 . 13 2 14 3 15 n 16 . ;

PROC PRINT data=thr NOobs Label; VAR id income age; RUN;

ods output table=tbl4f(drop=_TYPE_ _PAGE_ _TABLE_);

PROC TABULATE data=thr NOseps missing; CLASS income; var age; TABLE income, age*(n='Count'*f=7.0 mean*f=5.2) / RTS=20; FORMAT income incm. ; RUN; ods output close;

proc print data=tbl1; run;

Robin High UNMC

From: anon <rhian.pilling@GMAIL.COM> To: SAS-L@LISTSERV.UGA.EDU Date: 02/22/2012 09:51 AM Subject: Proc means to proc report Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>

Dear all,

I am struggling to distinguish between different codings for missing values in proc means and proc report.

I have been asked to produce a report for a variable showing median/iqr etc statsitics. I have therefore used proc means to achieve this (I have also looked at proc univariate)as I know that this is not achievable by using proc report alone.

The continuous variable I am using however has two different formats for coding missing values. The missing data has been coded as . and also .n. I need to separate the two out in proc report, however proc means (and proc univariate when output to dataset) combine these two into one variable missing.

Is there a way that I can separate the two formats and represent each in the proc report.

Thank you in advance

BW


Back to: Top of message | Previous page | Main SAS-L page