<?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 GLIMMIX Nesting Issue, Syntax Error in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966060#M48504</link>
    <description>Thanks for the note - I'll be sure to make note of that in the future! Apologies for the mistake.</description>
    <pubDate>Thu, 08 May 2025 12:52:33 GMT</pubDate>
    <dc:creator>PSB</dc:creator>
    <dc:date>2025-05-08T12:52:33Z</dc:date>
    <item>
      <title>PROC GLIMMIX Nesting Issue, Syntax Error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966028#M48500</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm running into an issue with my code. Briefly, I'm looking at how certain psychological constructs impact the effectiveness of a behavioral treatment. One of the treatments is time-out, where observers watch the kid for 30 seconds, and then record behavior for 10 seconds, and repeats this until the time-out ends. Naturally, it's an unbalanced dataset with some kids getting a few time-outs, and others getting many time-outs. I'm approaching it in a multi-level design:&lt;/P&gt;&lt;P&gt;Level 1 = the interval where data are collected (ranges from 1-197)&lt;/P&gt;&lt;P&gt;Level 2 = the unique ID # to identify the time-out (there are 545 unique time-outs)&lt;/P&gt;&lt;P&gt;Level 3 = the unique ID # to identify the child&lt;/P&gt;&lt;P&gt;So, interval data is nested in time-out, which is nested in child.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running this in a stepwise approach. My first two models converged (see end of message). But model 3, where I want to include the full nesting term provides the following error:&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/DIV&gt;&lt;DIV class=""&gt;SYMBOLGEN: Macro variable _SASWSTEMP_ resolves to /home/u60849988/.sasstudio/.images/495a0ef2-2874-447e-a1c1-b64f1cce7501&lt;/DIV&gt;&lt;DIV class=""&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/DIV&gt;&lt;DIV class=""&gt;SYMBOLGEN: Macro variable GRAPHINIT resolves to GOPTIONS RESET=ALL GSFNAME=_GSFNAME;&lt;/DIV&gt;&lt;DIV class=""&gt;68&lt;/DIV&gt;&lt;DIV class=""&gt;69 PROC GLIMMIX DATA=impstdmrpsra2 METHOD=LAPLACE;&lt;/DIV&gt;&lt;DIV class=""&gt;70 CLASS MRPSID UnqTONum IntervalNum Meds TOTxCond;&lt;/DIV&gt;&lt;DIV class=""&gt;71 MODEL Effective = meds TOTxCond week ptadhd ptcp pticu24 pticu24*TOTxCond / SOLUTION CL;&lt;/DIV&gt;&lt;DIV class=""&gt;72 RANDOM intercept / SUBJECT=MRPSID;&lt;/DIV&gt;&lt;DIV class=""&gt;73 RANDOM intercept / SUBJECT= UnqTONum(MRPSID);&lt;/DIV&gt;&lt;DIV class=""&gt;74 RANDOM intercept / SUBJECT=IntervalNum(UnqTONum(MRPSID)) TYPE=UN;&lt;/DIV&gt;&lt;DIV class=""&gt;_&lt;/DIV&gt;&lt;DIV class=""&gt;22&lt;/DIV&gt;&lt;DIV class=""&gt;200&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, ), *.&lt;/DIV&gt;&lt;DIV class=""&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Importantly, this occurs whether I use a singular random statement (i.e., RANDOM intercept / SUBJECT = IntervalNum(UnqTONum(MRPSID)) or multiple random statements as shown below. This is happening across both continuous and categorical variables. Any feedback or thoughts would be greatly appreciated. Thanks all.&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Model 3 - not converging, receiving above error.&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;PROC GLIMMIX DATA=impstdmrpsra2 METHOD=LAPLACE;&lt;BR /&gt;CLASS MRPSID UnqTONum IntervalNum Meds TOTxCond;&lt;BR /&gt;MODEL Effective = meds TOTxCond week ptadhd ptcp pticu24 pticu24*TOTxCond / SOLUTION CL;&lt;BR /&gt;RANDOM intercept / SUBJECT=MRPSID;&lt;BR /&gt;RANDOM intercept / SUBJECT= UnqTONum(MRPSID);&lt;BR /&gt;RANDOM intercept / SUBJECT=IntervalNum(UnqTONum(MRPSID)) TYPE=UN;&lt;BR /&gt;options mprint mlogic symbolgen ;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Model 1 - converges.&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;PROC GLIMMIX DATA=impstdmrpsra2 METHOD=LAPLACE;&lt;BR /&gt;CLASS MRPSID Meds TOTxCond;&lt;BR /&gt;MODEL Effective = meds TOTxCond week ptadhd ptcp pticu24 pticu24*TOTxCond / SOLUTION CL;&lt;BR /&gt;RANDOM intercept / SUBJECT=MRPSID TYPE=UN;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Model 2 - converges.&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;PROC GLIMMIX DATA=impstdmrpsra2 METHOD=LAPLACE;&lt;BR /&gt;CLASS MRPSID UnqTONum Meds TOTxCond;&lt;BR /&gt;MODEL Effective = meds TOTxCond week ptadhd ptcp pticu24 pticu24*TOTxCond / SOLUTION CL;&lt;BR /&gt;RANDOM intercept / SUBJECT=UnqTONum(MRPSID) TYPE=UN;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 23:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966028#M48500</guid>
      <dc:creator>PSB</dc:creator>
      <dc:date>2025-05-07T23:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX Nesting Issue, Syntax Error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966031#M48501</link>
      <description>&lt;P&gt;You should paste the LOG into a text box opened with the &amp;lt;/&amp;gt; . &lt;/P&gt;
&lt;P&gt;Reason is the location of the&amp;nbsp; _ in this bit is important because it will appear in the location that SAS reports the syntax error.&lt;/P&gt;
&lt;PRE&gt;74 RANDOM intercept / SUBJECT=IntervalNum(UnqTONum(MRPSID)) TYPE=UN;
_
22
200
ERROR 22-322: Syntax error, expecting one of the following: a name, ), *.
ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/PRE&gt;
&lt;P&gt;Another reason to post the text into a text box is that the forum software reformats pasted text in the main window, such are removing the spaces that would align the _ in the error message. Sometimes there can be other not visible characters that creep into code files (copy paste from html or word processor documents for example) that the code parser finds by you don't see. Someone with the tools and interest can often find those in the text box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also please note that descriptions such as "So, interval data is nested in time-out, which is nested in child" really should reference variable names for clarity.&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 01:23:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966031#M48501</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2025-05-08T01:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX Nesting Issue, Syntax Error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966046#M48502</link>
      <description>Your syntax is not right:&lt;BR /&gt;RANDOM intercept / SUBJECT=IntervalNum(UnqTONum(MRPSID)) TYPE=UN;&lt;BR /&gt;---&amp;gt;&lt;BR /&gt;RANDOM intercept / SUBJECT=IntervalNum(UnqTONum) TYPE=UN;&lt;BR /&gt;&lt;BR /&gt;a.k.a you could only have one strata or parenthesis NOT two parenthesis.</description>
      <pubDate>Thu, 08 May 2025 06:03:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966046#M48502</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-05-08T06:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX Nesting Issue, Syntax Error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966060#M48504</link>
      <description>Thanks for the note - I'll be sure to make note of that in the future! Apologies for the mistake.</description>
      <pubDate>Thu, 08 May 2025 12:52:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966060#M48504</guid>
      <dc:creator>PSB</dc:creator>
      <dc:date>2025-05-08T12:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX Nesting Issue, Syntax Error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966063#M48505</link>
      <description>&lt;P&gt;Is that true? I feel like I've read on SAS documentation that you can have multiple levels of nesting, such as what I have in my model. But if that is the case, then how do models account for multiple levels?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Level 1 = IntervalNum&lt;/P&gt;&lt;P&gt;Level2 = UnqTONum&lt;/P&gt;&lt;P&gt;Level3 = MRPSID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 13:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966063#M48505</guid>
      <dc:creator>PSB</dc:creator>
      <dc:date>2025-05-08T13:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX Nesting Issue, Syntax Error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966067#M48506</link>
      <description>&lt;P&gt;&lt;SPAN&gt;SUBJECT=IntervalNum(UnqTONum(MRPSID))&amp;nbsp; should be changed to&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SUBJECT=IntervalNum(UnqTONum MRPSID)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jill&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 13:22:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966067#M48506</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2025-05-08T13:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: PROC GLIMMIX Nesting Issue, Syntax Error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966110#M48508</link>
      <description>If you want to model multiple levels, you can put it at left side :&lt;BR /&gt;&lt;BR /&gt;RANDOM intercept  I ntervalNum/ SUBJECT=UnqTONum(MRPSID)  TYPE=UN;</description>
      <pubDate>Fri, 09 May 2025 00:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/PROC-GLIMMIX-Nesting-Issue-Syntax-Error/m-p/966110#M48508</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-05-09T00:58:20Z</dc:date>
    </item>
  </channel>
</rss>

