plot.md.range: Plot sample level averages and CIs for MaxDiff utilities

View source: R/maxdiff-plots.R

plot.md.rangeR Documentation

Plot sample level averages and CIs for MaxDiff utilities

Description

Plot sample level averages and CIs for MaxDiff utilities

Usage

## S3 method for class 'md.range'
plot(md.define, use.raw = FALSE, item.disguise = FALSE, plot.zero = FALSE)

Arguments

md.define

A MaxDiff study object that contains individual-level utility estimates present in a member called $md.hb.betas or $md.hb.betas.zc. Typically those are estimated created by md.hb() in this package.

These data also be imported or created by any other process, as long as they are rectangular with items in the columns and respondents in the rows, and there is an "ID" column with unique respondent identifies for each row. For example, if you export data from Sawtooth Software or some other platform, you could load and plot it with this function; just create an object md.define$md.hb.betas with the estimates and an ID column.

use.raw

Whether to use raw MNL beta coefficients $md.hb.betas, if present, or some transformed e.g., zero-centered diff, version of them present in $md.hb.betas

item.disguise

Remove the item labels and number them generically. This is included to make it easy to share and show results at a conference or other audience when the underlying details are confidential.

plot.zero

Plot a vertical line for zero (the point of indifference), which only applies for raw beta utilities.

Value

A ggplot2 object with the plot.


cnchapman/choicetools documentation built on May 28, 2023, 9:14 a.m.