<?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: Creating &amp;quot;LINES&amp;quot; style output for pairwise comparisons with McNemar (PROC FREQ) in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829422#M41080</link>
    <description>&lt;P&gt;I have found that the "LINES" statement is producing something called a Compact Letter Display, and that is what I would like to create for pairwise comparisons I make using procedures that do not have an option to produce Compact Letter Displays natively.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS clearly has this built-in to some procedures, so it is possible, but it appears to be a more complex problem than I had imagined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update: I may have found part of my answer, though I don't have SAS/IML so that poses a problem.&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/friendly/SAS-macros/blob/master/mult.sas" target="_blank" rel="noopener"&gt;https://github.com/friendly/SAS-macros/blob/master/mult.sas&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Aug 2022 19:33:53 GMT</pubDate>
    <dc:creator>toxicatom5</dc:creator>
    <dc:date>2022-08-19T19:33:53Z</dc:date>
    <item>
      <title>Creating "LINES" style output for pairwise comparisons with McNemar (PROC FREQ)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829056#M41065</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am making multiple comparisons using McNemar's Test in PROC FREQ. My goal is to take the pairwise p-values from this output, and replicate the "LINES" style of output that is produced when comparing means through various procedures (e.g. PROC ANOVA). Is anyone aware of a macro that can transform pairwise p-values into the LINES style of output?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for any references you may have!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 19:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829056#M41065</guid>
      <dc:creator>toxicatom5</dc:creator>
      <dc:date>2022-08-17T19:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Creating "LINES" style output for pairwise comparisons with McNemar (PROC FREQ)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829079#M41066</link>
      <description>&lt;P&gt;This sounds interesting but you need to show some data and PROC FREQ to produce the pair-wise p-values.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 17:02:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829079#M41066</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2022-08-17T17:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Creating "LINES" style output for pairwise comparisons with McNemar (PROC FREQ)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829089#M41067</link>
      <description>&lt;P&gt;Also suggest what exact table is created by Proc Anova as there are 3 different MC lines related output tables possible&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 17:24:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829089#M41067</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-17T17:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Creating "LINES" style output for pairwise comparisons with McNemar (PROC FREQ)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829104#M41068</link>
      <description>&lt;P&gt;Below is some example code that produces a table called "MeanLines" which shows Tukey groupings for mean data with alpha = 0.05, and a table called Pairwise which shows pairwise p-values for each of the 3 comparisons being made using McNemar. Since I quickly mocked this up, let's assume alpha = 0.10 for the pairwise comparisons using McNemar. In that case, I would like the output to be:&lt;/P&gt;&lt;P&gt;variable3 67% A&lt;/P&gt;&lt;P&gt;variable2 44% AB&lt;/P&gt;&lt;P&gt;variable1 11% B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data example;&lt;BR /&gt;input variable 1 meandata 2 percdata 3;&lt;BR /&gt;datalines;&lt;BR /&gt;170&lt;BR /&gt;180&lt;BR /&gt;190&lt;BR /&gt;191&lt;BR /&gt;170&lt;BR /&gt;190&lt;BR /&gt;190&lt;BR /&gt;180&lt;BR /&gt;190&lt;BR /&gt;271&lt;BR /&gt;291&lt;BR /&gt;290&lt;BR /&gt;290&lt;BR /&gt;260&lt;BR /&gt;280&lt;BR /&gt;261&lt;BR /&gt;271&lt;BR /&gt;260&lt;BR /&gt;360&lt;BR /&gt;351&lt;BR /&gt;371&lt;BR /&gt;371&lt;BR /&gt;340&lt;BR /&gt;341&lt;BR /&gt;361&lt;BR /&gt;370&lt;BR /&gt;381&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;ods output mclines = meanlines;&lt;BR /&gt;proc anova data = example;&lt;BR /&gt;class variable;&lt;BR /&gt;model meandata = variable;&lt;BR /&gt;means variable / alpha = 0.05 tukey linestable;&lt;BR /&gt;title 'lines output for means';&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;BR /&gt;ods output close;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data variable1data;&lt;BR /&gt;set example;&lt;BR /&gt;if variable = 1;&lt;BR /&gt;rename percdata = variable1;&lt;BR /&gt;drop variable meandata;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data variable2data;&lt;BR /&gt;set example;&lt;BR /&gt;if variable = 2;&lt;BR /&gt;rename percdata = variable2;&lt;BR /&gt;drop variable meandata;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data variable3data;&lt;BR /&gt;set example;&lt;BR /&gt;if variable = 3;&lt;BR /&gt;rename percdata = variable3;&lt;BR /&gt;drop variable meandata;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data percdata;&lt;BR /&gt;merge variable1data variable2data variable3data;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc freq data = percdata;&lt;BR /&gt;tables variable1*variable2 variable1*variable3 variable2*variable3;&lt;BR /&gt;exact mcnemar;&lt;BR /&gt;output out = mcnemartest agree;&lt;BR /&gt;ods output mcnemarstest = pairwise;&lt;BR /&gt;title 'pairwise p-values for percentages';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 19:23:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829104#M41068</guid>
      <dc:creator>toxicatom5</dc:creator>
      <dc:date>2022-08-17T19:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Creating "LINES" style output for pairwise comparisons with McNemar (PROC FREQ)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829105#M41069</link>
      <description>&lt;P&gt;Sure thing! For Anova it is the MCLINES table, and for Proc Freq it is McNemarTest. I've added those tables in the example code above to provide a starting point.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 19:25:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829105#M41069</guid>
      <dc:creator>toxicatom5</dc:creator>
      <dc:date>2022-08-17T19:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Creating "LINES" style output for pairwise comparisons with McNemar (PROC FREQ)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829181#M41070</link>
      <description>&lt;P&gt;You can't "making multiple comparisons using McNemar's Test in PROC FREQ" .&lt;/P&gt;
&lt;P&gt;McNemar Test is used for COUNT/FREQ data in 2x2 contingency table, unlike continuous data for PROC ANOVA.&lt;/P&gt;
&lt;P&gt;If you want to make comparison with Risk Diff for matched pairs data(McNemar Test) ,check this:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/46/997.html" target="_blank"&gt; https://support.sas.com/kb/46/997.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And better post it at Statistical Forum . and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13758"&gt;@lvm&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp; might give you a hand .&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 12:26:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829181#M41070</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-08-18T12:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating "LINES" style output for pairwise comparisons with McNemar (PROC FREQ)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829190#M41071</link>
      <description>&lt;P&gt;Thanks for your response Ksharp. I left out the detail that I use a Bonferroni correction when making multiple comparisons using McNemar, only because it does not matter with regard to the problem I am trying to solve, but I do recognize that McNemar applies to 2x2 data only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ultimately, I am looking for a way of transforming the standard output of SAS into a format that is usable for me, and I think that will require a creative macro. SAS already transforms pairwise multiple comparisons into "statistical groupings" using the LINES option. I just don't know the process behind how it makes that transformation.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 13:02:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829190#M41071</guid>
      <dc:creator>toxicatom5</dc:creator>
      <dc:date>2022-08-18T13:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating "LINES" style output for pairwise comparisons with McNemar (PROC FREQ)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829285#M41073</link>
      <description>&lt;P&gt;I think it is possible to create a matrix of the pairwise comparisons where a 1 indicates the difference is not significant, and a 0 indicates it is significant. The diagonal is all 1's, of course. Using this thinking, and the example data I created above for the percentages, the matrix would look like this (v1-v3 sorted in descending numerical order):&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; v3 v2 v1&lt;BR /&gt;v3 1&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp;0&lt;BR /&gt;v2 1&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp;1&lt;BR /&gt;v1 0&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp;1&lt;BR /&gt;&lt;BR /&gt;There is a visual pattern of "blocks" of 1's. If we assign each "block" a letter code, we get:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;v3 v2 v1 B1 B2&lt;BR /&gt;v3 1&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp;0&amp;nbsp; A&lt;BR /&gt;v2 1&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp;1&amp;nbsp; A&amp;nbsp; &amp;nbsp;B&lt;BR /&gt;v1 0&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B&lt;BR /&gt;&lt;BR /&gt;I think my programming ability will allow me to create the matrix, but how the matrix is assessed in order to apply the letter codes is stumping me. Any ideas are appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 20:04:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829285#M41073</guid>
      <dc:creator>toxicatom5</dc:creator>
      <dc:date>2022-08-18T20:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating "LINES" style output for pairwise comparisons with McNemar (PROC FREQ)</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829422#M41080</link>
      <description>&lt;P&gt;I have found that the "LINES" statement is producing something called a Compact Letter Display, and that is what I would like to create for pairwise comparisons I make using procedures that do not have an option to produce Compact Letter Displays natively.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS clearly has this built-in to some procedures, so it is possible, but it appears to be a more complex problem than I had imagined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update: I may have found part of my answer, though I don't have SAS/IML so that poses a problem.&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/friendly/SAS-macros/blob/master/mult.sas" target="_blank" rel="noopener"&gt;https://github.com/friendly/SAS-macros/blob/master/mult.sas&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 19:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Creating-quot-LINES-quot-style-output-for-pairwise-comparisons/m-p/829422#M41080</guid>
      <dc:creator>toxicatom5</dc:creator>
      <dc:date>2022-08-19T19:33:53Z</dc:date>
    </item>
  </channel>
</rss>

