Learn R Programming

pcaL1 (version 1.5.7)

weightedL1Distance: Weighted L1 Distance

Description

Provides the (weighted) L1-norm distances and total distance of points to a subspace.

Usage

weightedL1Distance(X, loadings, weights)

Value

'weightedL1Distance' returns a list containing the following components:

wDistances

list of weighted distances

totalDistance

total distance

Arguments

X

data, in matrix or table form

loadings

an orthonormal matrix of loadings vectors

weights

a list of weights for loadings vectors

Details

The reconstructions are calculated by solving a linear program. Then the weights are applied to the distances.