<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: New to SAS - Two questions on factor analysis proc in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/New-to-SAS-Two-questions-on-factor-analysis-proc/m-p/201476#M50289</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;1. Specify out= option on the proc factor statement.&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_factor_sect006.htm" title="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_factor_sect006.htm"&gt;http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_factor_sect006.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Specify outstat= option on hte proc factor statemnt, then use proc score. Example here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_score_sect017.htm" style="font-size: 10pt; line-height: 1.5em;" title="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_score_sect017.htm"&gt;SAS/STAT(R) 9.3 User's Guide&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Apr 2015 15:29:32 GMT</pubDate>
    <dc:creator>gergely_batho</dc:creator>
    <dc:date>2015-04-22T15:29:32Z</dc:date>
    <item>
      <title>New to SAS - Two questions on factor analysis proc</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/New-to-SAS-Two-questions-on-factor-analysis-proc/m-p/201475#M50288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to SAS so sorry if my questions are basic and thank you in advance for taking the time. Purely to experiment with the software, I am using a sample data file of random numbers - &lt;A href="https://drive.google.com/open?id=0B-RnBMDpi8q_cTI2eTd0MHc4eXc&amp;amp;authuser=0" title="https://drive.google.com/open?id=0B-RnBMDpi8q_cTI2eTd0MHc4eXc&amp;amp;authuser=0"&gt;SampleData.csv - Google Drive&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see in this file, the first column lists the observation number (range 1-100), second column is a response variable called 'ResponseVar', followed by 10 columns labeled 'PredictorN' where N=(1,10)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in the R software package, I can perform a principal component analysis on the predictor variables to obtain my 10 eigenvalues, a 10x10 rotation matrix of eigenvectors, and my 100x10 transformed matrix. For reference, I obtain this in R with the prcomp function in the stats library.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to replicate this in SAS University Edition (I'm running thru Oracle's VirtualBox on my MacBook) using the following program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;
&lt;P&gt;ods graphics on;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;data getdata;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile "/folders/myfolders/Sample.csv"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Firstobs=2 LRECL=1000000000 DLM=',';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; input&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TrialNum ResponseVar Predictor1 Predictor2 Predictor3 Predictor4 Predictor5 Predictor6 Predictor7 Predictor8 Predictor9 Predictor10&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;data regressors; set getdata;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop TrialNum ResponseVar;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;/*&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug code&lt;/P&gt;
&lt;P&gt;proc print data=regressors; run;&lt;/P&gt;
&lt;P&gt;*/&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;proc factor data=regressors &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; simple corr&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mineigen=0 /*Retain all factors*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; All /*Display all optional data*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The factor proc step indicates it has read and used 100 records, it calculates the 10 eigenvalues, it generates the 10x10&amp;nbsp; eigenvectors but it does not generate my 100x10 matrix of transformed data. I suppose I could copy the output of the program and then run a new program to manually generate the transformed data by multiplying each observation by the transpose of the eigenmatrix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my questions are:&lt;/P&gt;&lt;P&gt;1) is there a pre-programmed routine to generate the transformed data for the 100 observations in terms of principal components&lt;/P&gt;&lt;P&gt;AND&lt;/P&gt;&lt;P&gt;2) if I wanted to do this manually, is there a way to grab the output of the 'proc factor data=regressors' step so that I can use the eigenvector matrix for computation rather than copying the output, reading into a new program, etc. ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again to all in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 13:20:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/New-to-SAS-Two-questions-on-factor-analysis-proc/m-p/201475#M50288</guid>
      <dc:creator>Anon794</dc:creator>
      <dc:date>2015-04-22T13:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: New to SAS - Two questions on factor analysis proc</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/New-to-SAS-Two-questions-on-factor-analysis-proc/m-p/201476#M50289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;1. Specify out= option on the proc factor statement.&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_factor_sect006.htm" title="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_factor_sect006.htm"&gt;http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_factor_sect006.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Specify outstat= option on hte proc factor statemnt, then use proc score. Example here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_score_sect017.htm" style="font-size: 10pt; line-height: 1.5em;" title="http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_score_sect017.htm"&gt;SAS/STAT(R) 9.3 User's Guide&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 15:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/New-to-SAS-Two-questions-on-factor-analysis-proc/m-p/201476#M50289</guid>
      <dc:creator>gergely_batho</dc:creator>
      <dc:date>2015-04-22T15:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: New to SAS - Two questions on factor analysis proc</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/New-to-SAS-Two-questions-on-factor-analysis-proc/m-p/201477#M50290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, sir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2015 17:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/New-to-SAS-Two-questions-on-factor-analysis-proc/m-p/201477#M50290</guid>
      <dc:creator>Anon794</dc:creator>
      <dc:date>2015-04-22T17:01:32Z</dc:date>
    </item>
  </channel>
</rss>

