<?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 NLMixed with Categorical Variable in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Proc-NLMixed-with-Categorical-Variable/m-p/144172#M38346</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROC GLMMOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glmmod data=data outdesign=want;&lt;/P&gt;&lt;P&gt;class var5;&lt;/P&gt;&lt;P&gt;model y=var1 var2 var3 var4 var5;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll probably want to go in and rename the variables in the 'want' dataset, as they will be named col1, col2, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2014 12:17:21 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2014-09-15T12:17:21Z</dc:date>
    <item>
      <title>Proc NLMixed with Categorical Variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-NLMixed-with-Categorical-Variable/m-p/144171#M38345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All,&lt;/P&gt;&lt;P&gt;I understand that proc nlmixed do not have the class statement option. I need help to code a categorical variable Var5 with six levels: Ind_A, Ind_B, Ind_C, Ind_D, Ind_E, Ind_F.&lt;/P&gt;&lt;P&gt;The following is the code which uses 4 explanatory variables:&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="color: navy; background-color: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="color: navy; background-color: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;nlmixed&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background-color: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;=data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background-color: white;"&gt;parms&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt; b0=&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;x&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt; b1=&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;x&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt; b2=&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;x&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt; b3=&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;x&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt; b4=&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;x&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&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; gm1=&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;x&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt; gm=&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;x&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; w=b0+b1*Var1+b2*Var2+b3*Var3+b4*Var;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ww=w+gm1*t;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; consigma=gm2&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background-color: white;"&gt;model&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt; Y~&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background-color: white;"&gt;normal&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;(ww,consigma);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background-color: white;"&gt;random&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt; t~&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background-color: white;"&gt;normal&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: teal; background-color: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: teal; background-color: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background-color: white;"&gt;subject&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;=group;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background-color: white;"&gt;predict&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt; ww &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background-color: white;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;= output (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background-color: white;"&gt;keep&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;=Y pred );&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="color: navy; background-color: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;The model converges but I need to incorporate the categorical variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background-color: white;"&gt;Any suggestions?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 22:39:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-NLMixed-with-Categorical-Variable/m-p/144171#M38345</guid>
      <dc:creator>APatricio</dc:creator>
      <dc:date>2014-09-13T22:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc NLMixed with Categorical Variable</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Proc-NLMixed-with-Categorical-Variable/m-p/144172#M38346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PROC GLMMOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glmmod data=data outdesign=want;&lt;/P&gt;&lt;P&gt;class var5;&lt;/P&gt;&lt;P&gt;model y=var1 var2 var3 var4 var5;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll probably want to go in and rename the variables in the 'want' dataset, as they will be named col1, col2, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 12:17:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Proc-NLMixed-with-Categorical-Variable/m-p/144172#M38346</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-09-15T12:17:21Z</dc:date>
    </item>
  </channel>
</rss>

