<?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: Editing slicefit type of effectplot (in proc plm) through proc sgplot in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-slicefit-type-of-effectplot-in-proc-plm-through-proc/m-p/902665#M44739</link>
    <description>&lt;P&gt;_GROUP should be there just as in this example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyreg data=sashelp.cars;
class origin;
effect s=spline(enginesize/naturalcubic);
model mpg_city=s origin horsepower;
store sr;
run;
proc plm restore=sr;
EFFECTPLOT sliceFIT (X=enginesize sliceby=origin)/ CLM; 
ODS OUTPUT sliceFITPLOT = fp;
run;
PROC SGPLOT DATA=fp NOAUTOLEGEND; 
BAND UPPER = _UCLM LOWER = _LCLM X=_XCONT1/TRANSPARENCY=.3 group=_group;
SERIES Y = _PREDICTED X=_XCONT1/group=_group;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 11 Nov 2023 16:48:09 GMT</pubDate>
    <dc:creator>StatDave</dc:creator>
    <dc:date>2023-11-11T16:48:09Z</dc:date>
    <item>
      <title>Editing slicefit type of effectplot (in proc plm) through proc sgplot</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-slicefit-type-of-effectplot-in-proc-plm-through-proc/m-p/902652#M44736</link>
      <description>&lt;P&gt;I used the following code to get a slicefit plot (shown below) through the effectplot statement in Proc PLm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sort data=zinc.imputed out=zinc.imputed_srtd; by zns_unic; run;&lt;BR /&gt;proc surveyreg data=zinc.imputed_srtd;&lt;BR /&gt;weight nat_weight_bio;&lt;BR /&gt;cluster psu_no_ov;&lt;BR /&gt;strata newstrata;&lt;BR /&gt;class SEX area handwashing p_activity;&lt;BR /&gt;Format SEX SEX. handwashing $handwashing. p_activity p_act.;&lt;BR /&gt;effect znspln = spline(zns_unic / naturalcubic basis=tpf(noint) knotmethod=PERCENTILELIST(5 27.5 50 72.5 95));&lt;BR /&gt;model N_Mets7 = znspln AGE_in_yr sex handwashing p_activity /solution CLPARM;&lt;BR /&gt;output out=N_Mets7_Out predicted=Pred lcl=Lower ucl=Upper;&lt;BR /&gt;store N_Mets7_MODEL;&lt;BR /&gt;run;&lt;BR /&gt;proc plm SOURCE = N_Mets7_MODEL; EFFECTPLOT FIT (X=ZNS_UNIC)/ CLM; ODS OUTPUT FITPLOT = zinc.N_Mets7_FIT; RUN;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Saifulinfs_0-1699703121288.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89679iBD1FFA37EA43C77D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Saifulinfs_0-1699703121288.png" alt="Saifulinfs_0-1699703121288.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Would you let me know is there any option to change the appearance of the slicefit type of plot through proc SGPLOT? I tried the following code but the curves and straight lines seem weird. I only need two curves with 95% confidence band; one for males and one for females.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SGPLOT DATA=zinc.mean_sbp_FIT NOAUTOLEGEND;&lt;BR /&gt;BAND UPPER = _UCLM LOWER = _LCLM X=_XCONT1/TRANSPARENCY=.3;&lt;BR /&gt;SERIES Y = _PREDICTED X=_XCONT1;&lt;BR /&gt;XAXIS LABEL = "Serum zinc concentration (µg/dL)";&lt;BR /&gt;yaxis label = "Predicted systolic blood pressure (mm Hg)";&lt;BR /&gt;title "A";&lt;BR /&gt;title2 "Fit for mean systolic blood pressure with 95% confidence limits";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Saifulinfs_1-1699703402992.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89680i6CFC7C746E54DE7F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Saifulinfs_1-1699703402992.png" alt="Saifulinfs_1-1699703402992.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Nov 2023 11:51:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-slicefit-type-of-effectplot-in-proc-plm-through-proc/m-p/902652#M44736</guid>
      <dc:creator>Saifulinfs</dc:creator>
      <dc:date>2023-11-11T11:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Editing slicefit type of effectplot (in proc plm) through proc sgplot</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-slicefit-type-of-effectplot-in-proc-plm-through-proc/m-p/902656#M44737</link>
      <description>&lt;P&gt;The PLM plot that you show is a SLICEFIT plot, but your code does not request that and other items in the plot are not compatible with your code. However, since the plot you show is a SLICEFIT type of plot with SLICEBY=SEX, you need to specify GROUP=_GROUP in both your BAND and in your SERIES statements.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Nov 2023 16:15:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-slicefit-type-of-effectplot-in-proc-plm-through-proc/m-p/902656#M44737</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-11-11T16:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Editing slicefit type of effectplot (in proc plm) through proc sgplot</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-slicefit-type-of-effectplot-in-proc-plm-through-proc/m-p/902659#M44738</link>
      <description>&lt;P&gt;Sorry, that was a typo in the code; its actually a slicefit.&amp;nbsp; I understood I needed to use the group= option in my band and series statements. But the following code does not store the _Group variable in the Fitplot "zinc.N_Mets7_Fit"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc plm SOURCE = N_Mets7_MODEL;&lt;/P&gt;&lt;P&gt;EFFECTPLOT slicefit (X=ZNS_UNIC sliceby = sex)/ CLM;&lt;/P&gt;&lt;P&gt;ODS OUTPUT FITPLOT = zinc.N_Mets7_FIT;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the only variables are following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Saifulinfs_0-1699720369980.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89681iD36B7CD36FA259E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Saifulinfs_0-1699720369980.png" alt="Saifulinfs_0-1699720369980.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As a result, Proc sgplot shows error that _group variable was not found&lt;/P&gt;</description>
      <pubDate>Sat, 11 Nov 2023 16:33:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-slicefit-type-of-effectplot-in-proc-plm-through-proc/m-p/902659#M44738</guid>
      <dc:creator>Saifulinfs</dc:creator>
      <dc:date>2023-11-11T16:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Editing slicefit type of effectplot (in proc plm) through proc sgplot</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Editing-slicefit-type-of-effectplot-in-proc-plm-through-proc/m-p/902665#M44739</link>
      <description>&lt;P&gt;_GROUP should be there just as in this example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyreg data=sashelp.cars;
class origin;
effect s=spline(enginesize/naturalcubic);
model mpg_city=s origin horsepower;
store sr;
run;
proc plm restore=sr;
EFFECTPLOT sliceFIT (X=enginesize sliceby=origin)/ CLM; 
ODS OUTPUT sliceFITPLOT = fp;
run;
PROC SGPLOT DATA=fp NOAUTOLEGEND; 
BAND UPPER = _UCLM LOWER = _LCLM X=_XCONT1/TRANSPARENCY=.3 group=_group;
SERIES Y = _PREDICTED X=_XCONT1/group=_group;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Nov 2023 16:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Editing-slicefit-type-of-effectplot-in-proc-plm-through-proc/m-p/902665#M44739</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-11-11T16:48:09Z</dc:date>
    </item>
  </channel>
</rss>

