<?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: SAS is not reading all levels of my class variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635436#M188668</link>
    <description>&lt;P&gt;What about the missing values for the other provinces? You need to check that as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a message in the LOG from PROC GLIMMIX about missing values?&lt;/P&gt;</description>
    <pubDate>Fri, 27 Mar 2020 19:59:08 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-03-27T19:59:08Z</dc:date>
    <item>
      <title>SAS is not reading all levels of my class variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635426#M188663</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a large dataset (n= 78,000) and am trying to run a hierarchical regression, controlling for multiple variables. I am new to using SAS and I am having difficulty getting SAS to run the regression reading all four levels of the province data that I have. The class level information from the results indicates it is only reading "Ontario's" data, and not the other 3 (AB, BC, QC) provinces. Other analysis I have run, have read each level of data fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code I am using:&lt;/P&gt;&lt;P&gt;proc glimmix data=work.combined;&lt;BR /&gt;CLASS approach province income enrolment urban CANNABIS_FREQ BINGE_DRINKING WEEKLY_SPENDING&lt;BR /&gt;SMOKING_STATUS;&lt;BR /&gt;MODEL CANNABIS_FREQ = SEX3 GRADE GETHNCL1 GETHNCC1 GETHNCN1 GETHNCA1 GETHNCH1&lt;BR /&gt;GETHNCM1 SMOKING_STATUS BINGE_DRINKING WEEKLY_SPENDING / SOLUTION;&lt;BR /&gt;RANDOM CANNABIS_FREQ / SUBJECT=approach SOLUTION;&lt;BR /&gt;run;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I attached my results output.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-03-27 at 3.22.27 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/37483i8A6ED19558DB36C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-03-27 at 3.22.27 PM.png" alt="Screen Shot 2020-03-27 at 3.22.27 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 19:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635426#M188663</guid>
      <dc:creator>megan2</dc:creator>
      <dc:date>2020-03-27T19:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS is not reading all levels of my class variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635428#M188665</link>
      <description>&lt;P&gt;Some possibilities:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The data set only has ON data. Do a PROC FREQ on work.combined and show us the results&lt;/LI&gt;
&lt;LI&gt;The data set has complete non-missing data only for ON. The other three provinces have missing data somewhere on every observation.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Side comment: income is really a class variable? Enrollment is a class variable? This may cause problems somewhere along the line, although probably not the problem you mentioned about province.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 19:30:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635428#M188665</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-27T19:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS is not reading all levels of my class variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635434#M188667</link>
      <description>&lt;P&gt;Thanks for your response and the side notes to consider.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the result I have after running a procfreq:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-03-27 at 3.38.40 PM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/37484i799CDCF3B0C9077C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-03-27 at 3.38.40 PM.png" alt="Screen Shot 2020-03-27 at 3.38.40 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 19:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635434#M188667</guid>
      <dc:creator>megan2</dc:creator>
      <dc:date>2020-03-27T19:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS is not reading all levels of my class variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635436#M188668</link>
      <description>&lt;P&gt;What about the missing values for the other provinces? You need to check that as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a message in the LOG from PROC GLIMMIX about missing values?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 19:59:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635436#M188668</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-27T19:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS is not reading all levels of my class variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635437#M188669</link>
      <description>&lt;P&gt;Thanks for your response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The message in log is:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Some observations are not used in the analysis because of: missing fixed effects (n=68756), missing subject effects (n=1204).&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The GLIMMIX procedure is modeling the probabilities of levels of CANNABIS_FREQ having lower Ordered Values in the Response&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;Profile table.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Convergence criterion (PCONV=1.11022E-8) satisfied.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: PROCEDURE GLIMMIX used (Total process time):&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;real time 0.63 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;cpu time 0.56 seconds&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;How would I go about fixing the missing data?&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;PRE class="sasLog"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 20:17:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635437#M188669</guid>
      <dc:creator>megan2</dc:creator>
      <dc:date>2020-03-27T20:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS is not reading all levels of my class variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635439#M188670</link>
      <description>You can't fix your missing data. Basically if you run a proc means on your data perhaps there's only a measurement that's collected in Ontario?&lt;BR /&gt;&lt;BR /&gt;proc means data=combined;&lt;BR /&gt;class province;&lt;BR /&gt;var _numeric_;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc freq data=combined;&lt;BR /&gt;table province*_character_;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;One of those will show you which variable is missing for all provinces except Ontario. &lt;BR /&gt;</description>
      <pubDate>Fri, 27 Mar 2020 20:28:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635439#M188670</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-03-27T20:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS is not reading all levels of my class variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635525#M188709</link>
      <description>&lt;P&gt;It's not clear you can "fix" missings. You can substitute some number for these missing, there's a lot of literature on how to do this, and also SAS has PROC MI. If the missings are all in a single column (you'd have to look to see if that is the case), then you could delete that variable from the model in PROC GLIMMIX.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Mar 2020 16:05:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-is-not-reading-all-levels-of-my-class-variable/m-p/635525#M188709</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-03-28T16:05:35Z</dc:date>
    </item>
  </channel>
</rss>

