Independent Multiple-Sample Greedy Equivalence Search Implementation

Functions for the implementation of Independent Multiple-sample Greedy Equivalence Search (IMaGES), a causal inference algorithm for creating aggregate graphs and structural equation modeling data for one or more datasets. This package is useful for time series data with specific regions of interest. This implementation is inspired by the paper "Six problems for causal inference from fMRI" by Ramsey, Hanson, Hanson, Halchenko, Poldrack, and Glymour (2010) . The IMaGES algorithm uses a modified BIC score to compute goodness of fit of edge additions, subtractions, and turns across all datasets and returns a representative graph, along with structural equation modeling data for the global graph and individual datasets, means, and standard errors. Functions for plotting the resulting graph(s) are provided. This package is built upon the 'pcalg' package.


This is the repository for the R implementation of the IMaGES algorithm. This project was initiated by SJ Hanson (RUBIC, Rutgers University). The repository started as a fork of pcalg and is now a standalone product. The additional code and changes were written/made by Noah Frazier-Logue.

IMaGES is based on the paper

Ramsey JD, Hanson SJ, Hanson C, Halchenko YO, Poldrack RA, Glymour C (2010). Six problems for causal inference from fMRI. Neuroimage, 49, 1545-1558.

This algorithm elaborates on the GES algorithm by using a global score across the supplied datasets and operating over the datasets concurrently to determine the representative graph(s) with the best goodness of fit.

NOTE: This software is in beta! If you come across any issues while using this package or have any suggestions for improvement, submit a pull request.

Installation

To install from this repository, simply run these commands in an R shell:

> install_github("noahfl/IMaGES")

TODO: Add stuff about CRAN when that becomes relevant.

Usage

#matrices should be a list of >= 1 datasets with an optional header
matrices <- list(matrix1, matrix2,...)
 
#load supplied sample data
data(IMdata)
 
im.results <- IMaGES(matrices=IMData, penalty=3, num.markovs=5)
 
#plot individual graph, in this case the global graph
plotIMGraph(im.results$.global)
 
#plot Markov Equivalence Class (size specified by num.markovs)
plotMarkovs(im.results)
 
#plot global graph with SEM data, and all individual datasets' SEM data
#imposed on the global graph
plotAll(im.results)
 
#compare IMaGES result against individual graphs
data(IMTrue)
 
for (i in 1:length(IMTrue)) {
    plot(IMTrue[[i]])
}
 

News

Reference manual

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

install.packages("IMaGES")

0.1 by Noah Frazier-Logue, 5 months ago


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


Authors: Noah Frazier-Logue [aut, cre] , Stephen Jose Hanson [aut] , Markus Kalisch [ctb] , Alain Hauser [ctb] , Martin Maechler [ctb] , Diego Colombo [ctb] , Doris Entner [ctb] , Patrik Hoyer [ctb] , Antti Hyttinen [ctb] , Jonas Peters [ctb] , Nicoletta Andri [ctb] , Emilija Perkovic [ctb] , Preetam Nandy [ctb] , Philipp Ruetimann [ctb] , Daniel Stekhoven [ctb] , Manuel Schuerch [ctb]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports stats, graphics, utils, methods, graph, igraph, ggm, Rcpp, sfsmisc, lavaan, Rgraphviz

Suggests knitr, rmarkdown

Linking to Rcpp, RcppArmadillo, BH


See at CRAN