ci.mean.ps | R Documentation |
Computes a confidence interval for a population paired-samples mean difference using the estimated means, estimated standard deviations, estimated correlation, and sample size. Use the t.test function for raw data input.
ci.mean.ps(alpha, m1, m2, sd1, sd2, cor, n)
alpha |
alpha level for 1-alpha confidence |
m1 |
estimated mean for measurement 1 |
m2 |
estimated mean for measurement 2 |
sd1 |
estimated standard deviation for measurement 1 |
sd2 |
estimated standard deviation for measurement 2 |
cor |
estimated correlation between measurements |
n |
sample size |
Returns a 1-row matrix. The columns are:
Estimate - estimated mean difference
SE - standard error
t - t test statistic
df - degrees of freedom
p - p-value
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
ci.mean.ps(.05, 58.2, 51.4, 7.43, 8.92, .537, 30)
# Should return:
# Estimate SE t df p LL UL
# 6.8 1.455922 4.670578 29 6.33208e-05 3.822304 9.777696
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.