Codes for Asymptotics and Robustness Paper are in the Robustness Paper Folder
Other codes are depreciated! Simply install the R package via the line: install_github('12ramsake/DurocherProjectionMedian') and use the dpm function to compute the projection median.
Compute the Projection Median in any Dimension
For 2 Dimensions run 2 Dimensions script.
For 3 Dimensions:
- Download all the c++ files (including the headers (.cpp and .h) into your working directoty in R
- Source the calcMedLevel.cpp file in R with rcpp
- Run the projection median 3d script and use the projectionMedian3D() function to calculate the projection median of your data
For the approximation in d use the Monte Carlo file and source the script All functions take an nxd matrix
To run the large sample test example, run the prostate example script after downloading prostmat and placing it into your R working directory