<?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: how to use R² from multiple regressions as a variable in another regression in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-R-from-multiple-regressions-as-a-variable-in-another/m-p/99927#M258040</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc reg data=have outest=want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;by myStock myWhatever;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;model myPrice = myXvariable / rsquare;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc print data=want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;var myStock myWhatever _RSQ_;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&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, 05 Jul 2012 01:37:30 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2012-07-05T01:37:30Z</dc:date>
    <item>
      <title>how to use R² from multiple regressions as a variable in another regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-R-from-multiple-regressions-as-a-variable-in-another/m-p/99926#M258039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i am estimating regressions for stock prices on monthly basis, i want to creat a timeseries variable of R² from each regression , How to do it????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 01:14:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-R-from-multiple-regressions-as-a-variable-in-another/m-p/99926#M258039</guid>
      <dc:creator>Ahmad</dc:creator>
      <dc:date>2012-07-05T01:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to use R² from multiple regressions as a variable in another regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-R-from-multiple-regressions-as-a-variable-in-another/m-p/99927#M258040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc reg data=have outest=want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;by myStock myWhatever;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;model myPrice = myXvariable / rsquare;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;proc print data=want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;var myStock myWhatever _RSQ_;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;run;&lt;/STRONG&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, 05 Jul 2012 01:37:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-R-from-multiple-regressions-as-a-variable-in-another/m-p/99927#M258040</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-07-05T01:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to use R² from multiple regressions as a variable in another regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-R-from-multiple-regressions-as-a-variable-in-another/m-p/99928#M258041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick reply &lt;A __default_attr="2746" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;, i have another question how can i calculate weekly standard deviation from my daily price series and use it in a regression as a variable??&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 01:42:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-R-from-multiple-regressions-as-a-variable-in-another/m-p/99928#M258041</guid>
      <dc:creator>Ahmad</dc:creator>
      <dc:date>2012-07-05T01:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to use R² from multiple regressions as a variable in another regression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-R-from-multiple-regressions-as-a-variable-in-another/m-p/99929#M258042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I get it right, what you want is something like (untested) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;STRONG&gt;proc sql;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;STRONG&gt;create table myWstd as&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;STRONG&gt;select stock, intck("WEEK", '01JAN2000'd, myDate) as weekNo, std(price) as priceStd&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;STRONG&gt;from myData&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;STRONG&gt;group by stock, calculated weekNo;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;and then regress priceStd on weekNo, by stock.&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, 05 Jul 2012 14:38:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-R-from-multiple-regressions-as-a-variable-in-another/m-p/99929#M258042</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-07-05T14:38:21Z</dc:date>
    </item>
  </channel>
</rss>

