Sorry but your suggestion does not produce the desired output of 151.104. However, the following code, which makes use of _FREQ_. does the job: DATA WORK.TestDataSet;
INPUT Uid Col1 Col2 Target $;
DATALINES;
1 5.1 3.5 13.12345
2 4.9 3.15 2.1345
;
DATA WORK.TestDataSet;
SET WORK.TestDataSet;
MSE = (Target - ((Col1 + Col2) + exp(2.345)))**2;
RUN;
proc summary data = WORK.TestDataSet ;
var MSE;
output out = WORK.ProcSumOut sum=;
run;
proc print data = WORK.ProcSumOut;
run;
data WORK.ProcSumOut2;
set WORK.ProcSumOut ;
MSE=MSE/_FREQ_;
run;
proc print data = WORK.ProcSumOut2;
run;
... View more