View source: R/postregression_functions.R
cjoint_plot | R Documentation |
Plots the coefficients \beta_k
from a fitted FactorHet object for the
main effects only. Use AME
to calculate average marginal effects. This
provides a fast method to examine the impact of a factor.
cjoint_plot(object, baseline = NA, plot = TRUE)
object |
An object from |
baseline |
A specification of baseline levels of each factor. The
default is |
plot |
A logical value as to whether the function should print the plot
immediately or quietly provide an object containing the plot and data. The
default is |
Returns a named list with the underlying data ("data"
) and the
plot ("plot"
).
AME
# Fit with one group and limited regularization for example only
# Ignore conjoint structure for simplicity
fit <- FactorHet(Chosen_Immigrant ~ Plans + Ed + Country,
design = immigration, lambda = 1e-2,
K = 1, group = ~ CaseID, task = ~ contest_no, choice_order = ~ choice_id)
# Plot the raw coefficients
cjoint_plot(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.