Description Usage Arguments Details Value See Also Examples
Calculate (descriptive) marginal means (MMs) from a conjoint design
1 2 3 4 5 6 7 8 9 10 11 12 |
data |
A data frame containing variables specified in |
formula |
A formula specifying an outcome (LHS) and conjoint features (RHS) to describe. All variables should be factors; all levels across features should be unique, with constraints specified with an asterisk (*) between features, as in |
id |
An RHS formula specifying a variable holding respondent identifiers, to be used for clustering standard errors. By default, data are unclustered. |
weights |
An (optional) RHS formula specifying a variable holding survey weights. |
feature_order |
An (optional) character vector specifying the names of feature (RHS) variables in the order they should be encoded in the resulting data frame. |
feature_labels |
A named list of “fancy” feature labels to be used in output. By default, the function looks for a “label” attribute on each variable in |
level_order |
A character string specifying levels (within each feature) should be ordered increasing or decreasing in the final output. This is mostly only consequential for plotting via |
alpha |
A numeric value indicating the significance level at which to calculate confidence intervals for the MMs (by default 0.95, meaning 95-percent CIs are returned). |
h0 |
A numeric value specifying a null hypothesis value to use when generating z-statistics and p-values. |
... |
Ignored. |
mm
provides descriptive representations of conjoint data as marginal means (MMs), which represent the mean outcome across all appearances of a particular conjoint feature level, averaging across all other features. In forced choice conjoint designs with two profiles per choice task, MMs by definition average 0.5 with values above 0.5 indicating features that increase profile favorability and values below 0.5 indicating features that decrease profile favorability. For continuous outcomes, MMs can take any value in the full range of the outcome.
But note that if feature levels can co-occur, such that both alternatives share a feature level, then the MMs on forced choice outcomes are bounded by the probability of co-occurrence (as a lower bound) and 1 minus that probability as an upper bound.
Plotting functionality is provided in plot.cj_mm
.
A data frame of class “cj_mm”
1 2 3 4 5 6 7 8 9 10 | data(immigration)
# marginal means
mm(immigration, ChosenImmigrant ~ Gender + Education + LanguageSkills,
id = ~ CaseID, h0 = 0.5)
# higher-order marginal means with feature interactions
immigration$language_entry <-
interaction(immigration$LanguageSkills, immigration$PriorEntry, sep = "_")
mm(immigration, ChosenImmigrant ~ language_entry,
id = ~CaseID)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.