BookmarkSubscribeRSS Feed
Martina4
Calcite | Level 5

Hello,

 

I am trying to find the standard errors of my data set using SAS university.

When I type in the following code it spits out a standard deviation not standard error.

 

proc means;
var total_yield sorg_yield weed_yield leg_yield;
by trt;
output out = b mean=totalydX sorgydX weedydX legydX stderr=totalydSE sorgydSE weedydSE legydSE;
run;

 

Previously I had used a different SAS program available at my school in which we would code for 

proc means noprint;
var total_yield sorg_yield weed_yield leg_yield;
by trt;
output out = b mean=totalydX sorgydX weedydX legydX stderr=totalydSE sorgydSE weedydSE legydSE;
run;

and this would provide the means and standard error in a table that was outputed to excel. However when I try the noprint option in SAS university it doesn't show where the output is or can be download from. Does anyone have a suggestion?

 

Thank you. 

2 REPLIES 2
Reeza
Super User

@Martina4 wrote:

Hello,

 

I am trying to find the standard errors of my data set using SAS university.

When I type in the following code it spits out a standard deviation not standard error.

 

proc means;
var total_yield sorg_yield weed_yield leg_yield;
by trt;
output out = b mean=totalydX sorgydX weedydX legydX stderr=totalydSE sorgydSE weedydSE legydSE;
run;

 

Previously I had used a different SAS program available at my school in which we would code for 

proc means noprint;
var total_yield sorg_yield weed_yield leg_yield;
by trt;
output out = b mean=totalydX sorgydX weedydX legydX stderr=totalydSE sorgydSE weedydSE legydSE;
run;

and this would provide the means and standard error in a table that was outputed to excel. However when I try the noprint option in SAS university it doesn't show where the output is or can be download from. Does anyone have a suggestion?

 

Thank you. 


The code is the exact same so you should be getting the standard errors, you're just looking in the wrong place. If you're looking at the HTML output, then yes that's the standard deviation because you did not specify the standard error on the PROC MEANS statement. The statistics on the PROC MEANS statement dictate what gets shown in the result. 

The OUTPUT statement controls teh SAS output - it puts it into a table with the mean and standard errors, but that result is not displayed. Its in the output table OUT=B - Table name is B. 

 

YOU SHOULD ALWAYS HAVE A DATA= ON YOUR PROC MEANS STATEMENT. Otherwise you cannot be sure what data is being used especially if you run out of order. Make sure you specify the DATA= on all your PROC otherwise I guarantee you'll make a mistake somewhere.

 

Try running this to see what you get.

 

proc means  data = InputDataSET Mean STDERR;
var total_yield sorg_yield weed_yield leg_yield;
by trt;
output out = b mean=totalydX sorgydX weedydX legydX stderr=totalydSE sorgydSE weedydSE legydSE;
run;

 

Martina4
Calcite | Level 5

Your suggestion worked! Thank you so much!!

And yes, I had a proc means data=  statement above it in my code, just didn't copy that section into my original post. Thank you again for the assistance Smiley Very Happy

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 11846 views
  • 4 likes
  • 2 in conversation