# NOT RUN {
data("taxes")
# estimating AMCEs
amce(taxes, chose_plan ~ taxrate1 + taxrate2 + taxrate3 +
taxrate4 + taxrate5 + taxrate6 + taxrev, id = ~ ID)
# }
# NOT RUN {
data("immigration")
# estimating AMCEs with constraints
amce(immigration, ChosenImmigrant ~ Gender + ReasonForApplication * CountryOfOrigin,
id = ~CaseID)
# estimating average component interaction effects (AMCEs of feature combinations)
immigration$language_entry <- interaction(immigration$LanguageSkills,
immigration$PriorEntry, sep = "_")
amce(immigration,ChosenImmigrant ~ language_entry, id = ~CaseID)
# balance testing example
plot(amce(immigration[!is.na(immigration$ethnocentrism),],
ethnocentrism ~ Gender + Education + LanguageSkills, id = ~ CaseID))
# reference category sensitivity
x <- amce_by_reference(immigration, ChosenImmigrant ~ LanguageSkills + Education,
variable = ~ LanguageSkills, id = ~ CaseID)
# plot
plot(x)
# }
Run the code above in your browser using DataLab