Home

Menu

Loading wiki pages...

View
Wiki Version:
<p>The code to run the analyses in this article can be found on the linked gitlab repository, <a href="https://gitlab.com/psadil/sadilcowellhube-r2019" rel="nofollow">sadilcowellhuber2019</a>. That defines a set of <code>R</code> functions, as well as the main Stan files (in <em>src</em>). </p> <p>The package can be built with Rstudio, compiling the Stan models for future use.</p> <p>Note that the analyses themselves relied heavily on the <a href="https://mghpcc.umass.edu" rel="nofollow">MGHPCC</a>. Without access to a cluster, most analyses would take prohibitively long. Instead, the results are stored as <a href="https://ropensci.github.io/drake/" rel="nofollow">drake</a> caches. These caches are stored in the linked box component of this osf project.</p> <p>So, to access the code</p> <p>1) Download a copy of the gitlab repository 2) Build the package (e.g., using Rstudio) 3) Download the caches. - Note that the caches are gzipped, and the larger ones are additionally split into multiple files (those ending with part-##). To access recombine the split files, use a command like the following to reproduce the single compressed archive. </p> <pre class="highlight"><code> `cat cache_fig-recovery-cor* &gt; cache_fig-recovery-cor.tar.gz` - All compressed archives be unpacked with a command like `tar -xvf cache_fig-recovery-cor.tar.gz`</code></pre> <p>4) At this point, move the uncompressed caches into the folder 'data-raw/caches.' 5) Now figures from the article can be recreated by running the scripts in the 'data-raw' folder. For example, sourcing figure4.R will reproduce Figure 4 from the manuscript. 6) These caches also store a record of the function calls that were used to generate the cached results. To see those functions, a command like the following can be called</p> <pre class="highlight"><code>`drake::read_drake_plan(cache=drake::this_cache(file.path('data-raw','caches','cache_fig-recovery-cor')))` where, as above, the `cache_fig-recovery-cor` part should be replaced with whichever plan you're looking for.</code></pre>
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.