transform input vector to a quantile representation relative to a reference.

quantSquared(vecToBeTransformed, matrixReferenceDistribution)

Arguments

vecToBeTransformed

Input vector should have same entries as reference; should be a row of a data frame

matrixReferenceDistribution

data frame defining the reference data; ideally this will not contain missing data.

Value

the quantile transformed vector

Author

Avants BB

Examples

mydf = generateSubtyperData( 100 )
rbfnames = names(mydf)[grep("Random",names(mydf))]
zz=data.frame(t(colMeans(mydf[,rbfnames])))
newvec = quantSquared( zz, mydf )
newvec2 = quantSquared( mydf[1,rbfnames], mydf )