Chapter 7 PCA Perceptual Maps
Sources for this chapter:
- R for Marketing Research and Analytics, Second Edition (2019). Chris Chapman and Elea McDonnell Feit
Data for this chapter:
The
greekbrands
data is used from theMKT4320BGSU
course package. Load the package and use thedata()
function to load the data.
7.1 Introduction
Base R can produce basic perceptual maps from a PCA object, but cannot create a joint-space map easily. For joint-space maps, better looking perceptual maps, and to make the process easier, I have created a user defined function, which is part of the MKT4320BGSU
package.
percmap
returns aggplot
created perceptual (or joint-space) map.
7.2 User Defined Function
7.2.1 Preparation
- For the user defined function, we must pass the function a data frame with the variables to be used in creating the principal components, the grouping variable (i.e., brand/product name), and if applicable, the preference variable
- The data frame does not need to be aggregated, but must contain ONLY those variables
library(dplyr)
# For a perceptual map, store variables selected using dplyr to 'pmdata'
pmdata <- greekbrands %>%
select(perform, leader, fun, serious, bargain, value, brand)
# For a joint space map, store variable selected using dplyr to 'jsmdata'
jsmdata <- greekbrands %>%
select(perform, leader, fun, serious, bargain, value, pref, brand)
7.2.2 Using the function
- The
percmap
user defined function can easily product a perceptual map or joint-space map based on the first two principal components- Requires the following packages:
ggplot2
dplyr
- Requires the following packages:
- Usage:
percmap(data, group="", pref="")
where:data
is the PCA variable datagroup=""
is the name of the grouping variablepref=""
is the name of the preference variable- Can be excluded if no preference variable
- Returns:
- A perceptual map if
pref
is not included - A joint space map if
pref
is included
- A perceptual map if
- Examples:
- Perceptual Map
- Joint Space Map