Returns the expected simulation error for a study design. Indicates how many simulation that are needed for a desired precision in the empirical power estimates.
get_monte_carlo_se(object, nsim, power, ...)# S3 method for plcp_power_3lvl
get_monte_carlo_se(object, nsim, ...)
# S3 method for plcp_power_2lvl
get_monte_carlo_se(object, nsim, ...)
An object created by get_power
A numeric
indicating the number of simulations
Optional. A numeric
indicating the empirical power.
Currently not used.
Used when object
is NULL
.
A data.frame
with the estimated power, expected standard error
of the simulated power estimate, and the 95 % CI of the estimate.
# NOT RUN {
paras <- study_parameters(n1 = 11,
n2 = 10,
n3 = 6,
T_end = 10,
icc_pre_subject = 0.5,
icc_pre_cluster = 0,
var_ratio = 0.03,
icc_slope = 0.05,
cohend = -0.8)
x <- get_power(paras)
get_monte_carlo_se(x, nsim = 1000)
# Without an object
get_monte_carlo_se(power = 0.8, nsim = 1000)
# }
Run the code above in your browser using DataLab