<?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: PROC SGPANEL REGRESSION DISPLAY-R SQUARE in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SGPANEL-REGRESSION-DISPLAY-R-SQUARE/m-p/530450#M73720</link>
    <description>&lt;P&gt;Notice the last column I added .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;
DATA HAVE;
infile cards expandtabs truncover;
INPUT FIPS_TRACT AAR pover $ X_PRMP R_Square;
CARDS;
36001001400	32.6046	1	2.27 0.8
36001002200	42.8707	1	2.40 0.8
36001014203	37.4631	1	0.14 0.8
36003951300	46.5464	1	0.07 0.8
36005002400	0	1	0.55 0.8
36005006200	60.8516	4	0.36 0.34
36005015900	30.3371	4	0.66 0.34
36005016900	49.6429	4	0.62 0.34
36005017701	69.829	4	0.50 0.34
36005018102	44.5647	4	0.57 0.34
;


PROC FORMAT;
value $POVER
'1'="POVERTY &amp;lt;5%"
'2'="POVERTY 5% to &amp;lt;10%"
'3'="POVERTY 10% to &amp;lt; 20%" 
'4'="POVERTY &amp;gt;20%"
'99'="Unknown"
;
run;



ods graphics / reset=all;
TITLE "AGE ADJ RATE VS OTHER VARS";
proc sgpanel data=HAVE;
panelby POVER / onepanel novarname ROWS=1;
reg x=X_PRMP y=AAR / cli CLM markerattrs=(size=3px);
INSET R_Square / position=top;
FORMAT POVER $POVER.;
WHERE POVER NE '99';
run;
&lt;/PRE&gt;</description>
    <pubDate>Sun, 27 Jan 2019 11:34:35 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2019-01-27T11:34:35Z</dc:date>
    <item>
      <title>PROC SGPANEL REGRESSION DISPLAY-R SQUARE</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SGPANEL-REGRESSION-DISPLAY-R-SQUARE/m-p/530409#M73716</link>
      <description>&lt;P&gt;Hi SAS experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to display R-square or slope on the each individual poverty level specific panel in the plot below. I know that there is INSET function but I couldn't work it out. Any hints or suggestions highly appreciated?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS SUPPORT PLOT.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26603i06CBA17174941976/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS SUPPORT PLOT.png" alt="SAS SUPPORT PLOT.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA HAVE;
INPUT FIPS_TRACT AAR pover X_PRMP;
CARDS;
36001001400	32.6046	4	2.27
36001002200	42.8707	3	2.40
36001014203	37.4631	1	0.14
36003951300	46.5464	3	0.07
36005002400	0	1	0.55
36005006200	60.8516	4	0.36
36005015900	30.3371	4	0.66
36005016900	49.6429	4	0.62
36005017701	69.829	4	0.50
36005018102	44.5647	4	0.57
.....
DATA CONTINUES FOR ~5000 tracts
;

ods graphics / height=300px width=800px;
TITLE "AGE ADJ RATE VS OTHER VARS";
proc sgpanel data=HAVE;
panelby POVER / onepanel novarname ROWS=1;
reg x=X_PRMP y=AAR / cli CLM markerattrs=(size=3px);
INSET?
FORMAT POVER $POVER.;
WHERE POVER NE '99';
run;
PROC FORMAT;
value $POVER
'1'="%POVERTY &amp;lt;5%"
'2'="%POVERTY 5% to &amp;lt;10%"
'3'="POVERTY 10% to &amp;lt; 20%" 
'4'="POVERTY &amp;gt;20%"
'99'="Unknown"
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Jan 2019 03:29:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SGPANEL-REGRESSION-DISPLAY-R-SQUARE/m-p/530409#M73716</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-01-27T03:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPANEL REGRESSION DISPLAY-R SQUARE</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SGPANEL-REGRESSION-DISPLAY-R-SQUARE/m-p/530450#M73720</link>
      <description>&lt;P&gt;Notice the last column I added .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;
DATA HAVE;
infile cards expandtabs truncover;
INPUT FIPS_TRACT AAR pover $ X_PRMP R_Square;
CARDS;
36001001400	32.6046	1	2.27 0.8
36001002200	42.8707	1	2.40 0.8
36001014203	37.4631	1	0.14 0.8
36003951300	46.5464	1	0.07 0.8
36005002400	0	1	0.55 0.8
36005006200	60.8516	4	0.36 0.34
36005015900	30.3371	4	0.66 0.34
36005016900	49.6429	4	0.62 0.34
36005017701	69.829	4	0.50 0.34
36005018102	44.5647	4	0.57 0.34
;


PROC FORMAT;
value $POVER
'1'="POVERTY &amp;lt;5%"
'2'="POVERTY 5% to &amp;lt;10%"
'3'="POVERTY 10% to &amp;lt; 20%" 
'4'="POVERTY &amp;gt;20%"
'99'="Unknown"
;
run;



ods graphics / reset=all;
TITLE "AGE ADJ RATE VS OTHER VARS";
proc sgpanel data=HAVE;
panelby POVER / onepanel novarname ROWS=1;
reg x=X_PRMP y=AAR / cli CLM markerattrs=(size=3px);
INSET R_Square / position=top;
FORMAT POVER $POVER.;
WHERE POVER NE '99';
run;
&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Jan 2019 11:34:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SGPANEL-REGRESSION-DISPLAY-R-SQUARE/m-p/530450#M73720</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-01-27T11:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPANEL REGRESSION DISPLAY-R SQUARE</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SGPANEL-REGRESSION-DISPLAY-R-SQUARE/m-p/530478#M73721</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The solution worked with the given demo data. However, do you know why it doesn't work when I add one more variables into the panel statement and extend my layout to lattice?&lt;/P&gt;
&lt;P&gt;The error I get is:&lt;/P&gt;
&lt;P&gt;3009 ods graphics / height=400px width=800px;&lt;BR /&gt;3010 TITLE "AAR VS ESJCREEN";&lt;BR /&gt;3011 proc sgpanel data=Long_format;&lt;BR /&gt;3012 panelby POVER EXPOSURES /onepanel LAYOUT=LATTICE novarname ROWS=2;&lt;BR /&gt;3013 REG x=EJ_VALUES y=N_TRACT/ CLI CLM markerattrs=(size=3px);&lt;BR /&gt;3014 FORMAT POVER $POVER.;&lt;BR /&gt;3015 INSET R_Square / position=top;&lt;BR /&gt;ERROR: Variable R_SQUARE not found.&lt;BR /&gt;3016 run;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / height=400px width=800px;
TITLE "AAR VS ESJCREEN";
proc sgpanel data=Long_format;
panelby POVER EXPOSURES /onepanel LAYOUT=LATTICE novarname ROWS=2;
REG x=EJ_VALUES y=N_TRACT/ CLI CLM markerattrs=(size=3px);
FORMAT POVER $POVER.;
INSET R_Square / position=top;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 27 Jan 2019 15:24:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SGPANEL-REGRESSION-DISPLAY-R-SQUARE/m-p/530478#M73721</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-01-27T15:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: PROC SGPANEL REGRESSION DISPLAY-R SQUARE</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-SGPANEL-REGRESSION-DISPLAY-R-SQUARE/m-p/530590#M73731</link>
      <description>Oops, I just noticed that you added a column with R-square. I thought R-square in INSET was built in. I think I got it. I have to calculate S-squares then use INSET.</description>
      <pubDate>Mon, 28 Jan 2019 11:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-SGPANEL-REGRESSION-DISPLAY-R-SQUARE/m-p/530590#M73731</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-01-28T11:35:33Z</dc:date>
    </item>
  </channel>
</rss>

