<?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: Factor analysis using maximum likelihood estimation in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321094#M3183</link>
    <description>&lt;P&gt;Able to modify my program.. now getting results for even repetation...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much sir for all the guidence given to me...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still I have to do some modifications in program but may be now I am able to do it.&lt;/P&gt;&lt;P&gt;May be repetation is time consuming but still will be trying to improve it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If in future would have any problem will come back once again&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you sir.&lt;/P&gt;</description>
    <pubDate>Sun, 25 Dec 2016 14:58:14 GMT</pubDate>
    <dc:creator>stuti</dc:creator>
    <dc:date>2016-12-25T14:58:14Z</dc:date>
    <item>
      <title>Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318043#M3120</link>
      <description>&lt;P&gt;I want to know the program running behind factor analysis maximum likelihood extraction method. Can i get the inbuilt algorithm for that so that i can verify my result mannually?&lt;/P&gt;&lt;P&gt;my program is given bellow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;start mlfa;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;s = r_samp;/* r_samp is my generated correlation matrix data*/&lt;/P&gt;&lt;P&gt;/* objective function module */&lt;/P&gt;&lt;P&gt;start objfun (x) global(s, k, p, xpsy, sigma, lambda, omega, f);&lt;/P&gt;&lt;P&gt;xpsy = diag(&lt;STRONG&gt;1&lt;/STRONG&gt;/sqrt(x));&lt;/P&gt;&lt;P&gt;A = xpsy*s*xpsy;&lt;/P&gt;&lt;P&gt;Omega = (eigvec(A)) [,&lt;STRONG&gt;1&lt;/STRONG&gt;:k];&lt;/P&gt;&lt;P&gt;theta = (eigval(A)) [&lt;STRONG&gt;1&lt;/STRONG&gt;:k];&lt;/P&gt;&lt;P&gt;lambda = diag(sqrt(x))*omega*diag(sqrt(abs(theta-&lt;STRONG&gt;1&lt;/STRONG&gt;)));&lt;/P&gt;&lt;P&gt;sigma = lambda*t(lambda)+diag(x);&lt;/P&gt;&lt;P&gt;f = trace(inv(sigma)*s)- log((inv(sigma)*s)- p;&lt;/P&gt;&lt;P&gt;return(f);&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;/* Gradient function module */&lt;/P&gt;&lt;P&gt;start gradfun(x) global(s, sigma);&lt;/P&gt;&lt;P&gt;invpsy = inv(diag(x));&lt;/P&gt;&lt;P&gt;g = (vecdiag(invpsy*(sigma-s)*invpsy))`;&lt;/P&gt;&lt;P&gt;return(g);&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;/* starting values for iteration */&lt;/P&gt;&lt;P&gt;p = ncol(s);&lt;/P&gt;&lt;P&gt;x = log(((&lt;STRONG&gt;1&lt;/STRONG&gt;-k/(&lt;STRONG&gt;2&lt;/STRONG&gt;#p))#(&lt;STRONG&gt;1&lt;/STRONG&gt;/vecdiag(inv(s))));&lt;/P&gt;&lt;P&gt;/* Set up Options and Constraints */&lt;/P&gt;&lt;P&gt;option = {&lt;STRONG&gt;0 0 . 4&lt;/STRONG&gt;};&lt;/P&gt;&lt;P&gt;con = j(&lt;STRONG&gt;1&lt;/STRONG&gt;,p, &lt;STRONG&gt;0.00001&lt;/STRONG&gt;)//j(&lt;STRONG&gt;1&lt;/STRONG&gt;,p,&lt;STRONG&gt;.&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;call nlpqn(rc, xr, "objfun", x, option, con) grd = "gradfun";&lt;/P&gt;&lt;P&gt;r_star = lambda*lambda`;&lt;/P&gt;&lt;P&gt;h_vec = vecdiag(r_star);&lt;/P&gt;&lt;P&gt;all_e_vec = eigvec(R_star);&lt;/P&gt;&lt;P&gt;e_vec = all_e_vec[,&lt;STRONG&gt;1&lt;/STRONG&gt;:k];&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;start mlfa_extract;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run &lt;/STRONG&gt;mlfa;&lt;/P&gt;&lt;P&gt;if rc &amp;lt; &lt;STRONG&gt;0 &lt;/STRONG&gt;then m_rc0 = &lt;STRONG&gt;1&lt;/STRONG&gt;; else m_rc0 = &lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;if rc = &lt;STRONG&gt;3 &lt;/STRONG&gt;then m_rc3 = &lt;STRONG&gt;1&lt;/STRONG&gt;; else m_rc3 = &lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;if rc = &lt;STRONG&gt;6 &lt;/STRONG&gt;then m_rc6 = &lt;STRONG&gt;1&lt;/STRONG&gt;; else m_rc6 = &lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it correct or i need to do any change for mle?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2016 07:26:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318043#M3120</guid>
      <dc:creator>stuti</dc:creator>
      <dc:date>2016-12-10T07:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318073#M3122</link>
      <description>&lt;P&gt;A few comments:&lt;/P&gt;
&lt;P&gt;1. The discussion forum usually doesn't say whether a program is correct. If you are having a programming problem, we help you with that problem. Is there a particular part of the program that you want help with?&lt;/P&gt;
&lt;P&gt;2. Do you have a reference for the computations you are attempting? It is hard to assess a program without knowing the mathematical formulas it is trying to solve.&lt;/P&gt;
&lt;P&gt;3. Do you have sample data that we can use?&lt;/P&gt;
&lt;P&gt;4. I would eliminate the &amp;nbsp;MLFA &amp;nbsp;module and just put the data definitions and the call to NLPQN as statements in the main program.&lt;/P&gt;
&lt;P&gt;5. The MLFA_EXTRACT module seems to be unfinished.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Overall it looks like you are off to a &amp;nbsp;good start. If you haven't read the article &lt;A href="http://blogs.sas.com/content/iml/2011/10/12/maximum-likelihood-estimation-in-sasiml.html" target="_self"&gt;"Maximum likelihood estimation in SAS/IML,"&lt;/A&gt;&amp;nbsp;that is a good article to read.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2016 11:43:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318073#M3122</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-12-10T11:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318210#M3123</link>
      <description>&lt;P&gt;Sir,&lt;/P&gt;&lt;P&gt;I am doing ML estimation of factor analysis. I am attaching&amp;nbsp;ibm spss calculation for ML in factor analysis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running my program&amp;nbsp;on manipulated&amp;nbsp;data having 10 variables for samplesize 30 and pre assumed existance of 2 factors. and if i compare my results with sas university edition inbuilt task program of factor analysis &amp;nbsp;then i am getting different results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i need to correct my mle function and for that i need help.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2016 06:33:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318210#M3123</guid>
      <dc:creator>stuti</dc:creator>
      <dc:date>2016-12-12T06:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318211#M3124</link>
      <description>&lt;P&gt;I am also attaching excel file as the sample data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On that i ran my program and sas factor analysis using mle.&lt;/P&gt;&lt;P&gt;but the answers are different.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2016 06:36:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318211#M3124</guid>
      <dc:creator>stuti</dc:creator>
      <dc:date>2016-12-12T06:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318257#M3126</link>
      <description>&lt;P&gt;The tasks in the SAS University Edition generate SAS code, probably by submitting code for &lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_factor_toc.htm" target="_self"&gt;PROC FACTOR&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;We need to see the SAS code to know what options you have selected for the algorithm because there are many options in PROC FACTOR, and eash option leads to different results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thus the first step should be to look at the SAS code that is generated by the task. Click on the CODE tab to see the code. Then look at the PROC FACTOR documentation to determine how the options affect the factor analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems like this isn't really a SAS/IML question. It is really a question about understanding what&amp;nbsp;PROC FACTOR code is being submitted when you use the "Factor Analysis"&amp;nbsp;task in SAS UE.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2016 12:56:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318257#M3126</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-12-12T12:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318464#M3127</link>
      <description>&lt;P&gt;Yes sir&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use the same algorithm which is used by sas UE in&amp;nbsp;&amp;nbsp; proc factor method= ml.&lt;/P&gt;&lt;P&gt;but even in sas documentation, i am unable to find ml method steps.&lt;/P&gt;&lt;P&gt;so if anyone can give me proc factor method=ml inbuilt calculation steps (software inbuilt calculation algorithm) then it would be a great help. because I am developing my simulated data and on that I can't call sas UE proc factor option directly, so i need to go for all sas statements which produces proc factor method= ml output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 06:20:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318464#M3127</guid>
      <dc:creator>stuti</dc:creator>
      <dc:date>2016-12-13T06:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318524#M3128</link>
      <description>&lt;P&gt;You say&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;even in sas documentation, i am unable to find ml method steps&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The SAS documentation says &amp;nbsp;that method=ML "performs maximum likelihood factor analysis with an algorithm due to Fuller (1987)" and gives the reference &amp;nbsp;Fuller, W. A. (1987). &lt;A href="http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470095717.html" target="_self"&gt;&lt;EM&gt;Measurement Error Models&lt;/EM&gt;.&lt;/A&gt; New York: John Wiley &amp;amp; Sons.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You say&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp; I am developing my simulated data and on that I can't call sas UE proc factor option directly&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yes, you can. It is easy to simulate data and call PROC&amp;nbsp;FACTOR.&amp;nbsp;Look for my many blog articles on simulating data or my book &lt;EM&gt;Simulating Data with SAS&lt;/EM&gt; (2013) for many examples of calling SAS procedres on simulated data. Good ones to start with are&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://blogs.sas.com/content/iml/2012/07/18/simulation-in-sas-the-slow-way-or-the-by-way.html" target="_self"&gt;Simulation in SAS: The slow way of the BY way&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.sas.com/content/iml/2014/06/27/simulate-many-samples-from-a-logistic-regression-model.html" target="_self"&gt;Simulate many samples from a logistic model&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings15/SAS1387-2015.pdf" target="_self"&gt;Ten tips for simulating data with SAS&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 11:24:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318524#M3128</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-12-13T11:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318586#M3129</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; if anyone can give me proc factor method=ml inbuilt calculation steps (software inbuilt calculation algorithm) then it would be a great help.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Just to be clear, there is no such thing. To run the algorithm you run PROC FACTOR. &amp;nbsp;Since you are posting this question to the SAS./IML group, I will point out that you can &lt;A href="http://blogs.sas.com/content/iml/2011/10/24/video-calling-sas-procedures-from-the-sasiml-language.html" target="_self"&gt;call SAS procedures from SAS/IML programs&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2016 15:18:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/318586#M3129</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-12-13T15:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/319791#M3152</link>
      <description>&lt;P&gt;Thank you so much sir.&lt;/P&gt;&lt;P&gt;I am able to use now proc factor in my simulation program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One more question can i give name as say matrix 'samp' to only the outcome of mle extraction - rotated factor pattern matrix?&lt;/P&gt;&lt;P&gt;and how can i use &amp;nbsp;and save that samp in further program?&lt;/P&gt;&lt;P&gt;once again thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2016 07:18:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/319791#M3152</guid>
      <dc:creator>stuti</dc:creator>
      <dc:date>2016-12-18T07:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/319800#M3154</link>
      <description>&lt;P&gt;I'm sorry, but I do not understand what you are asking. Can you provide a simple example?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SAS/IML, &lt;A href="http://blogs.sas.com/content/iml/2013/07/29/read-data-sets-array-names.html" target="_self"&gt;you can specify the names of SAS data sets at run time.&lt;/A&gt;&amp;nbsp;You &lt;A href="http://blogs.sas.com/content/iml/2013/06/03/passing-values-into-procedures.html" target="_self"&gt;use optional arguments in the SUBMIT statement&lt;/A&gt; to pass data set names to PROC FACTOR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Dec 2016 12:33:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/319800#M3154</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-12-18T12:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/319835#M3158</link>
      <description>&lt;P&gt;Hello sir&lt;/P&gt;&lt;P&gt;I am attachong one output file which contains one highlited rotated pattern matrix.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the program after calculating till this step i nedd to calculate Bias which is A1(the first matrix in that file) minus that rotated matrix and then i have to go for further calculation in same manner on rotated pattern matrix.&lt;/P&gt;&lt;P&gt;So I just need rotated pattern matrix('Samp') in further calculation out of all other ml outcomes. &amp;nbsp;the ml procedure which I have used in the program is as follows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc factor data=WORK.data1 method=ml rotate=varimax noint nfactors=2&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;norm=kaiser heywood plots=(scree) outstat=WORK.Factor_ml1;&lt;BR /&gt;var col1 col2 col3 col4 col5 col6 col7 col8 col9 col10;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;How to just save the rotteted pattern like A1. so that i can find bias. Even I am attaching one excel sheet how to find mannually bias and its average.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2016 03:24:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/319835#M3158</guid>
      <dc:creator>stuti</dc:creator>
      <dc:date>2016-12-19T03:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/319912#M3159</link>
      <description>&lt;P&gt;You can use the ODS OUTPUT statement to create a SAS data set from any output from any SAS procedure. The steps are&lt;/P&gt;
&lt;P&gt;1) Put ODS TRACE ON; before you run &amp;nbsp;PROC FACTOR.&lt;/P&gt;
&lt;P&gt;2) Run PROC FACTOR. In the SAS lof you will see the names of all ODS tables that were created. The one that you want appears to be OrthRotFactPat.&lt;/P&gt;
&lt;P&gt;3) Put ODS OUTPUT&amp;nbsp;OrthRotFactPat=RotFactPattern; before the PROC FACTOR step. Rerun. The data set&amp;nbsp;&lt;SPAN&gt;RotFactPattern contains the information you want. You can use PROC PRINT and PROC CONTENTS to figure out names of variables.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Altogether, it will look like this example:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on;
proc factor data=sashelp.cars method=ml rotate=varimax noint nfactors=2
                 norm=kaiser heywood plots=(scree) outstat=WORK.Factor_ml1;
/* use all numeric vars */
run;
ods trace off;

/* from the SAS log, it looks like the name of the table 
   we want is OrthRotFactPat */
ods output OrthRotFactPat=RotFactPattern;
proc factor data=sashelp.cars method=ml rotate=varimax noint nfactors=2
                 norm=kaiser heywood plots=(scree) outstat=WORK.Factor_ml1;
run;

proc print data=RotFactPattern; run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2016 13:25:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/319912#M3159</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-12-19T13:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/320089#M3160</link>
      <description>&lt;P&gt;Thank you so much sir&lt;/P&gt;&lt;P&gt;I am able to use Ods trace in my program and getting that rotated factor matrix in my output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;further can you please guide me how to find Bias which is difference between A1 and rotated factor matrix.&lt;/P&gt;&lt;P&gt;In the last post I have attached mannual excel file for this. after calculating rotated factor pattern matix for the generated sample, I need to compare the original population factor matrix A1 and Mle method generated factor matix using comparision parameters like Bias, Mean square Error, Phi, Factor loading sensitivity and specificity. so if I am able to do calculation for bias may be I will try for other parameters in same manner.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 02:53:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/320089#M3160</guid>
      <dc:creator>stuti</dc:creator>
      <dc:date>2016-12-20T02:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/320182#M3161</link>
      <description>&lt;P&gt;If the population parameters are in the matrix A1 in a SSA/IML program, then&lt;/P&gt;
&lt;P&gt;1) &lt;A href="http://blogs.sas.com/content/iml/2016/02/08/read-data-into-vectors-or-matrix.html" target="_self"&gt;Read the RotFactPattern matrix &lt;/A&gt;into the same SAS/IML session.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;use RotFactPattern;&lt;/P&gt;
&lt;P&gt;read all var {Factor1 Factor2} into R; &amp;nbsp; / * matrix R contains rotated factors */&lt;/P&gt;
&lt;P&gt;close RotFactPattern;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) Compute the statistics. For example, if bias is the &amp;nbsp;different between the parameters&amp;nbsp;and the estimates, then&lt;/P&gt;
&lt;P&gt;Bias = A1 - &amp;nbsp;R;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I feel confident that if you work at this that you will succeed. Best wishes and good luck to you.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 11:00:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/320182#M3161</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-12-20T11:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321030#M3175</link>
      <description>&lt;P&gt;Hello sir&lt;/P&gt;&lt;P&gt;I have first developed the population matrix. Then I derived sample correlation matrix and using CREATE converted into work.samp.data &amp;nbsp;and used proc factor process by using submit and endsubmit statements on that data.. Only &amp;nbsp;rotated factor matrix is used as work.samp_ml.data and on that I used different comparison parameters of rotated matrix and pop matrix A1.&lt;/P&gt;&lt;P&gt;Now I want to replicate the same process say for 1000 sample correlation matrices &amp;nbsp;and then I want to take up average of all comparision parameters.&lt;/P&gt;&lt;P&gt;While doing the replication in proc iml &amp;nbsp;I am getting following error:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR: You cannot open WORK.SAMP_ML.DATA for output access with member-level control because WORK.SAMP_ML.DATA is in use by &amp;nbsp;you in resource environment IML (2).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;&lt;SPAN&gt;statement : SUBMIT at line....column 1&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me to solve this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Dec 2016 07:24:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321030#M3175</guid>
      <dc:creator>stuti</dc:creator>
      <dc:date>2016-12-24T07:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321040#M3179</link>
      <description>&lt;P&gt;That error message will appear if you open a data set, do not close it, and then try to open it again. &amp;nbsp;Use the CLOSE statement, like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;do i = 1 to 10;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;use samp_ml; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* open the data set */&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;read all var _num_ into X;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; CLOSE samp_ml; &amp;nbsp;/* &amp;lt;== this is the statement you need */&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Dec 2016 10:55:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321040#M3179</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-12-24T10:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321077#M3180</link>
      <description>&lt;P&gt;I have already used close statement but in log it gives the message "&amp;nbsp;&lt;SPAN&gt;&lt;FONT color="#0000FF"&gt;Cannot close WORK.SMAP_ML; it is not open.&lt;/FONT&gt;"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 06:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321077#M3180</guid>
      <dc:creator>stuti</dc:creator>
      <dc:date>2016-12-25T06:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321080#M3181</link>
      <description>&lt;P&gt;If the error is coming from the SUBMIT statement in which you call PROC FACTOR, then you need to close the data set before the SUBMIT statement. &amp;nbsp;PROC FACTOR can't write to a data set that is already in use.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 11:46:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321080#M3181</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-12-25T11:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321084#M3182</link>
      <description>&lt;P&gt;yes sir may be error was because of submit statement. I have used close statement earlier to submit but for repetition&amp;nbsp;still without any error&amp;nbsp;message in log, I am not getting answers of all calculations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For your reference I am coping&amp;nbsp;the entire program here, may be little lengthy but if in first line I use rep=1 then I am getting all results but if I change it even to 2 then I don't get the results of Accuracy, bias and all other parameters. So how to do this repetitions?&lt;/P&gt;&lt;P&gt;Thank you so much for your help. I have learned sas programming just because of this and still trying to learn because of the help provided by you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;%let rep=1; * N of samples from each population;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;**********************************************************************;&lt;/P&gt;&lt;P&gt;*************** Begin Specification of Data Conditions ***************;&lt;/P&gt;&lt;P&gt;**********************************************************************;&lt;/P&gt;&lt;P&gt;p = 10; *20; *40; *60;&lt;/P&gt;&lt;P&gt;k = 2; *2; *4; *8;&lt;/P&gt;&lt;P&gt;d_frac = 1; *.05; *.25; *.50; *.75; *.95;&lt;/P&gt;&lt;P&gt;Commun_type = 1;&lt;/P&gt;&lt;P&gt;N_pops = 1; * N of populations to generate;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;nn1 = 100000;&lt;/P&gt;&lt;P&gt;means=j(1,p,0);&lt;/P&gt;&lt;P&gt;variance = j(1,p,1);&lt;/P&gt;&lt;P&gt;********************************************************************;&lt;/P&gt;&lt;P&gt;start Make_PopR(nvars,nfactors,commun_type,A1,R);&lt;/P&gt;&lt;P&gt;* program to generate the population covariance matrices&lt;/P&gt;&lt;P&gt;* Inputs are nvars = number of variables in the matrix&lt;/P&gt;&lt;P&gt;nfactors = number of factors&lt;/P&gt;&lt;P&gt;commun = Type of communality&lt;/P&gt;&lt;P&gt;Output is R = population correlation matrix;&lt;/P&gt;&lt;P&gt;bp1=j(nvars,nvars,0);&lt;/P&gt;&lt;P&gt;bp2=uniform(bp1);&lt;/P&gt;&lt;P&gt;if commun_type=3 then do;&lt;/P&gt;&lt;P&gt;bp3=(bp2*.2999999)+.55;&lt;/P&gt;&lt;P&gt;b1square=round(diag(bp3),.1);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if commun_type=1 then do;&lt;/P&gt;&lt;P&gt;bp3=(bp2*.2999999)+.15;&lt;/P&gt;&lt;P&gt;b1square=round(diag(bp3),.1);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if commun_type=2 then do;&lt;/P&gt;&lt;P&gt;bp3=(bp2*.6999999)+.15;&lt;/P&gt;&lt;P&gt;b1square=round(diag(bp3),.1);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;B1=b1square##.5;&lt;/P&gt;&lt;P&gt;b3square=I(nvars)-b1square;&lt;/P&gt;&lt;P&gt;B3=b3square##.5;&lt;/P&gt;&lt;P&gt;A1tilde1=j(nvars,nfactors,0);&lt;/P&gt;&lt;P&gt;A1tilde2=round((uniform(A1tilde1)*(nfactors-.00000001))-.5);&lt;/P&gt;&lt;P&gt;A1tilde=A1tilde2;&lt;/P&gt;&lt;P&gt;do j=2 to nfactors;&lt;/P&gt;&lt;P&gt;do i=1 to nvars;&lt;/P&gt;&lt;P&gt;if j&amp;lt;nfactors then do;&lt;/P&gt;&lt;P&gt;A1tilde[i,j]=round(((nfactors-.00000001-sum(A1tilde[i,1:j-1]))&lt;/P&gt;&lt;P&gt;*uniform(0))-.5);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if j=nfactors then do;&lt;/P&gt;&lt;P&gt;A1tilde[i,nfactors]=nfactors-sum(A1tilde[i,1:nfactors-1])-1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;x=normal(A1tilde);&lt;/P&gt;&lt;P&gt;x2=x##2;&lt;/P&gt;&lt;P&gt;d=j(nvars,nfactors,0);&lt;/P&gt;&lt;P&gt;do j=1 to nfactors;&lt;/P&gt;&lt;P&gt;do i=1 to nvars;&lt;/P&gt;&lt;P&gt;d[i,j]=(sum(x2[i,1:nfactors]))##-.5;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;cvec=j(1,nfactors,0);&lt;/P&gt;&lt;P&gt;do j=1 to nfactors;&lt;/P&gt;&lt;P&gt;cvec[1,j]=round((uniform(0)*.2999999)+.65,.1);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;c=j(nvars,1,1)*cvec;&lt;/P&gt;&lt;P&gt;c2=c##2;&lt;/P&gt;&lt;P&gt;ones=j(nvars,nfactors,1);&lt;/P&gt;&lt;P&gt;y=A1tilde#c + d#x#((ones-c2)##.5);&lt;/P&gt;&lt;P&gt;k=.2;&lt;/P&gt;&lt;P&gt;z=j(nvars,nfactors,0);&lt;/P&gt;&lt;P&gt;do j=1 to nfactors;&lt;/P&gt;&lt;P&gt;do i=1 to nvars;&lt;/P&gt;&lt;P&gt;z[i,j]=((1+k)*y[i,j]*(y[i,j]+abs(y[i,j])+k))/((2+k)*(abs(y[i,j])+k));&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;z2=z##2;&lt;/P&gt;&lt;P&gt;g=j(nvars,nfactors,0);&lt;/P&gt;&lt;P&gt;do j=1 to nfactors;&lt;/P&gt;&lt;P&gt;do i=1 to nvars;&lt;/P&gt;&lt;P&gt;g[i,j]=(sum(z2[i,1:nfactors]))##-.5;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;A1star=g#z;&lt;/P&gt;&lt;P&gt;A1=B1*A1star;&lt;/P&gt;&lt;P&gt;A3star=I(nvars);&lt;/P&gt;&lt;P&gt;A3=B3*A3star;&lt;/P&gt;&lt;P&gt;R=A1*A1`+A3*A3`;&lt;/P&gt;&lt;P&gt;Finish;&lt;/P&gt;&lt;P&gt;start gendata2a(NN1,seed1,variance,bb,cc,dd,mu,r_matrix,YY,p,d_frac);&lt;/P&gt;&lt;P&gt;L = eigval(r_matrix);&lt;/P&gt;&lt;P&gt;neg_eigval = 0;&lt;/P&gt;&lt;P&gt;do r = 1 to nrow(L);&lt;/P&gt;&lt;P&gt;if L[r,1] &amp;lt; 0 then neg_eigval = 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if neg_eigval = 0 then do; * matrix is positive definite, so use the Cholesky root approach;&lt;/P&gt;&lt;P&gt;COLS = NCOL(r_matrix);&lt;/P&gt;&lt;P&gt;G = ROOT(r_matrix);&lt;/P&gt;&lt;P&gt;YY=rannor(repeat(seed1,nn1,COLS));&lt;/P&gt;&lt;P&gt;YY = YY*G;&lt;/P&gt;&lt;P&gt;do r = 1 to NN1;&lt;/P&gt;&lt;P&gt;do c = 1 to COLS;&lt;/P&gt;&lt;P&gt;YY[r,c] = (-1*cc) + (bb*YY[r,c]) + (cc*YY[r,c]##2) + (dd*YY[r,c]##3);&lt;/P&gt;&lt;P&gt;YY[r,c] = (YY[r,c] * SQRT(variance[1,c])) + mu[1,c];&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if neg_eigval = 1 then do; * matrix is not positive definite, so use the PCA approach;&lt;/P&gt;&lt;P&gt;COLS = NCOL(r_matrix);&lt;/P&gt;&lt;P&gt;V = eigvec(r_matrix);&lt;/P&gt;&lt;P&gt;do i = 1 to nrow(L);&lt;/P&gt;&lt;P&gt;do j = 1 to ncol(V);&lt;/P&gt;&lt;P&gt;if L[i,1] &amp;gt; 0 then V[j,i] = V[j,i] # sqrt(L[i,1]);&lt;/P&gt;&lt;P&gt;if L[i,1] &amp;lt;= 0 then V[j,i] = V[j,i] # sqrt(.000000001);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;YY=rannor(repeat(seed1,nn1,COLS));&lt;/P&gt;&lt;P&gt;YY = V*YY`;&lt;/P&gt;&lt;P&gt;YY = YY`;&lt;/P&gt;&lt;P&gt;do r = 1 to NN1;&lt;/P&gt;&lt;P&gt;do c = 1 to COLS;&lt;/P&gt;&lt;P&gt;YY[r,c] = (-1*cc) + (bb*YY[r,c]) + (cc*YY[r,c]##2) + (dd*YY[r,c]##3);&lt;/P&gt;&lt;P&gt;YY[r,c] = (YY[r,c] * SQRT(variance[1,c])) + mu[1,c];&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;do r = 1 to nn1;&lt;/P&gt;&lt;P&gt;do c = 1 to (p*d_frac);&lt;/P&gt;&lt;P&gt;if yy[r,c] &amp;lt; 0 then yy[r,c] = 0;&lt;/P&gt;&lt;P&gt;else if yy[r,c] = 0 then yy[r,c] = 1;&lt;/P&gt;&lt;P&gt;else if yy[r,c] &amp;gt; 0 then yy[r,c] = 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;start gendata2b(NN2,seed1,variance,bb,cc,dd,mu,r_matrix,YY,p,d_frac);&lt;/P&gt;&lt;P&gt;L = eigval(r_matrix);&lt;/P&gt;&lt;P&gt;neg_eigval = 0;&lt;/P&gt;&lt;P&gt;do r = 1 to nrow(L);&lt;/P&gt;&lt;P&gt;if L[r,1] &amp;lt; 0 then neg_eigval = 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if neg_eigval = 0 then do; * matrix is positive definite, so use the Cholesky root approach;&lt;/P&gt;&lt;P&gt;COLS = NCOL(r_matrix);&lt;/P&gt;&lt;P&gt;G = ROOT(r_matrix);&lt;/P&gt;&lt;P&gt;YY=rannor(repeat(seed1,nn2,COLS));&lt;/P&gt;&lt;P&gt;YY = YY*G;&lt;/P&gt;&lt;P&gt;do r = 1 to NN2;&lt;/P&gt;&lt;P&gt;do c = 1 to COLS;&lt;/P&gt;&lt;P&gt;YY[r,c] = (-1*cc) + (bb*YY[r,c]) + (cc*YY[r,c]##2) + (dd*YY[r,c]##3);&lt;/P&gt;&lt;P&gt;YY[r,c] = (YY[r,c] * SQRT(variance[1,c])) + mu[1,c];&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if neg_eigval = 1 then do;&lt;/P&gt;&lt;P&gt;COLS = NCOL(r_matrix);&lt;/P&gt;&lt;P&gt;V = eigvec(r_matrix);&lt;/P&gt;&lt;P&gt;do i = 1 to nrow(L);&lt;/P&gt;&lt;P&gt;do j = 1 to ncol(V);&lt;/P&gt;&lt;P&gt;if L[i,1] &amp;gt; 0 then V[j,i] = V[j,i] # sqrt(L[i,1]);&lt;/P&gt;&lt;P&gt;if L[i,1] &amp;lt;= 0 then V[j,i] = V[j,i] # sqrt(.000000001);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;YY=rannor(repeat(seed1,nn2,COLS));&lt;/P&gt;&lt;P&gt;YY = V*YY`;&lt;/P&gt;&lt;P&gt;YY = YY`;&lt;/P&gt;&lt;P&gt;do r = 1 to NN2;&lt;/P&gt;&lt;P&gt;do c = 1 to COLS;&lt;/P&gt;&lt;P&gt;YY[r,c] = (-1*cc) + (bb*YY[r,c]) + (cc*YY[r,c]##2) + (dd*YY[r,c]##3);&lt;/P&gt;&lt;P&gt;YY[r,c] = (YY[r,c] * SQRT(variance[1,c])) + mu[1,c];&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;do r = 1 to nn2;&lt;/P&gt;&lt;P&gt;do c = 1 to (p*d_frac);&lt;/P&gt;&lt;P&gt;if yy[r,c] &amp;lt; 0 then yy[r,c] = 0;&lt;/P&gt;&lt;P&gt;else if yy[r,c] = 0 then yy[r,c] = 1;&lt;/P&gt;&lt;P&gt;else if yy[r,c] &amp;gt; 0 then yy[r,c] = 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;* +----------------------------------------------------------------+&lt;/P&gt;&lt;P&gt;Subroutine computes bias, MSE and accuracy of factor loadings&lt;/P&gt;&lt;P&gt;Inputs: L = matrix of sample pattern coefficients&lt;/P&gt;&lt;P&gt;Lambda = matrix of population pattern coefficients&lt;/P&gt;&lt;P&gt;* +-----------------------------------------------------------------+;&lt;/P&gt;&lt;P&gt;START ACCURACY(L,Lambda,OK_Load,OK_NoLoad,bias_loadings,MSE_loadings,&lt;/P&gt;&lt;P&gt;pattern_accuracy,perfect_accuracy,&lt;/P&gt;&lt;P&gt;pattern_accuracy30,perfect_accuracy30);&lt;/P&gt;&lt;P&gt;p = nrow(L);&lt;/P&gt;&lt;P&gt;k = ncol(L);&lt;/P&gt;&lt;P&gt;pop_loaded = J(p,1,0);&lt;/P&gt;&lt;P&gt;do variable = 1 to p;&lt;/P&gt;&lt;P&gt;do factor = 1 to k;&lt;/P&gt;&lt;P&gt;if abs(Lambda[variable,factor]) &amp;gt;= .30 then pop_loaded[variable,1] = 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;sample_loaded = J(p,1,0);&lt;/P&gt;&lt;P&gt;do variable = 1 to p;&lt;/P&gt;&lt;P&gt;do factor = 1 to k;&lt;/P&gt;&lt;P&gt;if abs(L[variable,factor]) &amp;gt;= .30 then sample_loaded[variable,1] = 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;OK_Load = 0;&lt;/P&gt;&lt;P&gt;OK_NoLoad = 0;&lt;/P&gt;&lt;P&gt;do variable = 1 to p;&lt;/P&gt;&lt;P&gt;if sample_loaded[variable,1] = 1 &amp;amp; pop_loaded[variable,1] = 1 then&lt;/P&gt;&lt;P&gt;OK_Load = OK_Load + 1;&lt;/P&gt;&lt;P&gt;if sample_loaded[variable,1] = 0 &amp;amp; pop_loaded[variable,1] = 0 then&lt;/P&gt;&lt;P&gt;OK_NoLoad = OK_NoLoad + 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;OK_Load = OK_Load / sum(pop_loaded); * proportion of variables with loading agreement;&lt;/P&gt;&lt;P&gt;if sum(pop_loaded) = p then OK_NoLoad = .;&lt;/P&gt;&lt;P&gt;if sum(pop_loaded) &amp;lt; p then OK_NoLoad = OK_NoLoad/(p-sum(pop_loaded));&lt;/P&gt;&lt;P&gt;* +------------------------------------------------+&lt;/P&gt;&lt;P&gt;Compute bias and MS Error in the factor loadings&lt;/P&gt;&lt;P&gt;* +------------------------------------------------+;&lt;/P&gt;&lt;P&gt;bias_loadings=j(p,k,0);&lt;/P&gt;&lt;P&gt;MSE_loadings=j(p,k,0);&lt;/P&gt;&lt;P&gt;do row =1 to p;&lt;/P&gt;&lt;P&gt;bias_loadings[row,]=L[row,]-lambda[row,];&lt;/P&gt;&lt;P&gt;MSE_loadings[row,]=(L[row,]-lambda[row,])##2;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;* +--------------------------------------------+&lt;/P&gt;&lt;P&gt;Compute pattern accuracy using the .30 thumb&lt;/P&gt;&lt;P&gt;* +--------------------------------------------+;&lt;/P&gt;&lt;P&gt;pattern_accuracy = j(p,k,0);&lt;/P&gt;&lt;P&gt;perfect_accuracy = 0;&lt;/P&gt;&lt;P&gt;pattern_accuracy30 = j(p,1,0);&lt;/P&gt;&lt;P&gt;perfect_accuracy30 = 0;&lt;/P&gt;&lt;P&gt;do variable = 1 to p;&lt;/P&gt;&lt;P&gt;NoLoad = 0;&lt;/P&gt;&lt;P&gt;do factor = 1 to k;&lt;/P&gt;&lt;P&gt;if (abs(Lambda[variable,factor]) &amp;gt;= .30 &amp;amp;&lt;/P&gt;&lt;P&gt;abs(L[variable,factor]) &amp;gt;= .30)&lt;/P&gt;&lt;P&gt;then do;&lt;/P&gt;&lt;P&gt;pattern_accuracy[variable,factor] = 1;&lt;/P&gt;&lt;P&gt;pattern_accuracy30[variable,1] = 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if (abs(Lambda[variable,factor]) &amp;lt; .30 &amp;amp;&lt;/P&gt;&lt;P&gt;abs(L[variable,factor]) &amp;lt; .30) then do;&lt;/P&gt;&lt;P&gt;pattern_accuracy[variable,factor] = 1;&lt;/P&gt;&lt;P&gt;NoLoad = NoLoad + 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if NoLoad = k then pattern_accuracy30[variable,1] = 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if mean(pattern_accuracy) = 1 then perfect_accuracy = 1;&lt;/P&gt;&lt;P&gt;if mean(pattern_accuracy30) = 1 then perfect_accuracy30 = 1;&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;*+_________________________________________________________________+&lt;/P&gt;&lt;P&gt;Subroutine to calculate coefficient of congruence - mean phi&lt;/P&gt;&lt;P&gt;+_________________________________________________________________+;&lt;/P&gt;&lt;P&gt;start get_phi(lambda,L,meanphi);&lt;/P&gt;&lt;P&gt;k = ncol(lambda);&lt;/P&gt;&lt;P&gt;num = vecdiag(lambda`*L);&lt;/P&gt;&lt;P&gt;den1 = vecdiag(lambda`*lambda);&lt;/P&gt;&lt;P&gt;den2 = vecdiag(L`*L);&lt;/P&gt;&lt;P&gt;phi_k = J(k,1,0);&lt;/P&gt;&lt;P&gt;meanphi = 0;&lt;/P&gt;&lt;P&gt;n_terms = 0;&lt;/P&gt;&lt;P&gt;do m = 1 to k;&lt;/P&gt;&lt;P&gt;if (den1[m,1]&amp;gt;0 &amp;amp; den2[m,1]&amp;gt;0) then do;&lt;/P&gt;&lt;P&gt;phi_k[m,1] = num[m,1] / sqrt(den1[m,1]#den2[m,1]);&lt;/P&gt;&lt;P&gt;meanphi = meanphi + phi_k[m,1];&lt;/P&gt;&lt;P&gt;n_terms = n_terms + 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if (den1[m,1] = 0 | den2[m,1] = 0) then do;&lt;/P&gt;&lt;P&gt;phi_k[m,1] = 999;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;meanphi = meanphi / n_terms;&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;start factor_scores(Lambda,L,sampdat,R_fscores,Non_zero);&lt;/P&gt;&lt;P&gt;*+________________________________________________________________________+&lt;/P&gt;&lt;P&gt;Compute Factor Score Estimates&lt;/P&gt;&lt;P&gt;+_______________________________________________________________________+;&lt;/P&gt;&lt;P&gt;p = nrow(L);&lt;/P&gt;&lt;P&gt;k = ncol(L);&lt;/P&gt;&lt;P&gt;SC =J(p,k,0);&lt;/P&gt;&lt;P&gt;SCP =J(p,k,0);&lt;/P&gt;&lt;P&gt;Non_zero = J(k,1,0);&lt;/P&gt;&lt;P&gt;do j = 1 to p;&lt;/P&gt;&lt;P&gt;do kk = 1 to k;&lt;/P&gt;&lt;P&gt;if L [j,kk] &amp;gt;= .3 then SC[j,kk]=1;&lt;/P&gt;&lt;P&gt;if L [j,kk] &amp;lt;= -.3 then SC[j,kk]=-1;&lt;/P&gt;&lt;P&gt;if Lambda [j,kk] &amp;gt;= .3 then do;&lt;/P&gt;&lt;P&gt;SCP[j,kk]=1;&lt;/P&gt;&lt;P&gt;Non_zero[kk,1] = 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if Lambda [j,kk] &amp;lt;= -.3 then do;&lt;/P&gt;&lt;P&gt;SCP[j,kk]=-1;&lt;/P&gt;&lt;P&gt;Non_zero[kk,1] = 1;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;FSE = sampdat*SC;&lt;/P&gt;&lt;P&gt;FS = sampdat*SCP;&lt;/P&gt;&lt;P&gt;FS_FSE = FSE||FS;&lt;/P&gt;&lt;P&gt;R_matrix = corr(FS_FSE);&lt;/P&gt;&lt;P&gt;R_matrix2 = R_matrix[k+1:2#k,1:k];&lt;/P&gt;&lt;P&gt;R_fscores = vecdiag(R_matrix2);&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;Do pop_num = 1 to N_pops; * Loop for 10 populations;&lt;/P&gt;&lt;P&gt;run Make_PopR(p,k,commun_type,A1,R_pop);&lt;/P&gt;&lt;P&gt;Lambda = A1;&lt;/P&gt;&lt;P&gt;numr = r_pop[+,+] - p;&lt;/P&gt;&lt;P&gt;deno = r_pop[+,+];&lt;/P&gt;&lt;P&gt;ratio = numr/deno;&lt;/P&gt;&lt;P&gt;f2_pop = (p/(p-1))*ratio;&lt;/P&gt;&lt;P&gt;r2_pop = f2_pop/(1+f2_pop);&lt;/P&gt;&lt;P&gt;corr = r_pop;&lt;/P&gt;&lt;P&gt;seed1=round(1000000*rannor(0));&lt;/P&gt;&lt;P&gt;*nn = 100000;&lt;/P&gt;&lt;P&gt;chg = 1;&lt;/P&gt;&lt;P&gt;cycle = 0;&lt;/P&gt;&lt;P&gt;corr_tmp = corr;&lt;/P&gt;&lt;P&gt;do until (chg = 0);&lt;/P&gt;&lt;P&gt;run gendata2a(NN1,seed1,variance,1,0,0,means,corr_tmp,sim_data,p,d_frac);&lt;/P&gt;&lt;P&gt;sim_corr = corr(sim_data);&lt;/P&gt;&lt;P&gt;resid_m = sim_corr - corr;&lt;/P&gt;&lt;P&gt;tot_res = sum(abs(resid_m));&lt;/P&gt;&lt;P&gt;if cycle = 0 then do;&lt;/P&gt;&lt;P&gt;best_corr = corr_tmp;&lt;/P&gt;&lt;P&gt;best_res = tot_res;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if cycle &amp;gt; 0 then do;&lt;/P&gt;&lt;P&gt;if tot_res &amp;lt; best_res then do;&lt;/P&gt;&lt;P&gt;best_corr = corr_tmp;&lt;/P&gt;&lt;P&gt;best_res = tot_res;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if tot_res &amp;lt; (.005#(((p-1)#p)/2)) then CHG = 0; * Convergence!;&lt;/P&gt;&lt;P&gt;if cycle &amp;gt; 30 then do;&lt;/P&gt;&lt;P&gt;if tot_res &amp;lt; (.01#(((p-1)#p)/2)) then CHG = 0; * Convergence!;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if cycle &amp;gt; 200 then CHG = 0;&lt;/P&gt;&lt;P&gt;if CHG = 1 then corr_tmp = corr_tmp - resid_m; * adjust template and simulate another&lt;/P&gt;&lt;P&gt;large sample;&lt;/P&gt;&lt;P&gt;cycle = cycle + 1;&lt;/P&gt;&lt;P&gt;if CHG = 0 then do;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;do S_Size =1 to 1; * Loop for sample sizes;&lt;/P&gt;&lt;P&gt;if S_Size = 1 then Sampsize2=3*P;&lt;/P&gt;&lt;P&gt;if S_Size = 2 then Sampsize2=2*p;&lt;/P&gt;&lt;P&gt;if S_Size = 3 then Sampsize2=p;&lt;/P&gt;&lt;P&gt;if S_Size = 4 then Sampsize2=4*p;&lt;/P&gt;&lt;P&gt;if S_Size=5 then Sampsize2=5*p;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Loop for 1000 Samples;&lt;/P&gt;&lt;P&gt;**********************************************************:&lt;/P&gt;&lt;P&gt;* Begin data generation *;&lt;/P&gt;&lt;P&gt;**********************************************************;&lt;/P&gt;&lt;P&gt;seed1=round(1000000*ranuni(0));&lt;/P&gt;&lt;P&gt;nn2 = sampsize2;&lt;/P&gt;&lt;P&gt;corr_tmp = best_corr;&lt;/P&gt;&lt;P&gt;run gendata2b(NN2,seed1,variance,1,0,0,means,corr_tmp,sim_data,p,d_frac);&lt;/P&gt;&lt;P&gt;sampdat = sim_data;&lt;/P&gt;&lt;P&gt;r_samp=corr(sampdat);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;print sampdat;&lt;/P&gt;&lt;P&gt;print A1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;CREATE SAMP FROM SAMPDAT ;APPEND FROM SAMPDAT; CLOSE SAMP;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;close work.smap_ml;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;SUBMIT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ods output OrthRotFactPat=samp_ml;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc factor data=WORK.samp method=ml priors=smc&amp;nbsp; rotate=varimax noint nfactors=2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; norm=kaiser heywood&amp;nbsp; ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var col1 col2 col3 col4 col5 col6 col7 col8 col9 col10;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc print data=samp_ml;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;ENDSUBMIT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;use work.samp_ml;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* open the data set */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;read all var {"Factor1" "Factor2" }into L;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;close work.samp_ml;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;run ACCURACY(L,Lambda,OK_Load,OK_NoLoad,bias_loadings,MSE_loadings,&lt;/P&gt;&lt;P&gt;pattern_accuracy,perfect_accuracy,&lt;/P&gt;&lt;P&gt;pattern_accuracy30,perfect_accuracy30);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run get_phi(lambda,L,meanphi);&lt;/P&gt;&lt;P&gt;run factor_scores(Lambda,L,sampdat,R_fscores,Non_zero);&lt;/P&gt;&lt;P&gt;if &amp;amp;rep = 1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_ok_load_m = ok_load;&lt;/P&gt;&lt;P&gt;_ok_Noload_m = ok_Noload;&lt;/P&gt;&lt;P&gt;_Bias_Loadings_m = Bias_Loadings;&lt;/P&gt;&lt;P&gt;_MSE_Loadings_m = MSE_Loadings;&lt;/P&gt;&lt;P&gt;_Pattern_Accuracy_m = Pattern_Accuracy;&lt;/P&gt;&lt;P&gt;_Perfect_Accuracy_m = Perfect_Accuracy;&lt;/P&gt;&lt;P&gt;_Pattern_Accuracy30_m = Pattern_Accuracy30;&lt;/P&gt;&lt;P&gt;_Perfect_Accuracy30_m = Perfect_Accuracy30;&lt;/P&gt;&lt;P&gt;_meanphi_m = meanphi;&lt;/P&gt;&lt;P&gt;_R_Fscores_m = R_Fscores;&lt;/P&gt;&lt;P&gt;_Non_zero_m = Non_zero;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if &amp;amp;rep &amp;gt; 1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_ok_load_m = _ok_load_m + ok_load;&lt;/P&gt;&lt;P&gt;_ok_Noload_m = _ok_Noload_m + ok_Noload;&lt;/P&gt;&lt;P&gt;_Bias_Loadings_m = _Bias_Loadings_m + Bias_Loadings;&lt;/P&gt;&lt;P&gt;_MSE_Loadings_m = _MSE_Loadings_m + MSE_Loadings;&lt;/P&gt;&lt;P&gt;_Pattern_Accuracy_m = _Pattern_Accuracy_m + Pattern_Accuracy;&lt;/P&gt;&lt;P&gt;_Perfect_Accuracy_m = _Perfect_Accuracy_m + Perfect_Accuracy;&lt;/P&gt;&lt;P&gt;_Pattern_Accuracy30_m = _Pattern_Accuracy30_m + Pattern_Accuracy30;&lt;/P&gt;&lt;P&gt;_Perfect_Accuracy30_m = _Perfect_Accuracy30_m + Perfect_Accuracy30;&lt;/P&gt;&lt;P&gt;_meanphi_m = _meanphi_m + meanphi;&lt;/P&gt;&lt;P&gt;_R_Fscores_m = _R_Fscores_m + R_Fscores;&lt;/P&gt;&lt;P&gt;_Non_zero_m = _Non_zero_m + Non_zero;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;if &amp;amp;rep = 1 then nsamples = 1;&lt;/P&gt;&lt;P&gt;if &amp;amp;rep &amp;gt; 1 then nsamples = nsamples +1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;*End Replications Loop*;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_ok_load_m = _ok_load_m/NSamples;&lt;/P&gt;&lt;P&gt;_ok_Noload_m = _ok_Noload_m/NSamples;&lt;/P&gt;&lt;P&gt;_Bias_Loadings_m = _BIas_Loadings_m/NSamples;&lt;/P&gt;&lt;P&gt;_MSE_Loadings_m = _MSE_Loadings_m/NSamples;&lt;/P&gt;&lt;P&gt;_Pattern_Accuracy_m = _Pattern_Accuracy_m/NSamples;&lt;/P&gt;&lt;P&gt;_Perfect_Accuracy_m = _Perfect_Accuracy_m/NSamples;&lt;/P&gt;&lt;P&gt;_Pattern_Accuracy30_m = _Pattern_Accuracy30_m/NSamples;&lt;/P&gt;&lt;P&gt;_Perfect_Accuracy30_m = _Perfect_Accuracy30_m/NSamples;&lt;/P&gt;&lt;P&gt;_meanphi_m = _meanphi_m/NSamples;&lt;/P&gt;&lt;P&gt;_R_Fscores_m = _R_Fscores_m/NSamples;&lt;/P&gt;&lt;P&gt;_Non_zero_m = _Non_zero_m/NSamples;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;print Sampsize2 commun_type d_frac k p;&lt;/P&gt;&lt;P&gt;print&amp;nbsp; _OK_Load_m&amp;nbsp; _OK_NoLoad_m&lt;/P&gt;&lt;P&gt;&amp;nbsp;_Perfect_Accuracy30_m _Perfect_Accuracy_m _Meanphi_m;&lt;/P&gt;&lt;P&gt;print&amp;nbsp; _Pattern_Accuracy30_m&amp;nbsp; _R_Fscores_m&amp;nbsp; _Non_zero_m;&lt;/P&gt;&lt;P&gt;print _Bias_Loadings_m;&lt;/P&gt;&lt;P&gt;print&amp;nbsp; _MSE_Loadings_m;&lt;/P&gt;&lt;P&gt;print _Pattern_Accuracy_m;&lt;/P&gt;&lt;P&gt;end; end; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;*End Sample Size Loop*;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;*End loop for 10 populations*;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 13:00:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321084#M3182</guid>
      <dc:creator>stuti</dc:creator>
      <dc:date>2016-12-25T13:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Factor analysis using maximum likelihood estimation</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321094#M3183</link>
      <description>&lt;P&gt;Able to modify my program.. now getting results for even repetation...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much sir for all the guidence given to me...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still I have to do some modifications in program but may be now I am able to do it.&lt;/P&gt;&lt;P&gt;May be repetation is time consuming but still will be trying to improve it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If in future would have any problem will come back once again&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you sir.&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 14:58:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Factor-analysis-using-maximum-likelihood-estimation/m-p/321094#M3183</guid>
      <dc:creator>stuti</dc:creator>
      <dc:date>2016-12-25T14:58:14Z</dc:date>
    </item>
  </channel>
</rss>

