knitr::opts_knit$set( stop_on_error = 2L )
ZeligChoice is a module with additional models for the Zelig statistical package in R.
Project page and publications available at: http://zeligproject.org
ZeligChoice follows the same workflow as core Zelig.
Here us a simple example using the Zelig 4 wrappers (you can also use Zelig 5 reference classes). Note: installing and loading the zeligverse package will install and load all of the packages you need to use ZeligChoice.
# Load required packages library(zeligverse) # Load example data data(mexico) # Extimate model z.out <- zelig(as.factor(vote88) ~ pristr + othcok + othsocok, model = "mlogit", data = mexico, cite = FALSE) # Set fitted values x.out <- setx(z.out) # Simulate quantities of interest s.out <- sim(z.out, x.out) # Plot results plot(s.out)
You can install ZeligChoice from CRAN or, the developerment version from GitHub with:
# install.packages("devtools") devtools::install_github("IQSS/ZeligChoice")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.