nbpMatching-package {nbpMatching} | R Documentation |
This package will take an input distance matrix and generate the set of pairwise matches that minimizes the sum of distances between the pairs by running nonbimatch.
Bo Lu, Robert Greevy, Cole Beck
Maintainer: Cole Beck cole.beck@vanderbilt.edu
Lu, Greevy, Xu, and Beck. Optimal Nonbipartite Matching and its Statistical Applications. (under review)
plainmatrix<-as.matrix(dist(sample(1:25, 8, replace=TRUE))) diag(plainmatrix) <- 99999 # setting diagonal to an infinite distance for # pedagogical reasons (the diagonal may be left # as zero) mdm<-distancematrix(plainmatrix) res<-nonbimatch(mdm) ## Not run: try a large matrix nonbimatch(distancematrix(as.matrix(dist(sample(1:10^8, 5000, replace=TRUE))))) ## End(Not run)