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

Accepted Solution Solved
Reply
Super Contributor
Posts: 303
Accepted Solution

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

Posted in reply to desireatem

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.

View solution in original post


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

Posted in reply to desireatem

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: 303

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

Posted in reply to AncaTilea

Thanks a lot

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 169 views
  • 0 likes
  • 2 in conversation