Date: Wed, 7 Mar 2012 10:25:13 -0600
Reply-To: Joe Matise <snoopy369@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Joe Matise <snoopy369@GMAIL.COM>
Subject: Re: Proc Means to Excel File as Sheet
In-Reply-To: <201203071611.q275SXKC017580@wasabi.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
Based on your subject line, are you asking how to get to excel?
Option 1: ODS TAGSETS
ods tagsets.excelxp file="whatever.xls"; *and there are a bunch of options;
proc means ...
run;
ods tagsets.excelxp close;
Google about for primers on ODS Tagsets.excelxp, it's pretty useful. It
creates an XML file, not technically an excel file, but it's in a format
that is designed for excel and can include a lot of excel features like
fixed rows, filters, etc.
Option 2: Use the OUT=dataset you created and PROC EXPORT it (if you have
SAS/ACCESS to PCFILES).
--------
If you're asking as to why your OUT= statement doesn't work, it's because
you're assigning the same name 4 values, of which it only gets one. Use
the /AUTONAME; flag.
option out=StationsData mean= std= skew= Median= /autoname;
Or assign them names:
out=StationsData mean(Q1resp)=Q1Resp std(Q1Resp)=Q1RespStd ... etc., but
that takes forever.
_TYPE_=3 means you're getting Station*SP_MD. _TYPE_ is the combination of
class variables; since you said NWAY it's both only. Binary 11 = 3.
That's explained in the PROC MEANS manual pages in more detail.
-Joe
On Wed, Mar 7, 2012 at 10:11 AM, Thomas George
<tgeorgeturutiyil@gmail.com>wrote:
> proc means data=OSCE_Neph nway nmiss mean std skew Median;
> class Station SP_MD;
> var Q1resp Q2Resp Q3Resp Q4Resp Q5Resp Q6Resp;
> output out = StationsData mean= std= skew= Median=;
> run;
>
>
> How can i get the Mean Std Skew Median of the responses in the final data
> set?
> Also in stationsdata i get _type_ as 3 in the rows. Why is that?
>
> Thanks,
>
> Thomas
>