Go Back   Rhinocerus > Newsgroup > Newsgroup comp.soft-sys.sas

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-28-2008, 09:33 AM
./ ADD NAME=Data _null_,
Guest
 
Posts: n/a
Default Re: Help - proc means

You might be interested to know where the format come from. It can
from YOU through the association with the analysis variable. You can
control the action with the PROC MEANS OUTPUT statement options
NOINHERIT or with at format statement. See example, below material
excerpted from the documentation.

NOINHERIT
specifies that the variables in the output data set that contain
statistics do not inherit the attributes (label and format) of the
analysis variables which are used to derive them.

Tip: By default, the output data set includes an output variable for
each analysis variable and for five observations that contain N, MIN,
MAX, MEAN, and STDDEV. Unless you specify NOINHERIT, this variable
inherits the format of the analysis variable, which may be invalid for
the N statistic (for example, datetime formats).


data class;
set sashelp.class;
format age 2.;
label age = 'Age (years)';
run;
proc summary data=class;
output out=inherit mean(age)= std(age)=std;
run;
proc contents varnum;
run;
proc summary data=class;
output out=NOinherit mean(age)= std(age)=std / noinherit;
run;
proc contents varnum;
run;
proc summary data=class;
output out=NOFormat mean(age)= std(age)=std;
format age;
run;
proc contents varnum;
run;


On 10/27/08, Kevin Y <kevin77711@yahoo.com> wrote:
> Ya:
>
> Thanks a lot! You are really helpful for all of us!!!
>
>
> 9 proc print;
> 10 format _all_;
> 11 run;
> NOTE: There were 1 observations read from the data set WORK.AA2.
> NOTE: The PROCEDURE PRINT printed page 2.
>
> Obs _TYPE_ _FREQ_ MEAN2 STD2
>
> 1 0 372 70.1237 10.1581
>
>
> ________________________________
> From: Ya Huang <ya.huang@AMYLIN.COM>
> To: SAS-L@LISTSERV.UGA.EDU; Kevin Y <kevin77711@YAHOO.COM>
> Cc: Ya Huang <ya.huang@AMYLIN.COM>
> Sent: Tuesday, October 28, 2008 7:20:29 AM
> Subject: Re: Help - proc means
>
> Try this and let us know what do you see?
>
> proc print;
> format _all_;
> run;
>
>
> On Mon, 27 Oct 2008 16:08:18 -0700, Kevin Y <kevin77711@YAHOO.COM> wrote:
>
> >Gadi:

> ?
> Thanks, but there are still no decimal points. See below:
> ?
> ?
> 9????????? proc print;
> NOTE: There were 1 observations read from the data set WORK.AA2.
> NOTE: The PROCEDURE PRINT printed page 2.
>
> ??????????? Obs??? _TYPE_??? _FREQ_??? MEAN2??? STD2
> ?
> ???????????? 1??????? 0??????? 372?????? 70????? 10
> ?
> ?
> Kevin,
>
> Remove the width=min from proc print.
>
> Gadi
>
> -----Original Message-----
> From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Kevin Y
> Sent: Monday, October 27, 2008 9:50 AM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Help - proc means
>
> Dear All:
> ?See below: I got decimal points for mean and STD when I used "proc means",
> but the decimal points disappeared when I printed out the output dataset
> aa2?from proc means. Any help would be greatly appreciated. I run SAS on
> V8.2.
> ?
> 4????????? proc means n mean std data=d20.demog nway;
> 5????????? var age;
> 6????????? output out=aa2 mean=mean2 std=std2;
> 7????????? run;
> ?
> NOTE: There were 372 observations read from the data set D20.DEMOG.
> NOTE: The data set WORK.AA2 has 1 observations and 4 variables.
> NOTE: The PROCEDURE MEANS printed page 1.
> ?
> ?
> ????????????????????? The MEANS Procedure
> ?
> ????????????? Analysis Variable : AGE AGE DERIVED
> ?
> ??????????????? N??????????? Mean???????? Std Dev
> ????????????? -----------------------------------
> ??????????? ??372????? 70.1236559????? 10.1580916
> ????????????? -----------------------------------
> ??????
> 8?????????
> 9????????? proc print width=min;
> NOTE: There were 1 observations read from the data set WORK.AA2..
> NOTE: The PROCEDURE PRINT printed page 2.?
> ??????????? Obs??? _TYPE_??? _FREQ_??? MEAN2??? STD2
> ?????????????????????????
> ???????????? 1??????? 0??????? 372????? 70?????? 10 ?
>
>
>
>
>
> ________________________________
>
> From: â£(c) ᯠà¡(c) <GADI_B@malam.com>
> To: Kevin Y <kevin77711@YAHOO.COM>; SAS-L@LISTSERV..UGA.EDU
> Sent: Monday, October 27, 2008 3:59:02 PM
> Subject: RE: Help - proc means
>
>
>
>
>

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Diff of Proc Means Vs Proc Summary Akshaya Nathilvar Newsgroup comp.soft-sys.sas 0 02-26-2009 02:40 PM
Re: SAS Formats w/ proc means Nat Wooding Newsgroup comp.soft-sys.sas 0 10-07-2008 01:47 PM
Re: Proc means Jack Hamilton Newsgroup comp.soft-sys.sas 0 08-16-2007 05:33 AM
Re: NEED SAS examples on Conjoint Analysis and MDS Wu Consulting Newsgroup comp.soft-sys.sas 0 10-23-2006 01:29 PM
Re: SAS Tips From SAS-L Archives January 1996 to May 2006 Terjeson, Mark Newsgroup comp.soft-sys.sas 0 06-21-2006 04:00 PM



All times are GMT. The time now is 06:07 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.