Transformations
While SAS/INSIGHT has several common transformations available through the EDIT menu, you should be comfortable using the program editor.
After your input statement, you can add transformations, i.e
input Y X;
logY = log(Y);
logX = log(X);
Yinv = Y**(-1);
datalines;
...
run;
Now do the regression in SAS INSIGHT or via the program editor. Let's say that you found that Yinv was teh best transformation. To get teh predictions back, let's use the Program Editor again. Follow the folloing steps:
- Make sure that the predicted variable, P_Yinv appears in your INSIGHT spreadsheet.
- Go to the FILE menu and select SAVE:DATA... Click on OK. THis will save your residuals and predicted values to your sas data set, sasuser.HW, for example.
- QUIT SAS INSIGHT. This is important, otherwise you cannot make the changes to the data.
- Go to the program editor and enter the following:
data sasuer.HW;
set sasuser.HW;
PY = P_Yinv**(-1);
run;
proc print;
run;
- Go to the Local mensu and click on Submit. You should now have the predicted values in the original units stored in the variable PY. Look at the SAS OUTPUT WINDOW to confirm. You can start up SAS INSIGHT again to plot the variable versus PY to see the curvilinear relationship or use ANALYZE:MULTIVARIATE to find the correlation.