Many times, I create a new variable that transposes the responses of a variable to 'center' them. The only way that I know to do this so far, i need to run a proc univariate for the mean of the value then, in the data step, create the centered variable by referencing the output of the proc univariate. This seems like a lot of work that is not easily transferable between projects, or if the values of a mean change due to re-framing my sample. Additionally, I can only reference the mean to as many digits as SAS reports in the output. Is there an easier way, perhaps by having a code that directly references the mean value of the responses to a variable? An example of the code that I currently use: proc univariate; var INCOME; run; data NEWSET; set OLDSET; centeredINCOME=INCOME - 1.58762368; (this number I reference from the output of proc univariate) run;
... View more