06-03-2015 01:12 PM
Can anyone let me know if there is any difference in MEAN function using in proc sql and using Proc Mean.
I can see output from both the process are different. I don't understand how proc sql is treating mean function.
06-03-2015 01:29 PM
They should be the same.
The following should generate the same results.
proc means data=sashelp.class mean;
select mean(weight) as mean from sashelp.class;
If you're getting different results post your code/data.
06-03-2015 07:29 PM
Please find the code which I have used to generate mean.
Please Note I have processed 1000 + file but this kind of issue I have observed in only 20+ file:
proc means data=table_name. ;
create table mean_val as
select mean(FA2) as mean_val from table_name.
Given the output from SAS proc sql and proc mean
Let me know if you have any query.