Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- I need to output a fraction of the mean that is (1...

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

02-11-2013 06:45 PM

How do I correct the following program;

**proc** **means** nway data= para noprint; class Variable; var estimate; output out=two (drop=_type_) mean(estimate)=col1

(**1**/**19**)*mean(StdErr)=col2 std(estimate)=col3;

**run**;

Accepted Solutions

Solution

02-11-2013
08:39 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to desireatem

02-11-2013 08:39 PM

Hi.

I think you need to use an additional data step to create the 1/19 of the mean.

**proc** **means** nway data= para noprint; class Variable; var estimate; output out=two (drop=_type_) mean(estimate)=col1

(**1**/**19**)*mean(StdErr)=col2 std(estimate)=col3;

**run**;

data want;

set two;

new_mean = (col1/19)* col2;

run;

This is assuming that you want to calculate 1/19 of the mean times the std Err;

Am I getting this right?

Anca.

All Replies

Solution

02-11-2013
08:39 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to desireatem

02-11-2013 08:39 PM

Hi.

I think you need to use an additional data step to create the 1/19 of the mean.

**proc** **means** nway data= para noprint; class Variable; var estimate; output out=two (drop=_type_) mean(estimate)=col1

(**1**/**19**)*mean(StdErr)=col2 std(estimate)=col3;

**run**;

data want;

set two;

new_mean = (col1/19)* col2;

run;

This is assuming that you want to calculate 1/19 of the mean times the std Err;

Am I getting this right?

Anca.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to AncaTilea

02-11-2013 09:10 PM

Thanks a lot