Supplemental R Scripts and output files for <i>Designing, understanding and modelling two-phase experiments with human subjects. Statistical Methods in Medical Research, 31(4), 626-645</i>.
<code>R</code> scripts and their pdf output files are provided for designing and analyzing the Farewell and Herzberg (2003) example of a human training experiment and for producing an alternative design that employs a row-column design for the second phase. (Also available with the peer-reviewed publication linked on the right.)<div><br></div><div>The following files are available here:</div><div><dl></dl></div><div> <dt></dt><dt> </dt><dt><code>FHdesign.r:</code></dt> <dd><code>R</code> script to produce and investigate the Farewell and Herzberg Plaid design (output in <code>FHdesign.pdf</code>).</dd><dt> </dt><dt><code>FHanal.r</code>:</dt> <dd><code>R</code> script to conduct a mixed-model analysis of the Farewell and Herzberg data (output in <code>FHanal.pdf</code>). This script requires the <code>R</code> data file <a href="https://doi.org/10.25909/13122095"><code>plaid.dat.rda</code></a> that contains the Farewell and Herzberg data in a suitable format and the file global.r that is sourced by FHanal.r and sets constants and functions used in the script.</dd><dt> </dt><dt></dt><dt><code>FHpower.r</code>:</dt><dd><code>R</code> script to do a power simulation for the Farewell and Herzberg design (output in <code>FHpower.pdf</code>). This script requires the <code>R</code> data file <a href="https://doi.org/10.25909/13122095"><code>plaid.dat.rda</code></a> that contains the Farewell and Herzberg design and the file <code>globalPower.r</code> that sets constants and functions used in the script.</dd><dt></dt><dt><code>globalPower.r</code>:</dt><dd><code>R</code> script to sets constants and functions. It is sourced by the scripts <code>FHpower.r</code> and <code>Altpower.r</code>.</dd><dt></dt><dt><code>AltRowColDesign.r</code>:</dt><dd><code>R</code> script to produce and investigate an alternative second-phase design employing a row-column design and groups of patients assigned to different raters (output in <code>AltRowColDesign.pdf</code>).</dd><div><dt><code>Altpower.r</code>:</dt><dd><code>R</code> script to do a power simulation for the row-column design (output in <code>Alt<code>power.pdf</code></code>). This script requires the <code>R</code> data file <code>AltRowColDesign.RData</code>, produce by <code>AltRowColDesign.r</code> and the file <code>globalPower.r</code> that sets constants and functions used in the script.</dd><div><br></div><dt></dt></div><dt></dt></div><div></div>