<?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: Using PROC CORR for predictive analytics and Pearson Correlation Coefficients in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806925#M318020</link>
    <description>&lt;P&gt;So when it comes to using PROC GLM, how would I code this for quantity and unit price to predict net sales?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC GLM DATA=SALESDATA;&lt;/P&gt;&lt;P&gt;CLASS ?&lt;/P&gt;&lt;P&gt;MODEL ?&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not familiar with proc glm...&lt;/P&gt;</description>
    <pubDate>Sat, 09 Apr 2022 14:08:56 GMT</pubDate>
    <dc:creator>mccusker1818</dc:creator>
    <dc:date>2022-04-09T14:08:56Z</dc:date>
    <item>
      <title>Using PROC CORR for predictive analytics and Pearson Correlation Coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806892#M317997</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have bene tasked with performing predictive analytics for a couple of data sets and was wonedering if someone could double check my work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to find the relation between several variables and Net_Sales.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code:&lt;/P&gt;&lt;PRE&gt;proc corr data=MIS543.CLOTHINGORDERS pearson plots(maxpoints=none)=matrix;&lt;BR /&gt;	var net_sale;&lt;BR /&gt;	with quantity product_id territory_id unit_price;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;My results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="net sales corr.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70264i603F73041229FD2F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="net sales corr.PNG" alt="net sales corr.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; Based on these results:&lt;/P&gt;&lt;P&gt;Quantity, territory_id, and unit_price all have positive correlation with net sales (meaning as they go up, so does the net sales, correct?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is this predictive analytics? I would perform forecasting for net sales, but I have no time series data at my disposal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 00:42:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806892#M317997</guid>
      <dc:creator>mccusker1818</dc:creator>
      <dc:date>2022-04-09T00:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC CORR for predictive analytics and Pearson Correlation Coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806918#M318014</link>
      <description>&lt;P&gt;Given the way I use the word "predictive", PROC CORR won't do "predictive" analytics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC GLM (or any other appropriate modeling procedure) will do predictive analysis, so you can actually predict what would happen if, for example: if quantity=24 and unit_price=83, what is the predicted value of net_sale?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any modeling, and in PROC CORR, you cannot use territory_id and product_id as a continuous variable. These must be used as categories (CLASS variables) in PROC GLM.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 10:27:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806918#M318014</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-09T10:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC CORR for predictive analytics and Pearson Correlation Coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806925#M318020</link>
      <description>&lt;P&gt;So when it comes to using PROC GLM, how would I code this for quantity and unit price to predict net sales?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC GLM DATA=SALESDATA;&lt;/P&gt;&lt;P&gt;CLASS ?&lt;/P&gt;&lt;P&gt;MODEL ?&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not familiar with proc glm...&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 14:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806925#M318020</guid>
      <dc:creator>mccusker1818</dc:creator>
      <dc:date>2022-04-09T14:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC CORR for predictive analytics and Pearson Correlation Coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806926#M318021</link>
      <description>&lt;P&gt;General answer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC GLM DATA=SALESDATA;&lt;/P&gt;
&lt;P&gt;CLASS &amp;lt;class variables go here&amp;gt;;&lt;/P&gt;
&lt;P&gt;MODEL net_sale = &amp;lt;continous variables go here&amp;gt; &amp;lt;class variables go here&amp;gt;;&lt;/P&gt;
&lt;P&gt;RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are plenty of options in PROC GLM, as well as the ability to add interactions and polynomial terms. Take a look at the examples at &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/statug/statug_glm_examples.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmmvacdc/9.4/statug/statug_glm_examples.htm&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 14:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806926#M318021</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-09T14:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC CORR for predictive analytics and Pearson Correlation Coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806929#M318022</link>
      <description>&lt;P&gt;Thank you for the assistance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my code is this:&lt;/P&gt;&lt;PRE&gt;PROC GLM DATA=mis543.clothingorders;&lt;BR /&gt;CLASS NET_SALE;&lt;BR /&gt;MODEL NET_SALE= QUANTITY UNIT_PRICE;&lt;BR /&gt;RUN;&lt;/PRE&gt;&lt;P&gt;Which gives me these results and corresponding contour fit plot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cccccc.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70273iB0D9297F2E0A1EBE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cccccc.PNG" alt="cccccc.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ddddddd.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70274i494F10ADD34E7D3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ddddddd.PNG" alt="ddddddd.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; How do I interpret these results?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 14:55:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806929#M318022</guid>
      <dc:creator>mccusker1818</dc:creator>
      <dc:date>2022-04-09T14:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC CORR for predictive analytics and Pearson Correlation Coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806932#M318023</link>
      <description>&lt;P&gt;Net_sale is not a predictor variable, it does not belong in the CLASS statement. Try taking the CLASS statement out and run it again.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 15:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806932#M318023</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-09T15:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC CORR for predictive analytics and Pearson Correlation Coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806936#M318024</link>
      <description>&lt;P&gt;Ok I thought I had to have a class statement.&lt;/P&gt;&lt;P&gt;How does this look?&lt;/P&gt;&lt;PRE&gt;PROC GLM DATA=mis543.clothingorders;&lt;BR /&gt;MODEL NET_SALE= QUANTITY UNIT_PRICE;&lt;BR /&gt;RUN;&lt;/PRE&gt;&lt;P&gt;The results are similar, but I still don't really know how to interpret these results.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cccccc.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70276iD404AEC86D83B5E2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cccccc.PNG" alt="cccccc.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ddddddd.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/70278iBF239E88DEC54039/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ddddddd.PNG" alt="ddddddd.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 15:47:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806936#M318024</guid>
      <dc:creator>mccusker1818</dc:creator>
      <dc:date>2022-04-09T15:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC CORR for predictive analytics and Pearson Correlation Coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806940#M318027</link>
      <description>&lt;P&gt;The predictive equation for net_sale is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-428.2695 + 19.6373*quantity + 20.3367*unit_price&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The R-square of &amp;gt;0.8 indicates that the model fits very well&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Pr&amp;gt;F is less than 0.05 (a "standard" cutoff for this value) indicating that the effects of both quantity and unit_price are statistically significant.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm wondering why this is an example for statistics, anyway. Isn't net_sale always equal to quantity*unit_price?? Maybe you throw in taxes into net_sale, so net_sale is (1+ tax rate)*(quantity*unit_price)?&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 16:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806940#M318027</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-09T16:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC CORR for predictive analytics and Pearson Correlation Coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806942#M318029</link>
      <description>Thanks for all the help.&lt;BR /&gt;For my assignment I am supposed to use "predictive statistics" for a couple of datasets, but neither of the sets have a time id variable like months or quarters. I was planning on using PROC FORECAST but since my data lacks any time variables, I am not sure what type of predictive statistics I can actually do.</description>
      <pubDate>Sat, 09 Apr 2022 16:18:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806942#M318029</guid>
      <dc:creator>mccusker1818</dc:creator>
      <dc:date>2022-04-09T16:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using PROC CORR for predictive analytics and Pearson Correlation Coefficients</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806945#M318031</link>
      <description>&lt;P&gt;In my use of the word "predictive", no time variable is needed (although certainly you can do predictive modeling if you do have a time variable). If you are baking chocolate chip cookies, you have temperature, you have amount of shortening, and the response is some measure of taste, you can statistically determine a relationship using temperature and amount of shortening to predict the taste.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your sales example seems to be weak for the reasons I mentioned. It's not a statistical relationship been sales and price per unit and quantity, it's a deterministic relationship.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Apr 2022 19:38:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-PROC-CORR-for-predictive-analytics-and-Pearson-Correlation/m-p/806945#M318031</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-09T19:38:31Z</dc:date>
    </item>
  </channel>
</rss>

