Skip to contents

Plot results per dimension - Marginal Means

Usage

conjoint_plot_point(.x)

Arguments

.x

A list or atomic vector.

Value

a ggplot2 object

Examples


kobodata <-  system.file("data-demo/conjoint_data.xlsx", package = "VulnerabilityScoreCalibration")
koboform <-  system.file("data-demo/conjoint_form.xlsx", package = "VulnerabilityScoreCalibration") 

cj <- conjoint_review(kobodata, koboform)
#> New names:
#>  `` -> `...1`
#>  `` -> `...2`
#>  `` -> `...3`
#> Warning: There were 12 warnings in `dplyr::mutate()`.
#> The first warning was:
#>  In argument: `margins = list(cregg::mm(data, stats::as.formula(formula), id =
#>   ~email))`.
#>  In row 1.
#> Caused by warning in `logLik.svyglm()`:
#> ! svyglm not fitted by maximum likelihood.
#>  Run `dplyr::last_dplyr_warnings()` to see the 11 remaining warnings.
 
conjoint_plot_point( as.data.frame(cj[["cjdata"]][1,][["margins"]])) + 
  ggplot2::labs( subtitle = "Margins)")


conjoint_plot_point( as.data.frame(cj[["cjdata"]][1,][["amces"]])) + 
  ggplot2::labs( subtitle = "Average Marginal Component Effects (AMCEs)")
#> Warning: Removed 1 rows containing missing values (`geom_segment()`).
#> Warning: Removed 1 rows containing missing values (`geom_segment()`).
#> Warning: Removed 1 rows containing missing values (`geom_segment()`).


conjoint_plot_point( as.data.frame(cj[["cjdata"]][1,][["importance"]])) + 
  ggplot2::labs( subtitle = "Importance")
#> Warning: Removed 1 rows containing missing values (`geom_segment()`).
#> Warning: Removed 1 rows containing missing values (`geom_segment()`).
#> Warning: Removed 1 rows containing missing values (`geom_segment()`).