===================== INSTRUCTIONS ============================== This document contains brief instructions for installing and using the CEMCtp package for R. 1. Install For Linux users, download the compiled R package file: CEMCtp_1.0.tar.gz Then use the following function in R to install the package >install.packages(pkgs=filename,repos=NULL) where "filename" should be replaced with the corresponding file name (CEMCtp_1.0.tar.gz) with the correct path. Alternatively, at the Linux command line, you may type "R CMD INSTALL PACKAGE_DIRECTORY/CEMC_1.0.tar.gz" where PACKAGE_DIRECTORY is the folder containing CEMCtp_1.0.tar.gz. 2. Usage #Load the packages into R >library(CEMCtp) #Read the details about the package >?CEMCtp 3. Example (make sure to set the working directory of R to be where the downloaded ex.RData resides) > library(CEMCtp) > library(MASS) > load("ex.RData") > Output<-CEMCtp(ex,K=50,N=100) > Output $CEMCtp.Pvalue [1] 0 $Positive.Samples V20 V21 V22 V23 V24 V25 V26 V27 V28 V29 V30 V31 V32 3 9 17 4 5 6 8 12 13 2 7 1 10 $Negative.Samples NULL $CEMCts.Pvalue [1] 0 Note: In this toy example, the first 10 data points were simulated from a bivariate normal distribution with correlation 0.8 while the last 10 were simulated with no correlation. As can be seen from the output, all 10 of the correlated data points are correctly selected as positively associated, with the subsample also containing 3 of the last 10 data points. When you try this example, your result will be somewhat different due to different random seeds and the fact that the number of permutated samples (K) and number of samples per Monte Carlo iterations (N) are set to be smaller than the default for demonstration purpose. 4. References Lin, S., Ding, J. (2009) Integration of Ranked Lists via Cross Entropy Monte Carlo with Applications to mRNA and microRNA Studies. Biometrics, 65, 9-18. DOI: 10.1111/j.1541-0420.2008.01044.x. Zhang, F., Ding, J., Lin, S. Testing for Associations of Opposite Directionality in a Heterogeneous Population. Manuscript.