plot
method for "amce" objects## S3 method for class 'amce':
plot(x, main = "", xlab = "Change in E[Y]", ci = 0.95,
colors = NULL, xlim = NULL, breaks = NULL,
labels = NULL, attribute_names = NULL, level_names = NULL,
label.baseline = TRUE, text.size = 11, text.color = "black",
point.size = 0.6, ...)
amce
plot
function will alternate between the colors in the vector for each attribute being plotted. If NULL, plot
will use a default ggplot2
color scheme.NULL
the plot function will automatically set a range that includes all effect estimates.NULL
plot will use ggplot2 defaultsNULL
plot will use ggplot2 defaultsplot.amce
will use the attribute names in the "amce" object passed to it.attribute_names
. Each character vector in the list contains the level names to be plotted as labels beneath the corresponding attribute. By default plot.amce
will use the TRUE
, the baseline levels for each attribute will be labeled as such. Defaults to TRUE
.plot
amce
for the main estimation routine.# Immigration Choice Conjoint Experiment Data from Hainmueller et. al. (2014).
data("immigrationconjoint")
data("immigrationdesign")
# Run AMCE estimator using all attributes in the design
results <- amce(Chosen_Immigrant ~ Gender + Education + `Language Skills` +
`Country of Origin` + Job + `Job Experience` + `Job Plans` +
`Reason for Application` + `Prior Entry`, data=immigrationconjoint,
cluster=TRUE, respondent.id="CaseID", design=immigrationdesign)
# Plot results
plot(results, xlab="Change in Pr(Immigrant Preferred for Admission to U.S.)",
ylim=c(-.3,.3), breaks=c(-.2, 0, .2), labels=c("-.2","0",".2"), text.size=13)
Run the code above in your browser using DataLab