Hi I am having below datasets, I want to create a new column called AE and do the calculation of residual ** residual. I made the following code: DATA want2;
set want;
AE = residual ** residual;
run; The column residuals have both negative and positive values. I am not getting value for the negative one after performed residuals ** residual (Square). Anybody can advise what went wrong. I want to square the residual column and store into AE. Please see below screenshot My second question: In the above table, you can see the column name called forecast which has both negative and positive values. I want to copy the same value with a positive sign and store into a new column called absolute. ( All negative value should become positive without changing the value and positive remains the same. Ex: -0.005, 0.123 I need 0.005, 0.123 in the new column absolute) Please advise I am using SAS Enterprise Guide. I tried with the Query builder also but not successful. Please advise how to do the above two problems in coding as well as using query builder if possible. Thanks Dhilip
... View more