Description Usage Arguments Value References Examples

View source: R/dissimilarity.R

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

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

`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. |

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

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.

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")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.