/* This code performs a two block partial least squares analysis, configured here for
two blocks of shape coordinates (i.e., a singualar warps analysis). Unlike other routines
in this series, this one is set up for a different dataset. The sample dataset was divided
into two blocks of data and those were separately aligned by GPA. They can be read in
separately in this routine from the new data files (block1.dta and block2.dta) provided.
Results of this program include singular values, singular vectors and singular warps scores,
which can be plotted separately in Interactive Data Analysis. */
data one;
infile 'C:\...\block1.dta'
firstobs=2 obs=41; input cat $; run;
data block1; set one;
infile 'C:\...\block1.dta'
firstobs=43; input x1-x30; run;
data two;
infile 'C:\...\block2.dta'
firstobs=2 obs=41; input cat $; run;
data block2; set two;
infile 'C:\...\block2.dta'
firstobs=43; input x1-x18; run;
proc iml;
DF=7;
use block1; read all into X1; use block2; read all into X2;
N=nrow(X1); LM1=ncol(X1); LM2=ncol(X2);
if LM1