This page describes some of the R packages for graphical modelling
that I have been involved with. There are many more packages for
grapical modelling, and the CRAN Task View gRaphical Models in
R lists many of these.
gRbase provides efficient graph algorithms, functions for easy
creation of graphs, functions for manipulation of highdimensional
tables, data relevant to graphical models.
gRbase does not provide modelling facilities. These facilities
are provided by other packages (who depends on gRbase).
gRim is an R package for graphical interaction models.
gRim implements graphical log-linear models for discrete data,
Gaussian graphical models for continuous data and Mixed interaction
models for mixed data.
A related paper is: Højsgaard, Søren ; Lauritzen, Steffen
L. Graphical Gaussian models with edge and vertex symmetries.
Journal of the Royal Statistical Society; Series B: Statistical
Methodology, Vol. 70, No. 5, 2008, p. 1005-1027.
You MUST use R version 2.15.2 (or later). This is ESSENTIAL.
The packages listed above use the graph, RBGL and
Rgraphviz packages. These packages are NOT on CRAN but on
bioconductor. To install these packages, execute
source("http://bioconductor.org/biocLite.R"); biocLite(c("graph","RBGL","Rgraphviz"))
Then install the packages from CRAN in the usual way.
When reporting unexpected behaviours, bugs etc. in the packages,
PLEASE supply: 1) A reproducible example in terms of a short code
fragment. 2) The data. The preferred way of sending the data
"mydata" is to copy and paste the result from running
dput(mydata). 3) The result of running the sessionInfo()
function.
I have R version 2.15.1 (or earlier) installed. Must I
really update to version 2.15.2 in order to use these packages?
A:
That is the easiest. If you make a fresh installation of
2.15.2 (or later) as described above then everything should work out
of the box. If you use 2.15.0 or 2.15.1 you can also get things to
work but you must then make sure to obtain the updated bioconductor
packages yourself.
Q:
It used to be so that one should install the Graphviz
program separately in order to use the Rgraphviz package. Is
that still so?
A:
No. If you use R version 2.15.2 when installing the
bioconductor packages, everything should work out of the
box. (That is one reason why you are asked you to use version 2.15.2 or later).
Q:
I want to build a Bayesian network with 80.000 nodes. Can I
do so with gRain?
A:
Work has been done on supporting large networks. Please let
me know of sucesses and failures.
Q:
Does gRain have support for Bayesian networks based on the
multivariate normal distribution and for mixed variables?
A:
No. Implementation for the multivariate normal distribution
is straight forward (if you work with the canoncical rather than the
moment parameters). Any contribution would be most welcome. For
mixed variables, the only algorithm I know of is numerically unstable.
Søren Højsgaard
sorenh [at] math [dot] aau [dot] dk
File translated from
TEX
by
TTH,
version 3.89. On 28 Jan 2013, 00:08.