SAS中文论坛

 找回密码
 立即注册

扫一扫,访问微社区

查看: 888|回复: 0
打印 上一主题 下一主题

VARIMAX rotation of PLS loadings

[复制链接]

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
楼主
 楼主| 发表于 2010-10-22 13:39:51 | 只看该作者

VARIMAX rotation of PLS loadings

From oloolo's blog on SasProgramming


<p><a href="http://feedads.g.doubleclick.net/~a/a3PKM8XkTJW_yOaAsnWmtLk6x8E/0/da"><img src="http://feedads.g.doubleclick.net/~a/a3PKM8XkTJW_yOaAsnWmtLk6x8E/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/a3PKM8XkTJW_yOaAsnWmtLk6x8E/1/da"><img src="http://feedads.g.doubleclick.net/~a/a3PKM8XkTJW_yOaAsnWmtLk6x8E/1/di" border="0" ismap="true"></img></a></p>Partial Least Square is one of several supervised dimension reduction techniques and attracts attention in recent years. In the one hand, PLS is able to generate a series of scores that maximize linear correlation between dependent variables and independent variables, on the other hand, the loading of PLS can be regarded as similar counterpart from factor analysis, hence we can rotate the loadings from PLS therefore eliminate some of the non-significant variable in terms of prediction.<br />
<br />
<pre style="background-color: #ebebeb; border: 1px dashed rgb(153, 153, 153); color: #000001; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>
%macro PLSRotate(Loading, TransMat, PatternOut, PatternShort,
                 method=VARIMAX, threshold=0.25);
/* VARIMAX rotation of PLS loadings. Only variables having
   large loadings after rotation will enter the final model.

   Loading dataset contains XLoadings output from PROC PLS
   and should have variable called NumberOfFactors
   TransMat is the generated Transformation matrix;
   PatternOut is the output Pattern after rotation;
   PatternShort is the output Pattern with selected variables
*/

%local covars;
proc sql noprint;
     select name into :covars separated by ' '
  from   sashelp.vcolumn
  where  libname="WORK" &amp; memname=upcase("&amp;Loading")
        &amp;   upcase(name) NE "NUMBEROFFACTORS"
  &amp;   type="num"
  ;
quit;
%put &amp;covars;

data &amp;Loading.(type=factor);
         set &amp;Loading;
         _TYPE_='PATTERN';
         _NAME_=compress('factor'||_n_);
run;
ods select none;
ods output OrthRotFactPat=&amp;PatternOut;
ods output OrthTrans=&amp;TransMat;
proc factor  data=&amp;Loading   method=pattern  rotate=&amp;method  simple;
         var &amp;covars;
run;
ods select all;

data &amp;PatternShort;
     set &amp;PatternOut;
  array _f{*} factor:;
  _cntfac=0;
  do _j=1 to dim(_f);  
        _f[_j]=_f[_j]*(abs(_f[_j])&gt;&amp;threshold); _cntfac+(_f[_j]&gt;0);
     end;
  if _cntfac&gt;0 then output;
  drop _cntfac _j;
run;
%mend;
</code></pre><br />
Here I try to replicate the case study in [1] which elaborated how to do and properties of VARIMAX rotation to PLS loadings. The PROC PLS output, after various tweaks on convergence criteria and singularity conditions, is still a little different from the result reported in [1] for factors other than the leading one, therefore, I will directly use the U=PS matrix in pp.215.<br />
<br />
<pre style="background-color: #ebebeb; border: 1px dashed rgb(153, 153, 153); color: #000001; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code>

data loading;
input factor1-factor3;
cards;
-0.9280  -0.0481  0.2750
0.0563  -0.8833  0.5306
-0.9296  -0.0450  0.2720
-0.7534  0.1705  -0.5945
0.5917  -0.0251  -0.6450
0.9082  0.3345    0.1118
-0.8086  0.4551  -0.3800
;
run;


proc transpose data=loading  out=loading2;
run;

data loading2(type=factor);
     retain _TYPE_ "PATTERN";
  set loading2;
run;


ods select none;
ods output OrthRotFactPat=OrthRotationOut;
ods output OrthTrans=OrthTrans;
proc factor  data=Loading2   method=pattern  rotate=varimax  simple;
         var col1-col7;
run;
ods select all;
</code></pre><br />
<br />
Reference:<br />
[1]<b> Huiwen Wang; Qiang Liu , Yongping Tu</b>, "<i>Interpretation of PLS Regression Models with VARIMAX Rotation",</i> Computational Statistics and Data Analysis, Vol.48 (2005) pp207 – 219<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/29815492-6855499064591918912?l=www.sas-programming.com' alt='' /></div><img src="http://feeds.feedburner.com/~r/SasProgramming/~4/Czh9u2dw6Cw" height="1" width="1"/>
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SAS中文论坛  

GMT+8, 2026-2-3 20:15 , Processed in 0.070686 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表