searchLinesAtGivenSlope: Search Points Forming Lines At Given Slope
Description
searchLinesAtGivenSlope searchs among set of points (2-dim) those forming line(s) with user-defined slope ('coeff'),
ie search optimal (slope-) offset parameter(s) for (regression) line(s) with given slope ('coef').
Note: larger data-sets : segment residuals to 'coeff' & select most homogenous
This functions returns a matrix of line-characteristics (or if indexPoints is TRUE then list (line-characteristics & index & lm-results)
Arguments
dat
matrix or data.frame, main input
coeff
(numeric) slope to consider
filtExtr
(integer) lower & upper quantile values, remove points with extreme deviation to offset=0, (if single value: everything up to or after will be used)
minMaxDistThr
(logical) optional minumum and maximum distance threshold
lmCompare
(logical) add'l fitting of linear regression to best results, return offset AND slope based on lm fit
indexPoints
(logical) return results as list with element 'index' specifying retained points
displHist
(logical) display histogram of residues
displScat
(logical) display (simple) scatter plot
bestCluByDistRat
(logical) initial selection of decent clusters based on ratio overallDist/averNeighbDist (or by CV & cor)
neighbDiLim
(numeric) additional threshold for (trimmed mean) neighbour-distance
silent
(logical) suppress messages
debug
(logical) for bug-tracking: more/enhanced messages
callFrom
(character) allow easier tracking of messages produced
Details
Note: The package MASS is required when using as lmCompare=TRUE.
For larger data the function will try using the package NbClust (available from CRAN) if installed.