aggSimilarity: Aggregate similarity

Description Usage Arguments Details Value See Also

View source: R/similarity.R

Description

aggSimilarity computes aggregate similarity

Usage

1
2
aggSimilarity(porftolios, simM = NULL, weights = NULL, rw = NULL,
  arc = FALSE)

Arguments

simM

an optional (n x n) similarity matrix

weights

a (n x n) matrix of weights for weghting matrix to an average

rw

(1 x k) vector of weights on sectors

arc

logical; should the cosine similarities be transformed to radians (by arccos) first?

portfolios

a (n x k) matrix of portfolios where rows represent n subjects and columns their portfolios

Details

Using arc=TRUE returns (weighted) mean of 1-(2*arccos(cos(similarity))/pi)

Value

A numeric scalar value of (weighted) mean of the upper traingle of similarity matrix is returned.

See Also

aggSimilarity_time


vh-d/RPortfolioSimilarity documentation built on Oct. 17, 2019, 3:11 a.m.