<?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 Logistic removing some levels of class variables in outputs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671021#M201467</link>
    <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;,&lt;BR /&gt;"So for instance if the records with study_id level=7 have combinations of missing values for the other variables, even if only a few for each other variable, then level=7 would not appear in the output."&lt;BR /&gt;&lt;BR /&gt;I think this is exactly what is happening. Because the levels have missing observations, they were excluded.</description>
    <pubDate>Tue, 21 Jul 2020 14:57:21 GMT</pubDate>
    <dc:creator>chimukah</dc:creator>
    <dc:date>2020-07-21T14:57:21Z</dc:date>
    <item>
      <title>Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/670920#M201445</link>
      <description>&lt;P&gt;I have a class variable with 9&amp;nbsp; levels and i included it in class statement in proc logistics. However, during model selection using Stepwise method,&amp;nbsp; Proc Logistics displayed 5 levels vs 1 (Ref) and omitted the other 3 levels in the class statement&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data =gene1;&lt;/P&gt;&lt;P&gt;class studyID gender Agecat;&lt;/P&gt;&lt;P&gt;model response (event='1') = StudyID gender Age Agecat /&lt;/P&gt;&lt;P&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selection=stepwise&lt;/P&gt;&lt;P&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sls=0.05&lt;/P&gt;&lt;P&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sle=0.2&lt;/P&gt;&lt;P&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;include=2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 11:11:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/670920#M201445</guid>
      <dc:creator>chimukah</dc:creator>
      <dc:date>2020-07-21T11:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/670921#M201446</link>
      <description>&lt;P&gt;Can you please show us the output?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, which CLASS variable is the one with 9 levels?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 11:14:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/670921#M201446</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-21T11:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/670924#M201448</link>
      <description>&lt;P&gt;How do i say this, this programme is confidential. In order not to breach the confidentialty, i just gave a dummy programme. However, thats the problem i am facing. All though there are some missing data somewhere, i don't want to come to conclusion that it happened as a result of missing data, rather i seek your opinion from those that might have similar problem&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 11:17:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/670924#M201448</guid>
      <dc:creator>chimukah</dc:creator>
      <dc:date>2020-07-21T11:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/670925#M201449</link>
      <description>&lt;P&gt;StudyID is the class variable with 9 levels.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 11:18:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/670925#M201449</guid>
      <dc:creator>chimukah</dc:creator>
      <dc:date>2020-07-21T11:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/670927#M201450</link>
      <description>&lt;P&gt;I'm afraid if we can't see the output, its hard to say what has happened and what to do about it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, in most cases, confidentiality issues can be overcome by re-running the data after replacing actual identifying information with random information.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 11:19:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/670927#M201450</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-21T11:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671005#M201462</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/225077"&gt;@chimukah&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;(...) All though there are some missing data somewhere, i don't want to come to conclusion that it happened as a result of missing data, ...&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/225077"&gt;@chimukah&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I understand that the exclusion of observations with missing values is often annoying, but you may want to &lt;EM&gt;check&lt;/EM&gt; if that is the reason.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=gene1;
where cmiss(response, studyID, gender, Agecat, Age)=0;
tables studyID;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;After adapting the above step to your real dataset and variable names, do you get all nine categories of &lt;FONT face="courier new,courier"&gt;studyID&lt;/FONT&gt; in the PROC FREQ output or only six?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that PROC LOGISTIC excludes observations right from the start (of the variable selection process) due to missing values even in variables which fail to meet the SLENTRY criterion (i.e., which never make it into a model). It also excludes observations with missing values in variables (accidentally) listed in the CLASS statement which do not even occur in the MODEL statement.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 14:23:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671005#M201462</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-07-21T14:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671014#M201463</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/225077"&gt;@chimukah&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;StudyID is the class variable with 9 levels.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Doesn't matter. If &lt;STRONG&gt;any&lt;/STRONG&gt; of the variables on the model statement are missing then the record will be excluded by default from modeling. So for instance if the records with study_id level=7 have combinations of missing values for the other variables, even if only a few for each other variable, then level=7 would not appear in the output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show us the LOG from running the code. Include all the messages, notes and/warnings.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 14:49:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671014#M201463</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-21T14:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671015#M201464</link>
      <description>@FreelanceReinhard,&lt;BR /&gt;Thank you for your candid advice. However after adapting the code, the missing class did not appear in the categories of the StudyID. I want to assume that SAS uses complete case. my worries is that the omitted. The log didn't mention of class variable separation in the process of model selection&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Jul 2020 14:50:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671015#M201464</guid>
      <dc:creator>chimukah</dc:creator>
      <dc:date>2020-07-21T14:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671021#M201467</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;,&lt;BR /&gt;"So for instance if the records with study_id level=7 have combinations of missing values for the other variables, even if only a few for each other variable, then level=7 would not appear in the output."&lt;BR /&gt;&lt;BR /&gt;I think this is exactly what is happening. Because the levels have missing observations, they were excluded.</description>
      <pubDate>Tue, 21 Jul 2020 14:57:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671021#M201467</guid>
      <dc:creator>chimukah</dc:creator>
      <dc:date>2020-07-21T14:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671063#M201471</link>
      <description>&lt;P&gt;If the missing categories don't appear in the PROC FREQ output, then you have the answer: Missing values in other variables lead to the exclusion of the respective observations. To find out which variables these are, you can adapt and run the following step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select nlevels;
proc freq data=gene1 nlevels;
where studyID in ('first', 'second', 'third missing level');
tables response gender Agecat Age;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(I assumed that studyID is a character variable. Use numeric values without quotes in the WHERE condition, of course, if it's numeric.)&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 15:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671063#M201471</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-07-21T15:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671071#M201476</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/225077"&gt;@chimukah&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;,&lt;BR /&gt;"So for instance if the records with study_id level=7 have combinations of missing values for the other variables, even if only a few for each other variable, then level=7 would not appear in the output."&lt;BR /&gt;&lt;BR /&gt;I think this is exactly what is happening. Because the levels have missing observations, they were excluded.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For the other class variables this might be mitigated by using the / missing option on the class statement. That way the missing level is treated as a valid level. Your Age variable how ever is not a class variable an so that can't be addressed. I did kind of wonder about including an Age and Age_group variable as I would expect that with many uses the Age_group would be build from Age, unless they reflect entirely different "ages" of some sort. If they both reflect the subjects age I might drop the Age variable and leave the Age_group with the missing option. That does treat all missing ages as if they are basically the same though.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 15:23:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671071#M201476</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-21T15:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671074#M201479</link>
      <description>The output said no observation were selected from the data set..I believe those levels of the class ID were omitted as a result of missing value because proc freq shows that no observation was obtain listing all the class variables in the model.</description>
      <pubDate>Tue, 21 Jul 2020 15:30:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671074#M201479</guid>
      <dc:creator>chimukah</dc:creator>
      <dc:date>2020-07-21T15:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671080#M201483</link>
      <description>The Age_group was placed in the class statement, the variables are just dummy for references. however i have noted your suggestion concerning including Age and Agegrp in the same model. I believe the exclusion or Omission was as a result of missing values in one or two of the covariates in the model.&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216503"&gt;@all&lt;/a&gt; Thanks for your candid advice.</description>
      <pubDate>Tue, 21 Jul 2020 15:41:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671080#M201483</guid>
      <dc:creator>chimukah</dc:creator>
      <dc:date>2020-07-21T15:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Logistic removing some levels of class variables in outputs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671089#M201485</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/225077"&gt;@chimukah&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;The output said no observation were selected from the data set..I believe those levels of the class ID were omitted as a result of missing value because proc freq shows that no observation was obtain listing all the class variables in the model.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The NLEVELS output does &lt;EM&gt;not&lt;/EM&gt; exclude anything because of missing values. If "no observations were selected," then the three values specified in the WHERE condition were not found in the input dataset (e.g., because they were specified incorrectly or simply because they really don't exist).&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 16:07:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Logistic-removing-some-levels-of-class-variables-in-outputs/m-p/671089#M201485</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-07-21T16:07:07Z</dc:date>
    </item>
  </channel>
</rss>

