1
$\begingroup$

I am trying to use coefficients of variations ($CV$) to calculate sample size necessary to detect a difference of means ($\mu_0$ vs. $\mu_1$) for a variable that takes on values $x_i \in [0,1]$. I have test-retest data available for $x$ . I am getting differences in sample size calculations for the variable $x$ and $1-x$. I am using the formulas: $$N = \frac{16{CV}^2}{\ln(\mu_0/\mu_1)}$$ and $${CV}^2 = \frac{\sum_{i=1}^k (x_{2,i}-x_{1,i})^2}{2k\bar{x}^2},$$ where $k$ is the number of subjects and $\bar{x}$ is the average of all measurements of $x$ (the number of measurements is $2k$).

Working code in R:

set.seed(1)
var1.1 <- c(.1,.15,.2,.25,.3,.35)
var1.2 <- var1+runif(6)/10
var2.1 <- 1-var1.1
var2.2 <- 1-var1.2
var1.mean <- mean(c(var1.1,var1.2))
var2.mean <- mean(c(var2.1,var2.2))
CV1 <- sqrt(sum((var1.2-var1.1)^2)/12)/var1.mean
CV2 <- sqrt(sum((var2.2-var2.1)^2)/12)/var2.mean
effect_size <- .05
sample_size_var1 <- 16*(CV1^2)/log((var1.mean+effect_size)/var1.mean)^2
sample_size_var2 <- 16*(CV2^2)/log((var2.mean+effect_size)/var2.mean)^2

The result is: $N = 14$ for variable $x$ and $N = 13$ for $1-x$. Clearly, however, the $t$ tests would give the same results for both. How should I proceed in determining the sample size necessary for determining a significant difference in the means of $x$?


t test sample size calculations based on effect size and variance If I do sample size calculations for effect size $d = 1.17$ I get a sample size $N = 13$ for a two sample t test for both $x$ and $1-x$, with standard power and significance using the pwr R package. Does this mean sample size calculations obtained from $CV$ can be biased, and if so what should I look out for?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.