<?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 Corr for two variables in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Corr-for-two-variables/m-p/718754#M34779</link>
    <description>&lt;P&gt;If you're using PROC CORR to compute just one correlation coefficient the NOMISS option will have no effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As described in the &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_corr_details20.htm&amp;amp;locale=en" target="_self"&gt;Missing Values&lt;/A&gt; section of the PROC CORR documentation, by default the procedure uses pairwise deletion. So when computing the correlation between A and B it will use all observations where *both* A and B are nonmissing. When the NOMISS option is specified and listwise deletion is used, any observation with a missing value for any analysis value is excluded. When you have just two analysis variables listwise and pairwise deletion are the same since that pair of variables is the whole list of analysis variables.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Feb 2021 21:23:55 GMT</pubDate>
    <dc:creator>MichaelL_SAS</dc:creator>
    <dc:date>2021-02-11T21:23:55Z</dc:date>
    <item>
      <title>Proc Corr for two variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Corr-for-two-variables/m-p/718732#M34774</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to understand if there are any difference between pairwise and list wise deletion (using nomiss option) in proc corr - if my data set only includes two variables (A and B).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Variable A - 10 non-missing values&lt;/P&gt;&lt;P&gt;Variable B - 12 non-missing values&lt;/P&gt;&lt;P&gt;Will the correlation coefficient be calculated only based on 10 pairs of non-missing values?&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I plot these two variables on a scatter plot, I only see ten data points. Is there a way to include all 12 data points?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 20:06:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Corr-for-two-variables/m-p/718732#M34774</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2021-02-11T20:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Corr for two variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Corr-for-two-variables/m-p/718742#M34776</link>
      <description>&lt;P&gt;To make graph of any type you need the coordinates. In a two dimensional plot that means an X and Y value.&lt;/P&gt;
&lt;P&gt;Where do you expect the "missing" coordinate to be plotted?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you use NOMISS with proc corr than any observation that has any missing analysis variables (all numeric by default or only those listed on VAR/WITH statements) are excluded.&lt;/P&gt;
&lt;P&gt;Here is an example to demonstrate the difference.&lt;/P&gt;
&lt;PRE&gt;data example;
   set sashelp.class;
   if name='Alice' then age=.;
run;

Proc corr data=example;
   title 'Default';
run; title;

Proc corr data=example nomiss;
   title 'With NOMIISS';

run; title;&lt;/PRE&gt;
&lt;P&gt;You will see that where pairs of variables exist the correlation is calculated. So you get some calculations with 18 and some with 19 observations. In the second with the NOMISS option only the 18 records that have no missing values for any of age, height or weight (the numeric variables in the sashelp.class data set) are used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regardless of option any time that any of the variables of interest are missing the pair is not used in the correlation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 20:37:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Corr-for-two-variables/m-p/718742#M34776</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-02-11T20:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Corr for two variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Corr-for-two-variables/m-p/718743#M34777</link>
      <description>Set the missing to 0 to graph it.</description>
      <pubDate>Thu, 11 Feb 2021 20:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Corr-for-two-variables/m-p/718743#M34777</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-02-11T20:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Corr for two variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Corr-for-two-variables/m-p/718754#M34779</link>
      <description>&lt;P&gt;If you're using PROC CORR to compute just one correlation coefficient the NOMISS option will have no effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As described in the &lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_corr_details20.htm&amp;amp;locale=en" target="_self"&gt;Missing Values&lt;/A&gt; section of the PROC CORR documentation, by default the procedure uses pairwise deletion. So when computing the correlation between A and B it will use all observations where *both* A and B are nonmissing. When the NOMISS option is specified and listwise deletion is used, any observation with a missing value for any analysis value is excluded. When you have just two analysis variables listwise and pairwise deletion are the same since that pair of variables is the whole list of analysis variables.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 21:23:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Corr-for-two-variables/m-p/718754#M34779</guid>
      <dc:creator>MichaelL_SAS</dc:creator>
      <dc:date>2021-02-11T21:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Corr for two variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Corr-for-two-variables/m-p/718772#M34782</link>
      <description>&lt;P&gt;For three or more variables, you can construct examples where listwise and pairwise deletion give different answers. For an example, and for an explanation of why SAS regression and multivariate procedures use listwise deletion, see &lt;A href="https://blogs.sas.com/content/iml/2012/01/13/missing-values-pairwise-corr.html" target="_self"&gt;"Missing values and pairwise correlations: A cautionary example."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 22:14:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Corr-for-two-variables/m-p/718772#M34782</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-02-11T22:14:15Z</dc:date>
    </item>
  </channel>
</rss>

