Efficient Stepwise Selection in Decomposable Models

An implementation of the ESS algorithm following Amol Deshpande, Minos Garofalakis, Michael I Jordan (2013) . The ESS algorithm is used for model selection in decomposable graphical models.


CRAN_Status_Badge Travis-CI Build Status


The European Social Survey (ESS) is an academically driven cross-national survey that has been conducted across Europe since its establishment in 2001. Every two years, face-to-face interviews are conducted with newly selected, cross-sectional samples. The survey measures the attitudes, beliefs and behaviour patterns of diverse populations in more than thirty nations. Taken from the ESS website.

The ess package is designed to download the ESS data as easily as possible. It has a few helper functions to download rounds, rounds for a selected country and to show which rounds/countries are available. Check out the vignette for a more detailed example of the ess package.


You can install and load the package with these commands:


For now the package will be available on Github but sometime in the near future it will be submitted to CRAN.


First, you need to register at the ESS website, in case you haven't. Please visit the register section from the ESS website. If your email is not registered at their website, an error will be raised prompting you to go register.

To download the first round to use in R:

one_round <- ess_rounds(1, "[email protected]")

This will return a list object with round 1 in the first slot. You can also download several rounds by supplying the number of rounds.

five_rounds <- ess_rounds(1:5, "[email protected]")

This will download all latest versions of rounds 1 through 5 and return a list of length 5 with each round as a data frame inside the list.

You can check the available rounds with show_rounds() because if you supply a non existent round, the function will return an error.

two_rounds <- ess_rounds(c(1, 22), "[email protected]")
#> Error in ess_round_url(rounds) : 
#> ESS round 22 is not a available. Check show_rounds() 

Alternatively, you can download all available rounds with ess_all_rounds().

You can also download rounds by country:

dk_two <- ess_country("Denmark", 1:2, "[email protected]")

Use show_countries() to see available countries and show_country_rounds("Denmark") to see available rounds for chosen country. Alternatively, use ess_all_cntrounds() to download all available rounds of a country.

Stata users

I'm quite aware that most ESS users don't know R, that is why the function also allows you to download the data in Stata format with just one line of code. Just set the only_download argument to TRUE and specify where it will be saved:

ess_rounds(c(1, 2),
           "[email protected]",
           only_download = TRUE,
           output_dir = "my/new/directory")

This will save the ESS rounds into separate folders and unzip them in the specified directory (if you want to know your current directory, type getwd()). This works the same way for ess_country().

            rounds = c(1, 2),
            "[email protected]",
            only_download = TRUE,
            output_dir = "my/new/directory")


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.1.2 by Mads Lindskou, 6 months ago


Report a bug at https://github.com/mlindsk/ess/issues

Browse source code at https://github.com/cran/ess

Authors: Mads Lindskou [aut, cre]

Documentation:   PDF Manual  

GPL-3 license

Imports Rcpp, igraph

Suggests tinytest

Linking to Rcpp

System requirements: C++11

Imported by molic.

See at CRAN