psm_plot | R Documentation |
psm_plot()
uses ggplot()
to show the standard van
Westendorp Price Sensitivity Meter plot that allows to see the
acceptance for each price on each of the four variables.
It takes the object created by psm_analysis()
or
psm_analysis_weighted()
as an input.
psm_plot(psm_result,
shade_pricerange = TRUE,
line_toocheap = TRUE,
line_tooexpensive = TRUE,
line_notcheap = TRUE,
line_notexpensive = TRUE,
point_idp = TRUE,
point_color_idp = "#009E73",
label_idp = TRUE,
point_opp = TRUE,
point_color_opp = "#009E73",
label_opp= TRUE,
pricerange_color = "grey50",
pricerange_alpha = 0.3,
line_color = c("too cheap" = "#009E73",
"not cheap" = "#009E73",
"not expensive" = "#D55E00",
"too expensive" = "#D55E00"),
line_type = c("too cheap" = "dotted",
"not cheap" = "solid",
"not expensive" = "solid",
"too expensive" = "dotted"))
psm_result |
Result of a Price Sensitivity Meter analysis,
created by running |
shade_pricerange |
logical value. Determines if the acceptable price range is shown as a shaded area or not. |
line_toocheap |
logical value. Determines if the line for the "too cheap" price curve is shown or not. |
line_tooexpensive |
logical value. Determines if the line for the "too expensive" price curve is shown or not. |
line_notcheap |
logical value. Determines if the line for the "not cheap" price curve is shown or not. |
line_notexpensive |
logical value. Determines if the line for the "not expensive" price curve is shown or not. |
point_idp |
logical value. Determines if the Indifference Price Point is shown or not. |
point_color_idp |
character vector, specifying the color of the Optimal Price Point. Can be a hex color (e.g. "#7f7f7f") or one of R's built-in colors (e.g. "grey50"). |
label_idp |
logical value. Determines if the label for the Indifference Price Point is shown or not. |
point_opp |
logical value. Determines if the Optimal Price Point is shown or not. |
point_color_opp |
character vector, specifying the color of the Optimal Price Point. Can be a hex color (e.g. "#7f7f7f") or one of R's built-in colors (e.g. "grey50"). |
label_opp |
logical value. Determines if the label for the Optimal Price Point is shown or not. |
pricerange_color |
character, specifying the
background color for the accepted price range. Can be a
hex color (e.g. "#7f7f7f") or one of R's built-in colors
(e.g. "grey50"). You can see all of R's built-in colors
with the function |
pricerange_alpha |
numeric between 0 and 1,
specifying the alpha transparency for the shaded area of
the the accepted price range. Is only applied if
|
line_color |
character vector, specifying the line
color for each of the price curves shown. Color
definitions must match the lines you have defined via
|
line_type |
vector, specifying the line type for each
of the price curves shown. Definitions must match the lines
you have defined via |
The function output is a ggplot2 object.
Van Westendorp, P (1976) "NSS-Price Sensitivity Meter (PSM) – A new approach to study consumer perception of price" Proceedings of the ESOMAR 29th Congress, 139–167. Online available at https://archive.researchworld.com/a-new-approach-to-study-consumer-perception-of-price/.
The vignette "Visualizing PSM Results" shows a similar way and more custom way to plot the data.
# set up example data and run psm_analysis()
tch <- round(rnorm(n = 250, mean = 5, sd = 0.5), digits = 2)
ch <- round(rnorm(n = 250, mean = 8.5, sd = 0.5), digits = 2)
ex <- round(rnorm(n = 250, mean = 13, sd = 0.75), digits = 2)
tex <- round(rnorm(n = 250, mean = 17, sd = 1), digits = 2)
output_psm_demo <- psm_analysis(toocheap = tch,
cheap = ch,
expensive = ex,
tooexpensive = tex)
# create the plot (note that ggplot's convention
# is to *not* show it by default)
## Not run: psm_result_plot <- psm_plot(output_psm_demo)
# to show the plot, call the object (and maybe
# additional ggplot functions if you like)
psm_result_plot + ggplot2::theme_minimal()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.