mci.transmat {MCI}R Documentation

Log-centering transformation of an MCI interaction matrix

Description

This function applies the log-centering transformation to the variables in a given MCI interaction matrix.

Usage

mci.transmat(mcidataset, submarkets, suppliers, mcivariable1, ..., show_proc = FALSE)

Arguments

mcidataset

an interaction matrix which is a data.frame containing the submarkets, suppliers and the regarded variables (e.g. the observed market shares, p_{ij}, and the explanatory variables)

submarkets

the column in the interaction matrix mcidataset containing the submarkets

suppliers

the column in the interaction matrix mcidataset containing the suppliers

mcivariable1

the column of the first variable to be transformed, numeric and positive (or dummy [1,0])

...

the columns of other variables to be transformed, numeric and positive (or dummy [1,0])

show_proc

logical argument that indicates if the function prints messages about the state of process during the work (e.g. “Processing variable xyz ...” or “Variable xyz is regarded as dummy variable”). Default: show_proc = FALSE (messages off)

Details

This function transformes the input dataset (MCI interaction matrix) to regression-ready data with the log-centering transformation by Nakanishi/Cooper (1974). The resulting data.frame can be fitted with the lm() function (to combine these two steps in one, use mci.fit()). The log-centering transformation can be regarded as the key concept of the MCI model because it enables the model to be estimated by OLS (ordinary least squares) regression. The function identifies dummy variables which are not transformed (because they do not have to be).

Value

Returns a new data.frame with regression-ready data where the input variables are transformed by the the log-centering transformation. The names of the input variables are passed to the new data.frame marked with a "_t" to indicate that they were transformed (e.g. "shares_t" is the transformation of "shares").

Author(s)

Thomas Wieland

References

Huff, D. L./Batsell, R. R. (1975): “Conceptual and Operational Problems with Market Share Models of Consumer Spatial Behavior”. In: Advances in Consumer Research, 2, p. 165-172.

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

Nakanishi, M./Cooper, L. G. (1974): “Parameter Estimation for a Multiplicative Competitive Interaction Model - Least Squares Approach”. In: Journal of Marketing Research, 11, 3, p. 303-311.

Wieland, T. (2013): “Einkaufsstaettenwahl, Einzelhandelscluster und raeumliche Versorgungsdisparitaeten - Modellierung von Marktgebieten im Einzelhandel unter Beruecksichtigung von Agglomerationseffekten”. In: Schrenk, M./Popovich, V./Zeile, P./Elisei, P. (eds.): REAL CORP 2013. Planning Times. Proceedings of 18th International Conference on Urban Planning, Regional Development and Information Society. Schwechat. p. 275-284. http://www.corp.at/archive/CORP2013_98.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.

See Also

mci.fit, mci.transvar

Examples

# MCI analysis for the grocery store market areas in grocery2 #
data(grocery2)
# Loads the data
mci.transmat (grocery2, "plz_submarket", "store_code", "p_ij_obs", "dist_km", "salesarea_qm")
# Applies the log-centering transformation to the dataset using the function mci.transmat



# MCI analysis for the grocery store market areas based on the POS survey in shopping1 #

data(shopping1)
# Loading the survey dataset
data(shopping2)
# Loading the distance/travel time dataset
data(shopping3)
# Loading the dataset containing information about the city districts
data(shopping4)
# Loading the grocery store data

shopping1_KAeast <- shopping1[shopping1$resid_code %in% 
shopping3$resid_code[shopping3$KA_east == 1],]
# Extracting only inhabitants of the eastern districts of Karlsruhe

ijmatrix_gro_adj <- ijmatrix.create(shopping1_KAeast, "resid_code",
"gro_purchase_code", "gro_purchase_expen", remSing = TRUE, remSing.val = 1,
remSingSupp.val = 2, correctVar = TRUE, correctVar.val = 0.1)
# Removing singular instances/outliers (remSing = TRUE) incorporating
# only suppliers which are at least obtained three times (remSingSupp.val = 2)
# Correcting the values (correctVar = TRUE)
# by adding 0.1 to the absolute values (correctVar.val = 0.1)

ijmatrix_gro_adj <- ijmatrix_gro_adj[(ijmatrix_gro_adj$gro_purchase_code !=
"REFORMHAUSBOESER") & (ijmatrix_gro_adj$gro_purchase_code != "WMARKT_DURLACH")
& (ijmatrix_gro_adj$gro_purchase_code != "X_INCOMPLETE_STORE"),]
# Remove non-regarded observations

ijmatrix_gro_adj_dist <- merge (ijmatrix_gro_adj, shopping2, by.x="interaction",
by.y="route")
# Include the distances and travel times (shopping2)
ijmatrix_gro_adj_dist_stores <- merge (ijmatrix_gro_adj_dist, shopping4,
by.x = "gro_purchase_code", by.y = "location_code")
# Adding the store information (shopping4)

mci.transvar(ijmatrix_gro_adj_dist_stores, "resid_code", "gro_purchase_code", 
"p_ij_obs")
# Log-centering transformation of one variable (p_ij_obs)

ijmatrix_gro_transf <- mci.transmat(ijmatrix_gro_adj_dist_stores, "resid_code",
"gro_purchase_code", "p_ij_obs", "d_time", "salesarea_qm")
# Log-centering transformation of the interaction matrix

mcimodel_gro_trips <- mci.fit(ijmatrix_gro_adj_dist_stores, "resid_code",
"gro_purchase_code", "p_ij_obs", "d_time", "salesarea_qm")
# MCI model for the grocery store market areas
# shares: "p_ij_obs", explanatory variables: "d_time", "salesarea_qm"

summary(mcimodel_gro_trips)
# Use like lm

[Package MCI version 1.3.3 Index]