maximumSimilarityLinks: Finds periods to link using minimum dissimilarity.

View source: R/dissimilarity.R

maximumSimilarityLinksR Documentation

Finds periods to link using minimum dissimilarity.

Description

Function to compute the maximum similarity chain links from a measure of dissimilarity. The procedure works as described in Diewert and Fox (2017). It first links period 2 to period 1. Then for each period t, from periods 3,...,T it searches among the periods 1,...,t-1 for the period that is most similar (least dissimilar) to period t.

Usage

maximumSimilarityLinks(x)

Arguments

x

a matrix containing a dissimilarity measure where the first two columns are the indices and the third column is the dissimilarity measure.

Examples

# find the linking periods in the CES_sigma_2 dataset that maximise
# the similarity between periods, using the absolute dissimilarity measure.
disMat <- mixScaleDissimilarity(CES_sigma_2, pvar = "prices", qvar = "quantities",
pervar = "time", prodID = "prodID", measure = "absolute",
combine = "geomean")
maximumSimilarityLinks(disMat)

IndexNumR documentation built on Nov. 11, 2023, 1:07 a.m.