<?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 FREQ : How to get the sign of stratum-adjusted Spearman correlations in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195402#M10413</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In proc freq, strata play a distinct role from BY analysis. A stratum-adjusted correlation is not the same as correlations by stratum. The former is a single coefficient of within strata relationship, the later are multiple coefficients, one for each stratum. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 May 2015 21:19:30 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2015-05-28T21:19:30Z</dc:date>
    <item>
      <title>Proc FREQ : How to get the sign of stratum-adjusted Spearman correlations</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195398#M10409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The CMH statistic calculated on RIDIT scores (proc FREQ) takes the value (&lt;EM&gt;n&lt;/EM&gt;-1)*&lt;EM&gt;Rs&lt;/EM&gt;**2 where &lt;EM&gt;Rs&lt;/EM&gt; is the Spearman rank correlation. This is of interest with multi-level tables, because it is the only way in SAS to get a stratum-adjusted Spearman correlation. How can I get the sign of &lt;EM&gt;Rs&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 16:21:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195398#M10409</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-05-28T16:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FREQ : How to get the sign of stratum-adjusted Spearman correlations</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195399#M10410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get Spearmen coefficients from PROC CORR with the SPEARMAN option. For example, the Spearman coefficient for the following data is 0.36332 and n=21.&amp;nbsp; The CMH statistic is (21-1)*(0.36332)**2 = 2.6400&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;call streaminit(1);&lt;BR /&gt;do i = 1 to 21;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; x = rand("table", 0.5, 0.3, 0.2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; y = rand("table", 0.5-x/10, 0.3, 0.2+x/10);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc corr data=test spearman noprob;&lt;BR /&gt;var x y;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc freq data=test;&lt;BR /&gt;tables x*y / scores=ridit cmh norow nopercent nocol;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 18:54:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195399#M10410</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-05-28T18:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FREQ : How to get the sign of stratum-adjusted Spearman correlations</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195400#M10411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. But my question is about &lt;SPAN style="text-decoration: underline;"&gt;stratum-adjusted&lt;/SPAN&gt; correlations. As with TABLES A*x*y / ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 20:29:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195400#M10411</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-05-28T20:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FREQ : How to get the sign of stratum-adjusted Spearman correlations</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195401#M10412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Proc corr;&lt;/P&gt;&lt;P&gt;by A;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would think would do it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 20:57:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195401#M10412</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-05-28T20:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FREQ : How to get the sign of stratum-adjusted Spearman correlations</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195402#M10413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In proc freq, strata play a distinct role from BY analysis. A stratum-adjusted correlation is not the same as correlations by stratum. The former is a single coefficient of within strata relationship, the later are multiple coefficients, one for each stratum. - PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 21:19:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195402#M10413</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-05-28T21:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FREQ : How to get the sign of stratum-adjusted Spearman correlations</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195403#M10414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about dummy coding the strata variable, then using proc corr and putting all the dummy variables in the partial statement? (I haven't checked the validity of this approach.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 23:26:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195403#M10414</guid>
      <dc:creator>gergely_batho</dc:creator>
      <dc:date>2015-05-29T23:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FREQ : How to get the sign of stratum-adjusted Spearman correlations</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195404#M10415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm, that sounds logical to me--partialling out the strata effect ought to at least get the sign correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 13:25:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195404#M10415</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-06-01T13:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Proc FREQ : How to get the sign of stratum-adjusted Spearman correlations</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195405#M10416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Back at this, at last. The partial correlation sounded indeed like an intuitively appealing idea, thanks &lt;A __default_attr="7180" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;. So I ran a simulation. Correlated random pairs were generated with proc simnormal. Data was divided into 5 groups with means 1, 2, 3, 5, 7 and Std devs 1, 2, 3, 5, 7, each group represented by 100 pairs. The exercise was repeated for correlations of 0.5 and -0.1. Partial and stratum-adjusted correlation estimates were compared for 1000 sets of 500 observations. Stratum-adjusted estimates were given the sign of the corresponding partial correlation as suggested by &lt;A __default_attr="455729" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;. Here are the results:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="SGPlot11.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/10738_SGPlot11.png" width="450" /&gt; &lt;IMG alt="SGPlot10.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/10739_SGPlot10.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;It is obvious to me that the two estimates are somewhat related and sligntly biassed toward zero, but certainly &lt;SPAN style="text-decoration: underline;"&gt;not equivalent&lt;/SPAN&gt;. In the small negative correlation simulation, about 1% of the stratum-adjusted correlations were given the &lt;EM&gt;wrong&lt;/EM&gt; sign. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 21:51:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-FREQ-How-to-get-the-sign-of-stratum-adjusted-Spearman/m-p/195405#M10416</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-06-04T21:51:01Z</dc:date>
    </item>
  </channel>
</rss>

