@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;