From ca8cf3e76327338a3b7747b4675ba515eb673d3a Mon Sep 17 00:00:00 2001 From: Matthew Lisiecki Date: Thu, 6 Apr 2023 13:38:17 -0400 Subject: [PATCH] fix links --- power/power.Rmd | 4 ++-- power/power.html | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/power/power.Rmd b/power/power.Rmd index f805fce..aed3359 100644 --- a/power/power.Rmd +++ b/power/power.Rmd @@ -186,8 +186,8 @@ Where clustering really causes trouble is when there is a strong relationship be There are formulas that can help you understand the consequences of clustering — see Gelman/Hill page 447-449 for an extended discussion. While these formulas can be useful, they can also be quite cumbersome to work with. The core insight however is a simple one: you generally get more power from increasing the number of clusters than you do from increasing the number of subjects within clusters. Better to have 100 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 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. 10 Good Power Analysis Makes Preregistration Easy diff --git a/power/power.html b/power/power.html index 2d4a79f..bceeab3 100644 --- a/power/power.html +++ b/power/power.html @@ -615,10 +615,10 @@

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

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 @@

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.

10 Good Power Analysis Makes Preregistration Easy