<?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: Calculate P-values of a string of returns in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-P-values-of-a-string-of-returns/m-p/451310#M69745</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your kind reply. I have reviewed and realized I need to calculate alpha for each company. My alphas and t-statistics calculated and are just other 2 statistics to evaluate return.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My apologies for my misunderstanding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data like you said has company, date and a calculated return. Alphas and their t-values are calculated later. I expect to estimate p-values for each of these 3 statistics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My literal instruction was to calculate the two-sided p-values, in a format of a string data. I'd appreciate your suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Apr 2018 20:34:39 GMT</pubDate>
    <dc:creator>KrisDeng</dc:creator>
    <dc:date>2018-04-04T20:34:39Z</dc:date>
    <item>
      <title>Calculate P-values of a string of returns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-P-values-of-a-string-of-returns/m-p/451220#M69740</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a novice user and I have a return data set with Company, Date and Return. I would like to calculate the p-value of each company from the returns, the hypothesis is return = 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have looked at a few documents about proc reg, freq, corr, mean, sql but have not found (or probably overlooked)&amp;nbsp;the&amp;nbsp;solution. I would really appreciate any suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached please find the data file I am working on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 20:35:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-P-values-of-a-string-of-returns/m-p/451220#M69740</guid>
      <dc:creator>KrisDeng</dc:creator>
      <dc:date>2018-04-04T20:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate P-values of a string of returns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-P-values-of-a-string-of-returns/m-p/451226#M69741</link>
      <description>&lt;P&gt;P-values imply a statistical test - which statistical test are you undertaking? What's your hypothesis and how are you testing it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These aren't really SAS questions by the way, they're methodology questions that only you can really answer.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the hypothesis is return = 0, why not just run a proc means? OR are you testing this by company?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc univariate data=sashelp.class mu0=0;
var weight;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS Output&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Univariate: Tests For Location" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="5" scope="colgroup"&gt;Tests&amp;nbsp;for&amp;nbsp;Location:&amp;nbsp;Mu0=0&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l b header" scope="col"&gt;Test&lt;/TH&gt;
&lt;TH class="c b header" colspan="2" scope="colgroup"&gt;Statistic&lt;/TH&gt;
&lt;TH class="c b header" colspan="2" scope="colgroup"&gt;p Value&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Student's t&lt;/TH&gt;
&lt;TH class="l rowheader" scope="row"&gt;t&lt;/TH&gt;
&lt;TD class="r data"&gt;19.1449&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Pr &amp;gt; |t|&lt;/TH&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Sign&lt;/TH&gt;
&lt;TH class="l rowheader" scope="row"&gt;M&lt;/TH&gt;
&lt;TD class="r data"&gt;9.5&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Pr &amp;gt;= |M|&lt;/TH&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l rowheader" scope="row"&gt;Signed Rank&lt;/TH&gt;
&lt;TH class="l rowheader" scope="row"&gt;S&lt;/TH&gt;
&lt;TD class="r data"&gt;95&lt;/TD&gt;
&lt;TH class="l rowheader" scope="row"&gt;Pr &amp;gt;= |S|&lt;/TH&gt;
&lt;TD class="r data"&gt;&amp;lt;.0001&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 17:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-P-values-of-a-string-of-returns/m-p/451226#M69741</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-04T17:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate P-values of a string of returns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-P-values-of-a-string-of-returns/m-p/451229#M69742</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Thank you for your kind reply. To answer your question, I am actually testing a few hypotheses, including return, a regressed string of alphas from the CAPM model, and the t-value of each of these alphas. I am testing by company.&lt;BR /&gt;&lt;BR /&gt;I am expecting to get a string of two-tailed p-value of each company for 3 statistics return, alpha and t-value of alpha.&lt;BR /&gt;&lt;BR /&gt;Please let me know if I can provide any further information. I will try the codes your provided and see if it works.&lt;BR /&gt;&lt;BR /&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 20:36:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-P-values-of-a-string-of-returns/m-p/451229#M69742</guid>
      <dc:creator>KrisDeng</dc:creator>
      <dc:date>2018-04-04T20:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate P-values of a string of returns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-P-values-of-a-string-of-returns/m-p/451267#M69743</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;I am expecting to get a string of two-tailed p-values to match each return, alpha and t-value of alpha.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Calculating things are easy, if you know the rules.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How would you calculate a p-value for each return? I have no idea of what your data looks like but I assumed you had company name, the date and return somehow calculated for that date. For a statistical test, you need more than a single data point.&amp;nbsp; And what's alpha? This may be subject specific term, but my finance is pretty rusty these days.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 19:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-P-values-of-a-string-of-returns/m-p/451267#M69743</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-04T19:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate P-values of a string of returns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate-P-values-of-a-string-of-returns/m-p/451310#M69745</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your kind reply. I have reviewed and realized I need to calculate alpha for each company. My alphas and t-statistics calculated and are just other 2 statistics to evaluate return.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My apologies for my misunderstanding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My data like you said has company, date and a calculated return. Alphas and their t-values are calculated later. I expect to estimate p-values for each of these 3 statistics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My literal instruction was to calculate the two-sided p-values, in a format of a string data. I'd appreciate your suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Apr 2018 20:34:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate-P-values-of-a-string-of-returns/m-p/451310#M69745</guid>
      <dc:creator>KrisDeng</dc:creator>
      <dc:date>2018-04-04T20:34:39Z</dc:date>
    </item>
  </channel>
</rss>

