
****************************************************** REPRODUCIBLE FILES TO THE PAPER *******************************************************

"Random Forests for Ordinal Response Data: Prediction and Variable Selection" (2014)



by S. Janitza*, G. Tutz and A.-L. Boulesteix






**********************************************************************************************************************************************

* Corresponding author: Silke Janitza
 <janitza@ibe.med.uni-muenchen.de>

R version 3.0.1 was used for all analyses.






********* CONTENTS *********


  
  * folder 'Simulations':            contains all R-code for reproducing results based on simulated data 
                                     in addition: contains all Figures presented in the paper and additional figures not presented and relevant R objects

  * folder 'Real_Data_Applications': contains all R-code for reproducing results based on real data 
                                     in addition: contains all Figures presented in the paper and relevant R objects

  * R file 'novel_VIMs.R':           code that implements our novel variable importance measures








********* INSTRUCTIONS *********






REQUIRED R PACKAGES
-------------------

     * party (version 1.0-6)
 
    * snowfall (version 1.84-4) 
   

  * mvtnorm (version 0.9-9994) 
   

  * ROCR (version 1.0-5) 


   

  (* TH.data (version 1.0-3); this package is only required for retrieving the Mammography Experience Data) 



SIMULATION STUDIES
------------------



  * go into the folder 'Simulation_Studies'.

  * for reproducing the results presented in Figures 2-5 first run the file 'main_program.R' (for creating the relevant R objects) and afterward the files
    'Figure_2.R', ..., 'Figure_5.R' etc. (for plotting). 

  * for reproducing the results presented in Figure 6 first run the file 'main_program_tree_fraction.R' (for creating the relevant R objects) and afterward the files
    'Figure_6.R' (for plotting). 

  * if you only want to reproduce the figures but not the R objects that are required for the figures directly run the file 'Figure_X.R'.
    The files 'Figure_X.R' can also be run without running a file before since relevant R objects are already provided in the folder 'R_Objects' and are loaded in the
    working directory for plotting results.



REAL DATA STUDIES
------------------


  * go into the folder 'Real_Data_Applications'.

  * for reproducing the results presented in Figures 7 and 8 the R files 
    'very_low_birth_weight.R', 'wine_quality.R', 'nhanes.R', 'support_study.R', 'mammography_experience.R' to create relevant R objects that are stored in folder 'R_Objects';
    afterward run the file 'Figure_7.R' (or 'Figure_8.R') to produce the figure.

  * if you only want to reproduce the figures but not the R objects that are required for the figures directly run the file 'Figure_X.R'. These files load R objects that are 
    stored in the folder 'R_Objects'.


  Very Low Birth Weight Data
  --------------------------

  * the Very Low Birth Weight Data should be retrieved from the website http://biostat.mc.vanderbilt.edu/wiki/Main/DataSets before running the codes.
  * run the file 'very_low_birthweight.R' to produce relevant R objects.


  Wine Quality Data
  ------------------

  * the (white!) Wine Quality Data should be retrieved from the website http://archive.ics.uci.edu/ml/datasets/Wine+Quality before running the codes.
  * run the file 'wine_quality.R' to produce relevant R objects.


  NHANES Data
  -----------

  * the NHANES Data can be obtained from the website http://www.cdc.gov/nchs/nhanes/nhanes2007-2008/generaldoc_e.htm before running the codes.
  * run the file 'nhanes.R' to produce relevant R objects.


  SUPPORT Study
  -------------

  * the SUPPORT Study data should be retrieved from the website http://biostat.mc.vanderbilt.edu/wiki/Main/DataSets before running the codes.
  * run the file 'support_study.R' to produce relevant R objects.


  Mammography Experience Data
  ---------------------------

  * the Mammography Experience Data can be retrieved from the R package 'TH.data'. Please make sure that this R package is installed before running the codes.
  * run the file 'mammography_experience.R' to produce relevant R objects.




