\begin{Schunk}
\begin{Sinput}
 ## Run 1000 t tests in each condition to see how often the null is
 ## rejected
 set.seed(123)
 out <- apply(conds, MARGIN = 1,
               FUN = function(x) do.call(runCond, as.list(x)))
 out <- do.call(rbind, out)
 head(out)
\end{Sinput}
\begin{Soutput}
  first momIQ dadIQ  N   R
1 FALSE  TRUE  TRUE 20 0.3
2 FALSE  TRUE FALSE 20 0.3
3 FALSE  TRUE  TRUE 20 0.3
4 FALSE FALSE  TRUE 20 0.3
5 FALSE  TRUE  TRUE 20 0.3
6 FALSE  TRUE  TRUE 20 0.3
\end{Soutput}
\begin{Sinput}
 ## TRUE == 1 and FALSE == 0, so the mean of each outcome is the
 ## proportion of samples for which the null was rejected (in each
 ## condition).
 rates <- aggregate(cbind(first, momIQ, dadIQ) ~ N, data = out, mean)
 rates
\end{Sinput}
\begin{Soutput}
     N first momIQ dadIQ
1   20 0.149 0.805 0.825
2   30 0.281 0.963 0.959
3   40 0.375 0.994 0.989
4   50 0.448 0.997 0.996
5   60 0.529 1.000 1.000
6   70 0.581 1.000 1.000
7   80 0.656 1.000 1.000
8   90 0.723 1.000 1.000
9  100 0.762 1.000 1.000
10 110 0.813 1.000 1.000
11 120 0.835 1.000 1.000
12 130 0.842 1.000 1.000
13 140 0.886 1.000 1.000
14 150 0.913 1.000 1.000
\end{Soutput}
\end{Schunk}
