dot_plot {nethet} | R Documentation

## Create a plot showing the edges with the highest partial correlation in any cluster.

### Description

This function takes the output of `het_cv_glasso` or `mixglasso` and creates a plot of the highest scoring edges along the y axis, where, the edge in each cluster is represented by a circle whose area is proportional to the smallest mean of the two nodes that make up the edge, and the position along the y axis shows the partial correlation of the edge.

### Usage

    dot_plot(net.clustering, p.corrs.thresh = 0.25, hard.limit = 50,
      display = TRUE, node.names = rownames(net.clustering$Mu),
      group.names = sort(unique(net.clustering$comp)),
      dot.size.range = c(3, 12))

### Arguments

`net.clustering` | A network clustering object as returned by `het_cv_glasso` or `mixglasso`.
`p.corrs.thresh` | Cutoff for the partial correlations; only edges with absolute partial correlation > p.corrs.thresh (in any cluster) will be displayed.
`hard.limit` | Additional hard limit on the number of edges to display. If p.corrs.thresh results in more edges than hard.limit, only hard.limit edges with the highest partial correlation are returned.
`display` | If TRUE, print the plot to the current output device.
`node.names` | Names for the nodes in the network.
`group.names` | Names for the clusters or groups.
`dot.size.range` | Graphical parameter for scaling the size of the circles (dots) representing an edge in each cluster.

### Value

Returns a ggplot2 object. If display=TRUE, additionally displays the plot.

### Examples

    n = 500
    p = 10
    s = 0.9
    n.comp = 3

    # Create different mean vectors
    Mu = matrix(0,p,n.comp)

    # Define non-zero means in each group (non-overlapping)
    nonzero.mean = split(sample(1:p),rep(1:n.comp,length=p))

    # Set non-zero means to fixed value
    for(k in 1:n.comp){
    	Mu[nonzero.mean[[k]],k] = -2/sqrt(ceiling(p/n.comp))
    }

    # Generate data
    sim.result = sim_mix_networks(n, p, n.comp, s, Mu=Mu)
    mixglasso.result = mixglasso(sim.result$data, n.comp=3)
    mixglasso.clustering = mixglasso.result$models[[mixglasso.result$bic.opt]]

    dot_plot(mixglasso.clustering, p.corrs.thresh=0.5)

[Package nethet version 1.24.0 Index]