# NOT RUN {
n = 102
m = 227868
# calculate power
power = powerLME(
slope = 0.6,
n = n,
m = m,
sigma.y = 0.29,
sigma.x = 0.308,
power = NULL,
rho = 0.8,
FWER = 0.05,
nTests = 1e+6)
print(power)
# calculate sample size (total number of subjects)
n = powerLME(
slope = 0.6,
n = NULL,
m = m,
sigma.y = 0.29,
sigma.x = 0.308,
power = 0.9562555,
rho = 0.8,
FWER = 0.05,
nTests = 1e+6)
print(n)
# calculate slope
slope = powerLME(
slope = NULL,
n = n,
m = m,
sigma.y = 0.29,
sigma.x = 0.308,
power = 0.9562555,
rho = 0.8,
FWER = 0.05,
nTests = 1e+6)
print(slope)
# }
Run the code above in your browser using DataLab