ijmatrix.create(rawdataset, submarkets, suppliers, ..., remNA = TRUE,
remSing = FALSE, remSing.val = 1, remSingSupp.val = 1,
correctVar = FALSE, correctVar.val = 1)data.frame containing the raw data
NA values of the submarkets and suppliers are removed or not (default: remNA = TRUE, otherwise: remNA = FALSE, which means that NA are considered in the interaction matrix, recoded as factor 99999)
remSing = FALSE)
remSing = TRUE: numeric value that indicates the limit value of singular instances in the submarket set to be removed from the data
remSing = TRUE: numeric value that indicates the limit value of singular instances in the supplier set to be removed from the data
correctVar = FALSE)
correctVar = TRUE: numeric value which is added to the absolute values before calculating market shares (default: 1)
data.frame containing the $i$ x $j$ combinations ('interaction'), the submarkets (column is named as in raw data), the suppliers (column is named as in raw data), the observed absolute frequencies of every $j$ in every $i$ ('freq_ij_abs'), the observed absolute frequencies in every $i$ ('freq_i_total') and the observed market shares of every $j$ in every $i$ ('p_ij_obs'). If additional variables are stated (e.g. expenditures) which shall be turned into (local) market shares, the output interaction matrix contains absolute values for every interaction, total values for every $i$ submarket and market shares ($p_{ij}$) for these variables, too, which are automatically named based on the given variable name (e.g. the market shares based on a raw data variable called expen is named p_ij_obs_expen). The first three variables of the output matrix are factors, the calculated values are numeric.
NA) are removed from the data automatically (unless remNA = FALSE). Optionally, singular instances (e.g. some submarkets or suppliers are only represented once or twice in the whole dataset) can also be removed (remSing = TRUE), where the limit values for extraction can be set by remSing.val and remSingSupp.val (e.g. remSing.val = 2 and remSingSupp.val = 1 removes every submarket from the interaction matrix which was observed $\le 2$ and every supplier observed $\le 1$).
Huff, D. L./McCallum, D. (2008): Calibrating the Huff Model Using ArcGIS Business Analyst. ESRI White Paper, September 2008. https://www.esri.com/library/whitepapers/pdfs/calibrating-huff-model.pdf
Wieland, T. (2015): Raeumliches Einkaufsverhalten und Standortpolitik im Einzelhandel unter Beruecksichtigung von Agglomerationseffekten. Theoretische Erklaerungsansaetze, modellanalytische Zugaenge und eine empirisch-oekonometrische Marktgebietsanalyse anhand eines Fallbeispiels aus dem laendlichen Raum Ostwestfalens/Suedniedersachsens. Geographische Handelsforschung, 23. 289 pages. Mannheim : MetaGIS.
ijmatrix.shares, ijmatrix.crosstab
data(grocery1)
# Loads the data
ijmatrix.create (grocery1, "plz_submarket", "store_code")
# Creates an interaction matrix with local market shares based on frequencies
mynewmcidata <- ijmatrix.create (grocery1, "plz_submarket", "store_code")
# Save results directly in a new dataset
ijmatrix.create (grocery1, "plz_submarket", "store_code", "trip_expen")
# Creates an interaction matrix with local market shares based on frequencies
# and expenditures (Variable "trip_expen")
Run the code above in your browser using DataLab