<?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 P value and T value calculation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607883#M176798</link>
    <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;I used following code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc means data=master_1;&lt;BR /&gt;Var r;&lt;BR /&gt;by t;&lt;BR /&gt;OUTPUT out = final;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;I got mean std;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering how can I get t value and P in this case. What code should I use?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2019 22:16:45 GMT</pubDate>
    <dc:creator>Xinhui</dc:creator>
    <dc:date>2019-11-27T22:16:45Z</dc:date>
    <item>
      <title>P value and T value calculation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607883#M176798</link>
      <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;I used following code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc means data=master_1;&lt;BR /&gt;Var r;&lt;BR /&gt;by t;&lt;BR /&gt;OUTPUT out = final;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;I got mean std;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering how can I get t value and P in this case. What code should I use?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 22:16:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607883#M176798</guid>
      <dc:creator>Xinhui</dc:creator>
      <dc:date>2019-11-27T22:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: P value and T value calculation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607888#M176802</link>
      <description>&lt;P&gt;You can get a T value by requesting the T statistic. (Confusing as you have a variable named T);&lt;/P&gt;
&lt;P&gt;A P value requires a test. What test do want to run?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 22:30:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607888#M176802</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-11-27T22:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: P value and T value calculation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607890#M176804</link>
      <description>&lt;P&gt;T is a veriable ”time"&amp;nbsp;&lt;/P&gt;&lt;P&gt;t has value 1,2,3,.....18,&lt;/P&gt;&lt;P&gt;R is the return,&lt;/P&gt;&lt;P&gt;I have 500 firms' data in the sample.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get T-statistic&amp;nbsp; and P vlue for returns, based on different groups of samples by t, T=1,2....18.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 22:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607890#M176804</guid>
      <dc:creator>Xinhui</dc:creator>
      <dc:date>2019-11-27T22:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: P value and T value calculation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607892#M176806</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124145"&gt;@Xinhui&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;T is a veriable ”time"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;t has value 1,2,3,.....18,&lt;/P&gt;
&lt;P&gt;R is the return,&lt;/P&gt;
&lt;P&gt;I have 500 firms' data in the sample.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to get T-statistic&amp;nbsp; and P vlue for returns, based on different groups of samples by t, T=1,2....18.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I say again: to have a P-value you have to conduct a statistical test. So what exact statistical test is your P-value supposed to reflect? Do you want to test that R is not 0? Is greater than 10? Less than 100? That the value of R is different at T=1 compared to T=2?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get a t-value p-value related to testing if the variable = 0 with this in proc means:&lt;/P&gt;
&lt;PRE&gt;proc means data=sashelp.class mean std t probt;
  class sex;
  var height;
run;&lt;/PRE&gt;
&lt;P&gt;If you need to test that the hypothesized value of the mean is something besides 0&amp;nbsp; you'll need to go to a different procedure. Which gets back to what do you want to test?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 23:10:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607892#M176806</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-11-27T23:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: P value and T value calculation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607893#M176807</link>
      <description>What's the hypothesis you're testing?</description>
      <pubDate>Wed, 27 Nov 2019 23:10:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607893#M176807</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-11-27T23:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: P value and T value calculation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607894#M176808</link>
      <description>&lt;P&gt;my hypothsis is&amp;nbsp;&lt;/P&gt;&lt;P&gt;h0: r=0;&lt;/P&gt;&lt;P&gt;h1: r not equal to 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 23:12:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607894#M176808</guid>
      <dc:creator>Xinhui</dc:creator>
      <dc:date>2019-11-27T23:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: P value and T value calculation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607896#M176810</link>
      <description>Then you can use PROC Univariate as designed.&lt;BR /&gt;See the different statistics and keywords and definitions here:&lt;BR /&gt;&lt;A href="https://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p0v0y1on1hbxukn0zqgsp5ky8hc0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p0v0y1on1hbxukn0zqgsp5ky8hc0.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You want PROBT for a two tailed p-value.</description>
      <pubDate>Wed, 27 Nov 2019 23:16:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607896#M176810</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-11-27T23:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: P value and T value calculation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607898#M176812</link>
      <description>&lt;P&gt;I got what I want&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 23:19:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/P-value-and-T-value-calculation/m-p/607898#M176812</guid>
      <dc:creator>Xinhui</dc:creator>
      <dc:date>2019-11-27T23:19:42Z</dc:date>
    </item>
  </channel>
</rss>

