Chapter Contents |
Previous |
Next |
The TRANSREG Procedure |
Redundancy analysis (Stewart and Love 1968) is a principal component analysis of multivariate regression predicted values. These first steps show the redundancy analysis results produced by PROC TRANSREG. The specification TSTANDARD=Z standardizes all variables to mean zero and variance one. METHOD=REDUNDANCY specifies redundancy analysis and outputs the redundancy variables to the OUT= data set. The MREDUNDANCY o-option outputs two sets of redundancy analysis coefficients to the OUT= data set.
title 'Redundancy Analysis'; data x; input y1-y3 x1-x4; datalines; 6 8 8 15 18 26 27 1 12 16 18 9 20 8 5 6 15 20 17 29 31 6 9 15 14 10 16 22 7 5 12 14 6 13 9 3 6 7 2 14 26 22 3 5 9 13 18 10 22 6 3 11 3 15 22 29 6 3 7 10 20 21 27 7 5 9 8 10 12 18 ; proc transreg data=x tstandard=z method=redundancy; model identity(y1-y3) = identity(x1-x4); output out=red mredundancy replace; run; proc print data=red(drop=Intercept); format _numeric_ 4.1; run;
The _TYPE_='SCORE' observations of the Red1 -Red3 variables contain the redundancy variables. The nonmissing "M REDUND" values are coefficients for predicting the redundancy variables from the independent variables. The nonmissing "R REDUND" values are coefficients for predicting the independent variables from the redundancy variables.
These following steps show how to generate the same results manually. The data set is standardized, predicted values are computed, and principal components of the predicted values are computed. The following statements produce the redundancy variables, shown in Figure 65.9:
proc standard data=x out=std m=0 s=1; title2 'Manually Generate Redundancy Variables'; run; proc reg noprint data=std; model y1-y3 = x1-x4; output out=p p=ay1-ay3; run; quit; proc princomp data=p cov noprint std out=p; var ay1-ay3; run; proc print data=p(keep=Prin:); format _numeric_ 4.1; run;
|
The following statements produce the coefficients for predicting the redundancy variables from the independent variables, shown in Figure 65.10:
proc reg data=p outest=redcoef noprint; title2 'Manually Create Redundancy Coefficients'; model Prin1-Prin3 = x1-x4; run; quit; proc print data=redcoef(keep=x1-x4); format _numeric_ 4.1; run;
|
The following statements produce the coefficients for predicting the independent variables from the redundancy variables, shown in Figure 65.11:
proc reg data=p outest=redcoef2 noprint; title2 'Manually Create Other Coefficients'; model x1-x4 = prin1-prin3; run; quit; proc print data=redcoef2(keep=Prin1-Prin3); format _numeric_ 4.1; run;
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.