<?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: Formatting the scree plot x-axis in proc factor in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Formatting-the-scree-plot-x-axis-in-proc-factor/m-p/923083#M363432</link>
    <description>&lt;P&gt;You could save these data firstly ,afterwards polt it by PROC SGPLOT.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
ods output ScreePlot=ScreePlot;
PROC FACTOR DATA = sashelp.heart METHOD=PRINCIPAL PRIORS=SMC RESIDUAL  
ROTATE=VARIMAX OUTSTAT=OUTSTAT 
PLOTS(UNPACK)=SCREE REORDER  ;
  VAR _numeric_ ; 
RUN; 
ods select all;


%let n=6;  /*the number of factors you want to display*/
proc sgplot data=ScreePlot(where=(number&amp;lt;=&amp;amp;n.));
series x=number y=Eigenvalue/markers;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1712284711376.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95223iC48EB654CEF60573/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1712284711376.png" alt="Ksharp_0-1712284711376.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you could check the next graph "the explained variance"&amp;nbsp; to find elbow point ?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_1-1712284861249.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95224i765D45B9C7113A89/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1712284861249.png" alt="Ksharp_1-1712284861249.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2024 02:41:20 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2024-04-05T02:41:20Z</dc:date>
    <item>
      <title>Formatting the scree plot x-axis in proc factor</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-the-scree-plot-x-axis-in-proc-factor/m-p/923039#M363417</link>
      <description>&lt;DIV&gt;I want to produce a scree plot that I can easily paste into a word document that has an x-axis with only 15 factors. I have tried multiple methods to do this. When I tried ODS RTF, the files were blank. I finally settled on using ODS HTML, but I have not been able to adjust the x-axis on my plot. I tried using a template, but I don't think it is being applied in PROC FACTOR. I tried using SGRENDER, but the images were blank. When I do produce an image, with the code below, the x-axis shows 60 factors, so it is difficult to see where the elbow is. Any help would be greatly appreciated!&lt;BR /&gt;&lt;BR /&gt;PROC TEMPLATE;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;DEFINE STATGRAPH SCREEPLOT;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;NOTES "SCREE PLOT FOR EXTRACTED EIGENVALUES";&lt;/DIV&gt;&lt;DIV&gt;BEGINGRAPH / DESIGNWIDTH=DEFAULTDESIGNHEIGHT;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;ENTRYTITLE "EIGENVALUE ((*ESC*){UNICODE LAMBDA}) PLOT";&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;LAYOUT OVERLAY / YAXISOPTS=(LABEL="(*ESC*){UNICODE LAMBDA}")&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;XAXISOPTS=(LABEL="FACTOR NUMBER"&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LINEAROPTS=(TICKVALUELIST=(1 2 3 4 5 6 7 8 9 10)));&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;SERIESPLOT Y=EIGENVALUE X=NUMBER / DISPLAY=ALL;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;ENDLAYOUT; ENDGRAPH; END; RUN;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;ODS GRAPHICS ON ;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;%LET OUTDIR=[PATH] ;&lt;/DIV&gt;&lt;DIV&gt;ODS HTML PATH="&amp;amp;OUTDIR" (URL=NONE)&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;BODY='BODY2.HTML'&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/*CONTENTS='CONTENTS2.HTML'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FRAME='FRAME2.HTML' */ ;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;PROC FACTOR DATA = DATA METHOD=PRINCIPAL PRIORS=SMC RESIDUAL&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ROTATE=VARIMAX OUTSTAT=OUTSTAT&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PLOTS(UNPACK)=SCREE REORDER&amp;nbsp; ;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; VAR &amp;amp;VARS ;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;RUN;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;ODS HTML CLOSE ;&lt;/DIV&gt;</description>
      <pubDate>Thu, 04 Apr 2024 19:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-the-scree-plot-x-axis-in-proc-factor/m-p/923039#M363417</guid>
      <dc:creator>CBF</dc:creator>
      <dc:date>2024-04-04T19:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting the scree plot x-axis in proc factor</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-the-scree-plot-x-axis-in-proc-factor/m-p/923059#M363421</link>
      <description>&lt;P&gt;Did you look at the Proc Factor option NPLOTS= to limit the number of factors plotted? &lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 22:11:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-the-scree-plot-x-axis-in-proc-factor/m-p/923059#M363421</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-04-04T22:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting the scree plot x-axis in proc factor</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-the-scree-plot-x-axis-in-proc-factor/m-p/923083#M363432</link>
      <description>&lt;P&gt;You could save these data firstly ,afterwards polt it by PROC SGPLOT.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
ods output ScreePlot=ScreePlot;
PROC FACTOR DATA = sashelp.heart METHOD=PRINCIPAL PRIORS=SMC RESIDUAL  
ROTATE=VARIMAX OUTSTAT=OUTSTAT 
PLOTS(UNPACK)=SCREE REORDER  ;
  VAR _numeric_ ; 
RUN; 
ods select all;


%let n=6;  /*the number of factors you want to display*/
proc sgplot data=ScreePlot(where=(number&amp;lt;=&amp;amp;n.));
series x=number y=Eigenvalue/markers;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1712284711376.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95223iC48EB654CEF60573/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1712284711376.png" alt="Ksharp_0-1712284711376.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or you could check the next graph "the explained variance"&amp;nbsp; to find elbow point ?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_1-1712284861249.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95224i765D45B9C7113A89/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1712284861249.png" alt="Ksharp_1-1712284861249.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 02:41:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-the-scree-plot-x-axis-in-proc-factor/m-p/923083#M363432</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-04-05T02:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting the scree plot x-axis in proc factor</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Formatting-the-scree-plot-x-axis-in-proc-factor/m-p/923193#M363481</link>
      <description>&lt;P&gt;This worked! Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 15:00:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Formatting-the-scree-plot-x-axis-in-proc-factor/m-p/923193#M363481</guid>
      <dc:creator>CBF</dc:creator>
      <dc:date>2024-04-05T15:00:57Z</dc:date>
    </item>
  </channel>
</rss>

