<?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 GAM error in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416853#M22014</link>
    <description>&lt;P&gt;I would not use&amp;nbsp;PROC GAM to analyze 242,000 observations and 37 variables. I suggest you switch to &lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=14.3&amp;amp;docsetTarget=statug_hpgam_overview.htm&amp;amp;locale=en" target="_self"&gt;PROC GAMPL&lt;/A&gt;, which is much faster. You can use univariate splines instead of loess to model the nonlinearities. For an example and references, see &lt;A href="https://blogs.sas.com/content/iml/2016/03/23/nonparametric-regression-binary-response-sas.html" target="_self"&gt;"Nonparametric regression for binary response data in SAS."&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2017 20:27:45 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2017-11-28T20:27:45Z</dc:date>
    <item>
      <title>PROC GAM error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416809#M22009</link>
      <description>&lt;P&gt;I am trying to fit a DLNM using GAM in SAS. I am getting errors with my outcome variable, which is binary 0/1, I have tried with both character and numeric, and with and without reference value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: The response variable ptb_recode has 1 level(s). A binary response must have two levels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc gam data=test1;&lt;BR /&gt;class ptb_recode;&lt;BR /&gt;model ptb_recode = loess(meanpm25_wk)&lt;BR /&gt;loess(lag1)&lt;BR /&gt;loess(lag2)&lt;BR /&gt;loess(lag3)&lt;BR /&gt;loess(lag4)&lt;BR /&gt;loess(lag5)&lt;BR /&gt;loess(lag6)&lt;BR /&gt;loess(lag7)&lt;BR /&gt;loess(lag8)&lt;BR /&gt;loess(lag9)&lt;BR /&gt;loess(lag10)&lt;BR /&gt;loess(lag11)&lt;BR /&gt;loess(lag12)&lt;BR /&gt;loess(lag13)&lt;BR /&gt;loess(lag14)&lt;BR /&gt;loess(lag15)&lt;BR /&gt;loess(lag16)&lt;BR /&gt;loess(lag17)&lt;BR /&gt;loess(lag18)&lt;BR /&gt;loess(lag19)&lt;BR /&gt;loess(lag20)&lt;BR /&gt;loess(lag21)&lt;BR /&gt;loess(lag22)&lt;BR /&gt;loess(lag23)&lt;BR /&gt;loess(lag24)&lt;BR /&gt;loess(lag25)&lt;BR /&gt;loess(lag26)&lt;BR /&gt;loess(lag27)&lt;BR /&gt;loess(lag28)&lt;BR /&gt;loess(lag29)&lt;BR /&gt;loess(lag30)&lt;BR /&gt;loess(lag31)&lt;BR /&gt;loess(lag32)&lt;BR /&gt;loess(lag33)&lt;BR /&gt;loess(lag34)&lt;BR /&gt;loess(lag35)&lt;BR /&gt;loess(lag36)&lt;BR /&gt;/ dist=binomial ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 18:59:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416809#M22009</guid>
      <dc:creator>psh23</dc:creator>
      <dc:date>2017-11-28T18:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GAM error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416810#M22010</link>
      <description>&lt;P&gt;Can you show the output of a PROC FREQ on this variable:&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;ptb_recode&amp;nbsp;?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=test1;
table  ptb_recode ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Nov 2017 19:04:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416810#M22010</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-28T19:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GAM error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416812#M22011</link>
      <description>&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ptb_recode&lt;/TD&gt;&lt;TD&gt;Frequency&lt;/TD&gt;&lt;TD&gt;Percent&lt;/TD&gt;&lt;TD&gt;Cumulative&lt;/TD&gt;&lt;TD&gt;Cumulative&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Frequency&lt;/TD&gt;&lt;TD&gt;Percent&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;216575&lt;/TD&gt;&lt;TD&gt;89.38&lt;/TD&gt;&lt;TD&gt;216575&lt;/TD&gt;&lt;TD&gt;89.38&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;25740&lt;/TD&gt;&lt;TD&gt;10.62&lt;/TD&gt;&lt;TD&gt;242315&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 28 Nov 2017 19:08:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416812#M22011</guid>
      <dc:creator>psh23</dc:creator>
      <dc:date>2017-11-28T19:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GAM error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416813#M22012</link>
      <description>&lt;P&gt;Do you have missing values in the other variables? To get that error for some reason SAS is including only observations of a single level which usually occurs if you have missing data for some reason?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise I think we'll need data to replicate the issue.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 19:12:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416813#M22012</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-28T19:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GAM error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416814#M22013</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;gave you the information that you need to answer your question.&amp;nbsp; I can't help but point out that you don't have to type that much syntax to create your model statement.&amp;nbsp; A simple ad hoc macro can easily do it, particularly when your variables are numbered lists like you have.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data x;
   input y x1-x10 @@;
   datalines;
1 2 3 3 8 8 5 10 7 5 8 1 5 4 8 10 9 8 10 2 1 5 1 5 8 9 5 10 9 8 7 6 2 1
6 6 3 5 9 6 6 6 8 10 1 7 7 7 8 10 3 3 4 1 10 1 7 9 9 9 9 7 1 9 3 8 1 9 7
10 9 7 8 2 7 2 1 1 10 1 3 10 4 9 2 4 4 6 1 10 5 9 8 7 10 6 1 9 5 1 10 10
8 9 10 5 4 8 8 3 2 2 2 7 2 9 10 2 8 10 2 2 3 8 7 7 4 8 9 1 8 8 2 6 1 1 6
10 10 7 2 2 8 2 6 5 10 2 8 9 4 9 1 7 2 7 5 5 6 4 6 10 8 6 1 2 8 8 1 8 9
1 4 5 4 1 2 8 10 9 2 5 3 10 6 2 6 2 9 10 2 6 9 9 3 1 5 9 2 10 3 10 7 9 3
7 10 6 4 2 10 9 1 2 6 8 8 3 5 10
;

proc gam;
   class y;
   model y = %macro l; %do i = 1 %to 10; loess(x&amp;amp;i) %end; %mend; %l;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Nov 2017 19:16:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416814#M22013</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-11-28T19:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GAM error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416853#M22014</link>
      <description>&lt;P&gt;I would not use&amp;nbsp;PROC GAM to analyze 242,000 observations and 37 variables. I suggest you switch to &lt;A href="http://go.documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=14.3&amp;amp;docsetTarget=statug_hpgam_overview.htm&amp;amp;locale=en" target="_self"&gt;PROC GAMPL&lt;/A&gt;, which is much faster. You can use univariate splines instead of loess to model the nonlinearities. For an example and references, see &lt;A href="https://blogs.sas.com/content/iml/2016/03/23/nonparametric-regression-binary-response-sas.html" target="_self"&gt;"Nonparametric regression for binary response data in SAS."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 20:27:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/416853#M22014</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-11-28T20:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GAM error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/417038#M22015</link>
      <description>&lt;P&gt;I agreed with Rick.&lt;SPAN&gt;&amp;nbsp;242,000 observations&amp;nbsp; is too much for&amp;nbsp;&amp;nbsp;PROC GAM to analyze.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PROC GAM required the expanse system resource to run Non parameter regression.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want fit non-linear effect, why not try&amp;nbsp; decision tree PROC HPSPLIT ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2017 13:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GAM-error/m-p/417038#M22015</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-11-29T13:28:14Z</dc:date>
    </item>
  </channel>
</rss>

