Description Usage Arguments Details Value Author(s) References See Also Examples

Function visualizing the differential graph, i.e., the network of edges that are unique for 2 class-specific graphs over the same vertices

1 2 3 4 |

`P1` |
Sparsified precision |

`P2` |
Sparsified precision |

`lay` |
A |

`coords` |
A |

`Vsize` |
A |

`Vcex` |
A |

`Vcolor` |
A |

`VBcolor` |
A |

`VLcolor` |
A |

`P1color` |
A |

`P2color` |
A |

`main` |
A |

Say you have 2 class-specific precision matrices that are estimated over the same variables/features.
This function visualizes in a single graph the edges that are unique to the respective classes.
Hence, it gives the differential graph.
Edges unique to `P1`

are colored according to `P1color`

.
Edges unique to `P2`

are colored according to `P2color`

.
Dashed lines indicate negative precision elements while solid lines indicate positive precision elements.

The default layout is according to the Fruchterman-Reingold algorithm (1991).
Most layout functions supported by `igraph`

are supported (the function is partly a wrapper around certain `igraph`

functions).
The igraph layouts can be invoked by a `character`

that mimicks a call to a `igraph`

layout functions in the `lay`

argument.
When using `lay = NULL`

one can specify the placement of vertices with the `coords`

argument.
The row dimension of this matrix should equal the number of vertices.
The column dimension then should equal 2 (for 2D layouts) or 3 (for 3D layouts).
The `coords`

argument can also be viewed as a convenience argument as it enables one, e.g., to layout a graph
according to the coordinates of a previous call to `Ugraph`

.
If both the the lay and the coords arguments are not `NULL`

, the lay argument takes precedence.

The function returns a graph.

Carel F.W. Peeters <[email protected]>

Csardi, G. and Nepusz, T. (2006). The igraph software package for complex network research. InterJournal, Complex Systems 1695. http://igraph.sf.net

Fruchterman, T.M.J., and Reingold, E.M. (1991). Graph Drawing by Force-Directed Placement. Software: Practice & Experience, 21: 1129-1164.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ```
## Obtain some (high-dimensional) data, class 1
p = 25
n = 10
set.seed(333)
X = matrix(rnorm(n*p), nrow = n, ncol = p)
colnames(X)[1:25] = letters[1:25]
## Obtain some (high-dimensional) data, class 2
set.seed(123456)
X2 = matrix(rnorm(n*p), nrow = n, ncol = p)
colnames(X2)[1:25] = letters[1:25]
## Obtain regularized precision under optimal penalty, classes 1 and 2
OPT <- optPenalty.LOOCV(X, lambdaMin = .5, lambdaMax = 30, step = 100)
OPT2 <- optPenalty.LOOCV(X2, lambdaMin = .5, lambdaMax = 30, step = 100)
## Determine support regularized standardized precision under optimal penalty
PC0 <- sparsify(symm(OPT$optPrec), threshold = "localFDR")$sparseParCor
PC02 <- sparsify(symm(OPT2$optPrec), threshold = "localFDR")$sparseParCor
## Visualize differential graph
DiffGraph(PC0, PC02)
``` |

CFWP/rags2ridges documentation built on Sept. 23, 2017, 6:38 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.