<?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: CORR Proc scatter plot specific variables in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/CORR-Proc-scatter-plot-specific-variables/m-p/699373#M33731</link>
    <description>&lt;P&gt;A Freq statement is used when you have a variable that indicates each record in your data set represents more than one identical records.&lt;/P&gt;
&lt;P&gt;A weight statement would be used when you have a variable that indicates each record should have a weight applied, such as from a selection probability.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Corr expects to see variables that represent continuous, or at least sort of continuous variables. If you only have 2 levels for a variable it likely is in appropriate to include on a VAR statement.&lt;/P&gt;
&lt;P&gt;I suspect that you might be asking for analysis of different levels of the Industrial variable so you can see the differences of the other variables between the levels.&lt;/P&gt;
&lt;P&gt;That would be BY group processing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sort your data by Industrial.&lt;/P&gt;
&lt;P&gt;Then add a BY statement with the Industrial variable.&lt;/P&gt;
&lt;PRE&gt;Proc sort data=dmft;
   by industrial;
run;

proc corr data=dmft  plots=(scatter);
   by industrial;
   Var sugar dmft;
   Title 'correlation of sugar and decaying teeth in industrial and nonindustrial countries';
 run; title;&lt;/PRE&gt;
&lt;P&gt;BY group processing lets you repeat analysis or other actions in many SAS procedures by the values of one or more variables but requires sorting of the data.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2020 06:54:09 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-11-17T06:54:09Z</dc:date>
    <item>
      <title>CORR Proc scatter plot specific variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CORR-Proc-scatter-plot-specific-variables/m-p/699337#M33728</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i am having trouble figuring out how to pull out a specific variable to run my scatterplot for. I have to run the code for the entire data set, and then two variables.&lt;/P&gt;&lt;P&gt;Do I need to use a weighted statement or a freq statement? i've used both but i'm not sure if i'm on the right track.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code i used for my original data set:&lt;/P&gt;&lt;P&gt;proc corr data=dmft&amp;nbsp; plots=(scatter);&lt;/P&gt;&lt;P&gt;&amp;nbsp;Var industrial sugar dmft;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Title 'correlation of sugar and decaying teeth in industrial and nonindustrial countries';&lt;/P&gt;&lt;P&gt;&amp;nbsp;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then need to run the code specifically for the industrial variable and nonindustrial variable but they are put in the code as&amp;nbsp;if industrial=2 then industrial=0.&lt;/P&gt;&lt;P&gt;is there a link to more information on this somewhere?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 00:14:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CORR-Proc-scatter-plot-specific-variables/m-p/699337#M33728</guid>
      <dc:creator>lgooseberry</dc:creator>
      <dc:date>2020-11-17T00:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: CORR Proc scatter plot specific variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CORR-Proc-scatter-plot-specific-variables/m-p/699373#M33731</link>
      <description>&lt;P&gt;A Freq statement is used when you have a variable that indicates each record in your data set represents more than one identical records.&lt;/P&gt;
&lt;P&gt;A weight statement would be used when you have a variable that indicates each record should have a weight applied, such as from a selection probability.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Corr expects to see variables that represent continuous, or at least sort of continuous variables. If you only have 2 levels for a variable it likely is in appropriate to include on a VAR statement.&lt;/P&gt;
&lt;P&gt;I suspect that you might be asking for analysis of different levels of the Industrial variable so you can see the differences of the other variables between the levels.&lt;/P&gt;
&lt;P&gt;That would be BY group processing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sort your data by Industrial.&lt;/P&gt;
&lt;P&gt;Then add a BY statement with the Industrial variable.&lt;/P&gt;
&lt;PRE&gt;Proc sort data=dmft;
   by industrial;
run;

proc corr data=dmft  plots=(scatter);
   by industrial;
   Var sugar dmft;
   Title 'correlation of sugar and decaying teeth in industrial and nonindustrial countries';
 run; title;&lt;/PRE&gt;
&lt;P&gt;BY group processing lets you repeat analysis or other actions in many SAS procedures by the values of one or more variables but requires sorting of the data.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 06:54:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CORR-Proc-scatter-plot-specific-variables/m-p/699373#M33731</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-17T06:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: CORR Proc scatter plot specific variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/CORR-Proc-scatter-plot-specific-variables/m-p/699455#M33733</link>
      <description>&lt;P&gt;I'm having a great deal of difficulty understanding the question. It's not clear what the desired output is. Can you show us screen captures? (Use the camera icon to include the screen capture in your reply)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 11:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/CORR-Proc-scatter-plot-specific-variables/m-p/699455#M33733</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-11-17T11:26:22Z</dc:date>
    </item>
  </channel>
</rss>

