<?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 how to run multiple pairwise testing for categorical variables in proc surveylogistic in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-run-multiple-pairwise-testing-for-categorical-variables/m-p/365919#M19192</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to run multiple comparison testing to see&amp;nbsp;whether the value of a categorical variable education (4 levels) differs significantly depending on which one of 5 groups a person is in.&amp;nbsp;This is weighted survey data so I am trying to test these multiple comparisons by running a multinomial logistic regression using education level as the dependent variable and using the 5 group variable as the independent variable, then using lsmeans to check for significant pairwise differences using Tukey procedure.&lt;/P&gt;&lt;P&gt;My syntax is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SURVEYLOGISTIC DATA=data1;&lt;BR /&gt;weight weight;&lt;BR /&gt;CLASS EDUCATION_LEVEL GROUP / PARAM=GLM;&lt;BR /&gt;MODEL EDUCATION_LEVEL = GROUP / LINK=GLOGIT;&lt;BR /&gt;LSMEANS GROUP / ADJUST=TUKEY PDIFF=ALL;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the differences table in my&amp;nbsp;output doesn't show the differences between groups for the reference category of education. How do I change the code to show whether the reference group of education varies by the 5 groups?&lt;BR /&gt;Should I be using LSESTIMATE and if so, how do I specify that? I'm using SAS version 9.4&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2017 16:27:14 GMT</pubDate>
    <dc:creator>mj3</dc:creator>
    <dc:date>2017-06-10T16:27:14Z</dc:date>
    <item>
      <title>how to run multiple pairwise testing for categorical variables in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-run-multiple-pairwise-testing-for-categorical-variables/m-p/365919#M19192</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to run multiple comparison testing to see&amp;nbsp;whether the value of a categorical variable education (4 levels) differs significantly depending on which one of 5 groups a person is in.&amp;nbsp;This is weighted survey data so I am trying to test these multiple comparisons by running a multinomial logistic regression using education level as the dependent variable and using the 5 group variable as the independent variable, then using lsmeans to check for significant pairwise differences using Tukey procedure.&lt;/P&gt;&lt;P&gt;My syntax is below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SURVEYLOGISTIC DATA=data1;&lt;BR /&gt;weight weight;&lt;BR /&gt;CLASS EDUCATION_LEVEL GROUP / PARAM=GLM;&lt;BR /&gt;MODEL EDUCATION_LEVEL = GROUP / LINK=GLOGIT;&lt;BR /&gt;LSMEANS GROUP / ADJUST=TUKEY PDIFF=ALL;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the differences table in my&amp;nbsp;output doesn't show the differences between groups for the reference category of education. How do I change the code to show whether the reference group of education varies by the 5 groups?&lt;BR /&gt;Should I be using LSESTIMATE and if so, how do I specify that? I'm using SAS version 9.4&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2017 16:27:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-run-multiple-pairwise-testing-for-categorical-variables/m-p/365919#M19192</guid>
      <dc:creator>mj3</dc:creator>
      <dc:date>2017-06-10T16:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to run multiple pairwise testing for categorical variables in proc surveylogistic</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-run-multiple-pairwise-testing-for-categorical-variables/m-p/375694#M19690</link>
      <description>&lt;P&gt;&lt;SPAN&gt;For a four-level response, only three independent response functions (logits) can be simultaneously modeled - each using a ratio of the probabilities of one response level over the reference level. As a result, you get LS-mean estimates and pairwise comparisons among the predictor levels for each of those three response functions. The easiest way to get the estimates and comparisons for a logit focused on the reference response level is to change the reference level of the response. To do that, use the REF= option following the response variable name in the MODEL statement and specify (in quotes) a value of the response other than the reference level used in your initial analysis.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csFE01109C"&gt;For example, the following uses the data in the example titled "Nominal Response Data: Generalized Logits Model" in the LOGISTIC documentation.&lt;/SPAN&gt;&lt;SPAN class="csFE01109C"&gt;&amp;nbsp;The response, Style, has three levels - self, team, and class. The first step below fits the model to logits for styles self and team using class as the reference in both logits. The probability estimates for each school on the self and team styles are provided by the LSMEANS / ILINK statement and appear in the Mean column in the table of Least Squares Means. The estimates for the class style are provided by the second step which changes the reference level of the response to self instead of class. This code uses PROC LOGISTIC, but the same should work with SURVEYLOGISTIC.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csFE01109C"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csE0EE740F"&gt;proc&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="csE0EE740F"&gt;logistic&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;data&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;=school;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csAB6422E4"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;freq&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Count;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csAB6422E4"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;class&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;School/&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;param&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;=glm;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csAB6422E4"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;model&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Style(&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;order&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;=data)=School /&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;link&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;=glogit;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csAB6422E4"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;lsmeans&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;school/&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;diff&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;ilink&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csE0EE740F"&gt;run&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csE0EE740F"&gt;proc&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="csE0EE740F"&gt;logistic&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;data&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;=school;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csAB6422E4"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;freq&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Count;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csAB6422E4"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;class&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;School/&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;param&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;=glm;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csAB6422E4"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;model&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Style(&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;order&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;=data&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;ref&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;=&lt;/SPAN&gt;&lt;SPAN class="csAF1817D"&gt;"self"&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;)=School /&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;link&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;=glogit;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csAB6422E4"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;lsmeans&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;school/&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;diff&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="csD28C4F3F"&gt;ilink&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csE0EE740F"&gt;run&lt;/SPAN&gt;&lt;SPAN class="csAB6422E4"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="cs95E872D0"&gt;&lt;SPAN class="csFE01109C"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 14:05:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-run-multiple-pairwise-testing-for-categorical-variables/m-p/375694#M19690</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2017-07-13T14:05:08Z</dc:date>
    </item>
  </channel>
</rss>

