Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Dec 13, 2024
1 parent 1961aec commit 0e2b4cb
Show file tree
Hide file tree
Showing 17 changed files with 764 additions and 1,576 deletions.
4 changes: 2 additions & 2 deletions html/02-TypeI_and_Power_simulation.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions html/03-Parameter_recovery_simulation.html

Large diffs are not rendered by default.

20 changes: 7 additions & 13 deletions html/04-Auxillary_parameter_recovery.html
Original file line number Diff line number Diff line change
Expand Up @@ -456,32 +456,26 @@ <h3>Run the simulation</h3>
<pre class="r"><code>res &lt;- runSimulation(Design, replications = 5, parallel = FALSE, packages = &#39;mirt&#39;,
generate=Generate, analyse=Analyse, summarise=Summarise)</code></pre>
<pre><code>##
##
Design: 1/6; RAM Used: 190 Mb; Replications: 5; Total Time: 0.00s
## Design: 1/6; Replications: 5; RAM Used: 192.2 Mb; Total Time: 0.00s
## Conditions: test_length=10, distribution=normal
##
##
Design: 2/6; RAM Used: 196.4 Mb; Replications: 5; Total Time: 3.64s
## Design: 2/6; Replications: 5; RAM Used: 198.8 Mb; Total Time: 3.63s
## Conditions: test_length=20, distribution=normal
##
##
Design: 3/6; RAM Used: 196.5 Mb; Replications: 5; Total Time: 8.86s
## Design: 3/6; Replications: 5; RAM Used: 198.9 Mb; Total Time: 8.97s
## Conditions: test_length=30, distribution=normal
##
##
Design: 4/6; RAM Used: 196.5 Mb; Replications: 5; Total Time: 14.89s
## Design: 4/6; Replications: 5; RAM Used: 199 Mb; Total Time: 15.47s
## Conditions: test_length=10, distribution=bimodal
##
##
Design: 5/6; RAM Used: 196.6 Mb; Replications: 5; Total Time: 17.97s
## Design: 5/6; Replications: 5; RAM Used: 199 Mb; Total Time: 18.63s
## Conditions: test_length=20, distribution=bimodal
##
##
Design: 6/6; RAM Used: 196.7 Mb; Replications: 5; Total Time: 23.18s
## Design: 6/6; Replications: 5; RAM Used: 199.1 Mb; Total Time: 24.24s
## Conditions: test_length=30, distribution=bimodal
## </code></pre>
<pre><code>##
## Simulation complete. Total execution time: 29.49s</code></pre>
## Simulation complete. Total execution time: 31.09s</code></pre>
<pre class="r"><code>res</code></pre>
<pre><code>## # A tibble: 6 × 15
## test_length distribution bias_EAP bias_MAP bias_ML bias_EAP_bimodal
Expand Down
192 changes: 93 additions & 99 deletions html/06-Build_a_power-curve.html

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions html/07-Coverage.html
Original file line number Diff line number Diff line change
Expand Up @@ -412,15 +412,15 @@ <h3>Define the functions</h3>
<pre><code>## # A tibble: 9 × 8
## mu sample_size t_CI z_CI REPLICATIONS SIM_TIME SEED COMPLETED
## &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;dbl&gt; &lt;chr&gt; &lt;int&gt; &lt;chr&gt;
## 1 0 10 0.9531 0.9221 10000 0.65s 488349520 Thu Aug 1 1
## 2 5 10 0.9466 0.9169 10000 0.45s 469344150 Thu Aug 1 1
## 3 10 10 0.9503 0.9173 10000 0.52s 1550099436 Thu Aug 1 1
## 4 0 20 0.9481 0.9325 10000 0.44s 40778633 Thu Aug 1 1
## 5 5 20 0.9527 0.9373 10000 0.48s 713327526 Thu Aug 1 1
## 6 10 20 0.9523 0.9375 10000 0.46s 831490948 Thu Aug 1 1
## 7 0 30 0.9494 0.9408 10000 0.45s 1214377063 Thu Aug 1 1
## 8 5 30 0.9476 0.9381 10000 0.44s 1255528026 Thu Aug 1 1
## 9 10 30 0.9488 0.9392 10000 0.39s 1229276239 Thu Aug 1 1…</code></pre>
## 1 0 10 0.9531 0.9221 10000 0.52s 488349520 Thu Dec 12 2
## 2 5 10 0.9466 0.9169 10000 0.48s 469344150 Thu Dec 12 2
## 3 10 10 0.9503 0.9173 10000 0.53s 1550099436 Thu Dec 12 2
## 4 0 20 0.9481 0.9325 10000 0.41s 40778633 Thu Dec 12 2
## 5 5 20 0.9527 0.9373 10000 0.46s 713327526 Thu Dec 12 2
## 6 10 20 0.9523 0.9375 10000 0.36s 831490948 Thu Dec 12 2
## 7 0 30 0.9494 0.9408 10000 0.40s 1214377063 Thu Dec 12 2
## 8 5 30 0.9476 0.9381 10000 0.43s 1255528026 Thu Dec 12 2
## 9 10 30 0.9488 0.9392 10000 0.40s 1229276239 Thu Dec 12 2…</code></pre>
<p>From these results it’s clear to see that the t-distribution gives very good coverage rates across all conditions. However, the z-distribution CI is too liberal in the smaller sample sizes, and gives an interval that does not contain the population mean as often as desired. Around a sample size of 30 we can see that the two distributions behave reasonably well.</p>
<p>Note that the <code>ECR()</code> function was used within the <code>Analyse()</code> function rather than in <code>Summarise()</code>. When only the three values are supplied (CIs + population value) then <code>ECR()</code> will return either a 1 if the population value was within the CI or 0 if it was not. Hence, in the <code>Summarise()</code> function all that is required to obtain the coverage estimate is to find the mean of these 1’s and 0’s. The next section demonstrates how to use <code>ECR()</code> in the <code>Summarise()</code> instead, and it’s really a matter of preference which style you prefer.</p>
</div>
Expand Down
Loading

0 comments on commit 0e2b4cb

Please sign in to comment.