## I need to output a fraction of the mean that is (1/19)*mean(StdErr)=col2

Solved
Super Contributor
Posts: 328

# I need to output a fraction of the mean that is (1/19)*mean(StdErr)=col2

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
Super Contributor
Posts: 543

## Re: I need to output a fraction of the mean that is (1/19)*mean(StdErr)=col2

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
Super Contributor
Posts: 543

## Re: I need to output a fraction of the mean that is (1/19)*mean(StdErr)=col2

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.

Super Contributor
Posts: 328