• Complain

Søren Højsgaard - Graphical Models with R (Use R!)

Here you can read online Søren Højsgaard - Graphical Models with R (Use R!) full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2012, publisher: Springer, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Søren Højsgaard Graphical Models with R (Use R!)
  • Book:
    Graphical Models with R (Use R!)
  • Author:
  • Publisher:
    Springer
  • Genre:
  • Year:
    2012
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Graphical Models with R (Use R!): summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Graphical Models with R (Use R!)" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

This book offers an introduction to graphical modeling using R and the main features of some of these packages. It provides examples of how more advanced aspects of graphical modeling can be represented and handled within R.

Søren Højsgaard: author's other books


Who wrote Graphical Models with R (Use R!)? Find out the surname, the name of the author of the book and a list of all author's works by series.

Graphical Models with R (Use R!) — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Graphical Models with R (Use R!)" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Sren Hjsgaard , David Edwards and Steffen Lauritzen Use R! Graphical Models with R 2012 10.1007/978-1-4614-2299-0_1 Springer Science+Business Media, LLC 2012
1. Graphs and Conditional Independence
Sren Hjsgaard 1, David Edwards 2 and Steffen Lauritzen 3
(1)
Department of Mathematical Sciences, Aalborg University, Aalborg, Denmark
(2)
Centre for Quantitative Genetics and Genomics, Department of Molecular Biology and Genetics, Aarhus University, Aarhus, Denmark
(3)
Department of Statistics, University of Oxford, Oxford, UK
Abstract
In this chapter we introduce graphs as mathematical objects, show how to work with them using R and explain how they are related to statistical models. We focus mainly on undirected graphs and directed acyclic graphs (DAGs), but also briefly treat chain graphs, that have both undirected and directed edges. Key concepts such as clique, path, separation, ancestral set, triangulated graph and perfect vertex ordering, and operations such as moralization and triangulation, are described and illustrated through examples using R . Certain models for multivariate data give rise to patterns of conditional independences that can be represented as a graph, the so-called dependence graph. For such a model, the conditional independences that hold can be directly read off the dependence graph. For undirected graphs, we show how this may be done using the graphical property of separation: for DAGS and chain graphs, analogous properties called d -separation and c -separation are used.
1.1 Introduction
A graph as a mathematical object may be defined as a pair Graphical Models with R Use R - image 1 , where V is a set of vertices or nodes and E is a set of edges . Each edge is associated with a pair of nodes, its endpoints . Edges may in general be directed, undirected, or bidirected. Graphs are typically visualized by representing nodes by circles or points, and edges by lines, arrows, or bidirected arrows. We use the notation , , and to denote edges between and . Graphs are useful in a variety of applications, and a number of packages for working with graphs are available in R .
We have found the graph package to be particularly useful, since it provides a way of representing graphs as so-called graphNEL objects (graphs as N ode and E dge L ists) and thereby gives access to a wide range of graph-theoretic operations (in the graph package), efficient implementations of standard graph algorithms (in the RBGL package), and allows the graphs to be easily displayed in a variety of layouts (using the Rgraphviz package from BioConductor). Much of this book uses this representation. In statistical applications we are particularly interested in two special graph types: undirected graphs and directed acyclic graphs (often called DAGs).
We have also found the igraph package to be useful. Like the graph package, igraph supports both undirected and directed graphs and implements various graph algorithms. Functions in the package allow graphs to be displayed in a variety of formats. The internal representation of graphs in the igraph package differs from the representation in the graph package.
The gRbase package supplements graph and igraph by implementing some algorithms useful in graphical modelling. gRbase also provides two wrapper functions, ug() and dag() , for easily creating undirected graphs and DAGs represented either as graphNEL objects (the default), igraph objects or adjacency matrices.
The first sections of this chapter describe some of the most useful functions available when working with graphical models. These come variously from the gRbase , graph and RBGL packages, but it is not usually necessary to know which. To use the functions and plot the graphs it is enough to load gRbase and Rgraphviz , since gRbase automatically loads the other packages. To find out which package a function we mention belongs to, please refer to the index to this book or to the usual help functions.
As statistical objects, graphs are used to represent models, with nodes representing model variables (and sometimes model parameters) in such a way that the independence structure of the model can be read directly off the graph. Accordingly, a section of this chapter is devoted to a brief description of the key concept of conditional independence and explains how this is linked to graphs. Throughout the book we shall repeatedly return to this in more detail.
1.2 Graphs
Our graphs have a finite node set V and for the most part they are simple graphs in the sense that they have no loops nor multiple edges. Two vertices and are said to be adjacent , written , if there is an edge between and in Picture 2 , i.e. if either , , or .
In this chapter we primarily represent graphs as graphNEL objects, and except where stated otherwise, the functions we describe operate on these objects. However, different representations can be useful for various reasons, for example igraph objects or as adjacency matrices. It is easy to convert between graphNEL objects, igraph objects and adjacency matrices, using the as() function. For example, if gNg is a graphNEL object, then
creates versions of the same graph represented as an igraph object and as an - photo 3
creates versions of the same graph represented as an igraph object and as an adjacency matrix. Similarly, to convert back we could write
121 Undirected Graphs An undirected graph may be created using the ug - photo 4
1.2.1 Undirected Graphs
An undirected graph may be created using the ug() function. The graph can be specified using a list of formulas, a single formula or a list of vectors. Thus the following forms are equivalent:
Graphical Models with R Use R - image 5
graphNEL graphs are displayed with plot() :
Graphical Models with R Use R - image 6
Per default the ug function returns an graphNEL object but the options - photo 7
Per default the ug() function returns an graphNEL object, but the options result="igraph" or result="matrix" lead it to return an igraph or adjacency matrix instead. For example,
There is a plot method for igraph objects in the igraph package There are - photo 8
There is a plot() method for igraph objects in the igraph package. There are also various facilities for controlling the layout. For example, we may use a layout algorithm called layout.spring as follows:
The default size of vertices and their labels is quite small This is easily - photo 9
The default size of vertices and their labels is quite small. This is easily changed by setting certain attributes on the graph, see Sect. for examples. However, to avoid changing these attributes for all the graphs shown in the following we have defined a small plot function myiplot() as follows:
The graph ug0i is then displayed with Edges can be added and deleted using - photo 10
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Graphical Models with R (Use R!)»

Look at similar books to Graphical Models with R (Use R!). We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Graphical Models with R (Use R!)»

Discussion, reviews of the book Graphical Models with R (Use R!) and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.