title: How is ci.mean.95 calculated in pastecs in r. Result not as expected
body: <p>I am using <code>pastecs</code> to get some descriptive statistics on a set of data.
  I cannot understand how its <code>ci.mean.95</code> value is calculated.
  As an example, if you do:</p>
  
  <pre><code>test &lt;-c(1,2,3,4)
  </code></pre>
  
  <p>then </p>
  
  <pre><code>stat.desc(test)
  </code></pre>
  
  <p>you get</p>
  
  <pre><code>sum 10
  mean 2.5
  sd 1.2909944
  se.mean 0.6454972
  </code></pre>
  
  <p>which all check out as expected, if I repeat the calculations on paper.
  But, CI.mean.95 is 2.0542603  (it defaults to p 0.95)</p>
  
  <p>When I do this calculation on paper it should be +/- 1.2651604</p>
  
  <p>Can you say why these do not tally? What is stat.desc giving me with CI.mean if it is not the simple CI of the mean that I calculated?</p>
  
  <p>I have poured over any info that comes with pastecs and can't see anything that explains why CI.mean.0.95 is not 1.96*SE.mean</p>
  
  <p>Any insight into this would be very helpful, thanks.</p>