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
Content-Type: text/plain; charset="US-ASCII"
Have you entered the missing option in TABULATE? also add the MISSING
statement in a DATA step
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" ;
MISSING n r u; * the letters n r u for numeric data refer to
specific reasons for missing values of income listed in
INPUT id income @@;
age = 50+5*rannor(91092);
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;
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. ;
ods output close;
proc print data=tbl1; run;
02/22/2012 09:51 AM
Proc means to proc report
"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
I am struggling to distinguish between different codings for missing
in proc means and proc report.
I have been asked to produce a report for a variable showing median/iqr
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
Is there a way that I can separate the two formats and represent each in
Thank you in advance