From ca8cf3e76327338a3b7747b4675ba515eb673d3a Mon Sep 17 00:00:00 2001
From: Matthew Lisiecki The code for this simulation and others is available here. Simulation is a far more flexible, and far
more intuitive way to think about power analysis. Even the smallest
tweaks to an experimental design are difficult to capture in a formula
@@ -778,11 +778,12 @@ 6 How to Use Simulation to Estimate Power
powers[j] <- mean(significant.experiments) # store average success rate (power) for each N
}
powers
-
+## [1] 0.258 0.382 0.380 0.474 0.502 0.630 0.640 0.616 0.708 0.794 0.794 0.844
-## [13] 0.856 0.834 0.872 0.924 0.942 0.970 0.960 0.966 0.958 0.966 0.980 0.982
-## [25] 0.980 0.990 0.990 0.986 0.992 0.994 0.990 1.000 0.994 0.992 1.000 0.998
-## [37] 0.996 0.996 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000
## [1] 0.210 0.296 0.444 0.462 0.550 0.594 0.680 0.666 0.728 0.786 0.788 0.800
+## [13] 0.862 0.900 0.878 0.900 0.926 0.946 0.948 0.950 0.946 0.992 0.966 0.986
+## [25] 0.980 0.988 0.990 0.988 0.990 0.996 0.992 0.998 0.994 0.998 0.996 1.000
+## [37] 0.998 0.998 1.000 1.000 1.000 1.000 1.000 0.998 1.000 1.000 1.000 1.000
9 How to Think About Power for Clustered Designs
clusters with 10 subjects in each than 10 clusters with 100 subjects in
each.
Again, a more flexible approach to power analysis when dealing with -clusters is simulation. See the (Declare Design library for block and -cluster randomized experiments)[https://declaredesign.org/r/designlibrary/reference/block_cluster_two_arm_designer.html] -for some starter code. The (DeclareDesign)[https://declaredesign.org] software aims to make -simulations for power analysis (among many other tasks) easier. See also -Gelman/Hill page 450-453 for another simulation approach.
+clusters is simulation. See the Declare +Design library for block and cluster randomized experiments for some +starter code. The DeclareDesign +software aims to make simulations for power analysis (among many other +tasks) easier. See also Gelman/Hill page 450-453 for another simulation +approach.