<?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: Proc univariate basicintervals differ from confidence interval calulated via proc sql in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-univariate-basicintervals-differ-from-confidence-interval/m-p/776436#M38032</link>
    <description>&lt;P&gt;Ah, yes of course! Now the two methods matches perfectly. Thanks Rick - you have increased my statistical understanding&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 26 Oct 2021 12:12:45 GMT</pubDate>
    <dc:creator>JoakimE</dc:creator>
    <dc:date>2021-10-26T12:12:45Z</dc:date>
    <item>
      <title>Proc univariate basicintervals differ from confidence interval calulated via proc sql</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-univariate-basicintervals-differ-from-confidence-interval/m-p/774855#M37898</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My aim to calculate the normal 95% confidence interval for specific variable 'CHG'. I know this is possible via proc univariate or via using the formula directly in proc sql. The two methods should yield identical results, but alas, they do not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;select&lt;BR /&gt;mean(CHG)+(probit(0.025)*std(CHG)/sqrt(count(CHG))) as Upper_CI,&lt;BR /&gt;mean(CHG)-(probit(0.025)*std(CHG)/sqrt(count(CHG))) as Lower_CI&lt;BR /&gt;from example_data;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it does not give the same result as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods output BasicIntervals = work.CONFINT;&lt;BR /&gt;proc univariate data=example_data cibasic;&lt;BR /&gt;var CHG;&lt;BR /&gt;run;&lt;BR /&gt;ods output close;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The CIs calculated in the sql are somewhat narrower (not much, but noticeable in the second decimal for the data I've used). Can anyone shed light on what is causing the two methods to differ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any assistance would be much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 10:48:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-univariate-basicintervals-differ-from-confidence-interval/m-p/774855#M37898</guid>
      <dc:creator>JoakimE</dc:creator>
      <dc:date>2021-10-18T10:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Proc univariate basicintervals differ from confidence interval calulated via proc sql</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-univariate-basicintervals-differ-from-confidence-interval/m-p/774856#M37899</link>
      <description>&lt;P&gt;PROC UNIVARIATE uses a t statistic, not a z score. The t statistic is the better choice, so your manual formula should use the QUANTILE function for the t distribution&amp;nbsp; and n-1 degrees of freedom:&lt;/P&gt;
&lt;P&gt;&lt;TT&gt;QUANTILE("t", 1-alpha/2, n-1)&lt;/TT&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 10:51:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-univariate-basicintervals-differ-from-confidence-interval/m-p/774856#M37899</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-10-18T10:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Proc univariate basicintervals differ from confidence interval calulated via proc sql</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-univariate-basicintervals-differ-from-confidence-interval/m-p/776436#M38032</link>
      <description>&lt;P&gt;Ah, yes of course! Now the two methods matches perfectly. Thanks Rick - you have increased my statistical understanding&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 12:12:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-univariate-basicintervals-differ-from-confidence-interval/m-p/776436#M38032</guid>
      <dc:creator>JoakimE</dc:creator>
      <dc:date>2021-10-26T12:12:45Z</dc:date>
    </item>
  </channel>
</rss>

