Compute confidence interval for a ratio of population means of ratio-scale measurements in a paired-samples design. Equality of variances is not assumed.
Arguments: - alpha: alpha level for 1-alpha confidence - y1: vector of scores for condition 1 - y2: vector of scores for condition 2
Values: - means, mean ratio, lower limit, upper limit
alpha= .05
y1 = c(3.3, 3.6, 3.0, 3.1, 3.9, 4.2, 3.5, 3.3)
y2 = c(3.0, 3.1, 2.7, 2.6, 3.2, 3.8, 3.2, 3.0)
ci.ratio.mean.ps.data(alpha, y1, y2)
## Mean1 Mean2 Mean1/Mean2 LL UL
## [1,] 3.4875 3.075 1.134146 1.09417 1.175583
Computes sample size required to estimate a ratio of population means with desired precision in a paired-samples design.
Arguments: - alpha: alpha level for 1-alpha confidence - var: planning value of measurement variance - m1: planning value of mean for measurement 1 - m2: planning value of mean for measurement 2 - cor: planning value for measurement correlation - r: desired upper to lower confidence interval endpoint ratio
Values: - required sample size
alpha = .05
var = 400
m1 = 150
m2 = 100
cor = .7
r = 1.2
size.ci.ratio.mean.ps(alpha, var, m1, m2, cor, r)
## [1] 21
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.