Skip to content

IQSS/ZeligChoice

Repository files navigation

ZeligChoice

CRAN Version Travis-CI Build Status codecov Gitter chat Dev-Blog

ZeligChoice is a module with additional models for the Zelig statistical package in R.

Project page and publications available at: http://zeligproject.org

Example Page

Use

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)

Installation

You can install ZeligChoice from CRAN or, the developerment version from GitHub with:

# install.packages("devtools")
devtools::install_github("IQSS/ZeligChoice")