Home

Menu

Loading wiki pages...

View
Wiki Version:
<p>The following files are included:</p> <ul> <li><code>volume_SDT.R</code>: Calculate the volume of the polytopes representing the Block-Marschak inequalities. Also contains the code for the creating the matrix representing the Block-Marschak inequalities for the Swets (1959) data in which 5-AFC and 7-AFC are missing.</li> <li><code>statpower.R</code>: Calculate power of test for Block-Marschack inequalities with and without the monotonic-likelihood constraints.</li> <li><code>independence.R</code>: Calculate power for the multiplicative inequalities.</li> <li><code>swets_analysis.R</code>: Reanalysis of Swets (1959) data. Create corresponding figure.</li> <li><code>fig_rank_ROC_reanalysis.R</code>: yes-no ROC reconstruction using ranking and "answer-until-correct" data from Kellen and Klauer (2014), McAdoo and Gronlund (2016), and Chechile et al. (2012).</li> <li><code>analysis_exp1.R</code> to <code>analysis_exp4.R</code>: Analysis of the experiments 1 to 4. Requires the data in folder <code>data</code>. </li> <li><code>vertex_representations.pdf</code>: Contains the vertex representations of the Block-Marschak inequalities (as applied to $m$-AFC recognition) and the Block-Marschak inequalities together with monotonic likelihood.</li> <li><code>example_violations_BMI.R</code>: Contains the code that produces the two example sets of choice probabilities that violate the BMIs given in section "The Testability of the Block-Marschak Inequalities in Recognition Memory".</li> <li><code>asymmetry_examples.R</code>: Code that produces predictions for the Gaussian and double-exponential model in $m$-AFC and $m^*$-AFC task reported in section "Step 4: ROC Symmetry".</li> </ul> <p>To run the code, <code>R</code> is required with the following packages: - <a href="https://github.com/fnoorian/quadprogpp" rel="nofollow"><code>quadprogpp</code></a>: For fitting the Block-Marschack and the other inequalities, we need a function that solves quadratic equations with inequality constraints. <code>R</code> offers several such packages, see section 'Quadratic Optimization' on: <a href="https://cran.r-project.org/view=Optimization" rel="nofollow">https://cran.r-project.org/view=Optimization</a><br> Initially, we used the most popular package, <a href="https://cran.r-project.org/package=quadprog" rel="nofollow"><code>quadprog</code></a> for this purpose. However, in some cases the function got stuck. Consequently, we tried other packages. For example, we observed good, albeit slow, results with <a href="https://cran.r-project.org/package=Dykstra" rel="nofollow"><code>Dykstra</code></a>. So all results reported here should replicate with <code>Dykstra</code> as well. We finally settled on <code>quadprogpp</code> which is a new and fast implementation of <code>quadprog</code>, which currently is only available from <a href="https://github.com/fnoorian/quadprogpp" rel="nofollow">github</a>. It requires a C++ compiler (e.g., Rtools on Windows or Xtools on Mac) and can then be installed via <code>devtools</code>. The <code>tar.gz</code> of <code>quadprogpp</code> which we used can be found in folder <code>packages</code> - <a href="https://cran.r-project.org/package=tidyverse" rel="nofollow"><code>tidyverse</code></a>: Needed for the analysis of the experiments. - <a href="https://cran.r-project.org/package=jsonlite" rel="nofollow"><code>jsonlite</code></a>: For loading in the data of the experiments. - <a href="https://cran.r-project.org/package=MPTinR" rel="nofollow"><code>MPTinR</code></a>: For analysis of experiments 3 and 4.</p> <p>We have successfully executed the code with the following setup:</p> <pre class="highlight"><code>R version 3.5.1 (2018-07-02) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Linux Mint 19 Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1 locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 [4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=de_CH.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=de_CH.UTF-8 LC_NAME=C LC_ADDRESS=C [10] LC_TELEPHONE=C LC_MEASUREMENT=de_CH.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] bindrcpp_0.2.2 MPTinR_1.11.0 quadprogpp_1.1-0 Rcpp_0.12.18 [5] jsonlite_1.5 forcats_0.3.0 stringr_1.3.1 dplyr_0.7.6 [9] purrr_0.2.5 readr_1.1.1 tidyr_0.8.1 tibble_1.4.2 [13] ggplot2_3.0.0 tidyverse_1.2.1 loaded via a namespace (and not attached): [1] cellranger_1.1.0 pillar_1.3.0 compiler_3.5.1 plyr_1.8.4 [5] bindr_0.1.1 prettyunits_1.0.2 progress_1.2.0 tools_3.5.1 [9] lubridate_1.7.4 nlme_3.1-137 gtable_0.2.0 lattice_0.20-35 [13] pkgconfig_2.0.2 rlang_0.2.2 cli_1.0.0.9002 rstudioapi_0.7 [17] yaml_2.2.0 haven_1.1.2 withr_2.1.2 xml2_1.2.0 [21] httr_1.3.1 hms_0.4.2 grid_3.5.1 tidyselect_0.2.4 [25] glue_1.3.0 R6_2.2.2 fansi_0.3.0 readxl_1.1.0 [29] selectr_0.4-1 modelr_0.1.2 magrittr_1.5 backports_1.1.2 [33] scales_1.0.0 rvest_0.3.2 assertthat_0.2.0 colorspace_1.3-2 [37] numDeriv_2016.8-1 Brobdingnag_1.2-6 utf8_1.1.4 stringi_1.2.4 [41] lazyeval_0.2.1 munsell_0.5.0 broom_0.5.0 crayon_1.3.4</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.