# mixScaleDissimilarity: Computes mix, scale and absolute dissimilarity measures In IndexNumR: Index Number Calculation

## Description

This is a function to compute the Fox, Hill and Diewert 2004 dissimilarity measures.

## Usage

 ```1 2 3 4 5 6 7 8 9``` ```mixScaleDissimilarity( x, pvar, qvar, prodID, pervar, measure = "absolute", combine = "geomean" ) ```

## Arguments

 `x` A dataframe `pvar` string identifying the price variable in x `qvar` string identifying the quantity variable in x `prodID` string identifying the product id variable in x `pervar` string identifying the time period variable in x `measure` choice of dissimilarity measure. Valid options are mix, scale or absolute. `combine` specifies how to combine the price and quantity vectors. "stack" stacks the price and quantity vectors, "geomean" computes separate dissimilarity measures for prices and quantities then takes the geometric mean of these.

## Value

A matrix where the first two columns are the possible combinations of periods and the third column is the dissimilarity measure.

## References

Fox, K.J., R.J. Hill and W.E. Diewert (2004), "Identifying outliers in multi-output models", Journal of Productivity Analysis, 22, 73-94, 2004.

## Examples

 ```1 2 3 4 5 6``` ```# estimate the dissimilarity between periods in the CES_sigma_2 dataset # using the absolute measure of dissimilarity and the geometric mean # to combine price and quantity information. mixScaleDissimilarity(CES_sigma_2, pvar = "prices", qvar = "quantities", pervar = "time", prodID = "prodID", measure = "absolute", combine = "geomean") ```

IndexNumR documentation built on Feb. 7, 2022, 5:09 p.m.