Description Usage Arguments Details Value See Also Examples
Default function to plot the network of a GMS object.
1 2 |
x |
a |
fn |
file name to save the network plot; default to be an empty string, so the network is plotted to the standard output (screen). NOTE: if a file name is specified, it should be file name for PDF file. |
th |
numeric value, default to 1e-06. To specify the threshold if the estimated coefficient between two variables is to be considered connected. |
i |
index of the network (along the regularization path) to be plotted. Default to |
mylayout |
graph layout to draw the network, default to |
vars |
vector of variable names, default to |
... |
other generic arguments for |
This is the default plotting function for GMS
objects (Markov Networks inferred over a regularization path). Refer to GMS
for details on GMS
object.
This function will plot the optimal network on the screen by default. However, given a file name, the plot will be saved to a PDF file.
Also, given a specific index corresponding to the index of lambda.path
, the associated network will be plotted.
The network will be plotted in force-directed layout (layout.fruchterman.reingold
with default parameters implemented in igraph
package).
Returns the layout object from igraph
package - numeric matrix of two columns and the rows with the same number as the number of vertices.
1 2 3 |
Plot optimal network
Output file: ggm.fit.net.pdf
[,1] [,2]
[1,] 3.348269 2.2770156
[2,] 4.273319 3.4064235
[3,] 3.158322 5.3186397
[4,] 2.302832 6.7303499
[5,] 5.468138 4.8521189
[6,] 5.629385 2.2753429
[7,] 5.985744 6.3968184
[8,] 6.237545 7.8848238
[9,] 5.416756 8.7805875
[10,] 6.355292 4.1197938
[11,] 3.399755 3.5450990
[12,] 7.631922 4.0662085
[13,] 8.748859 4.3633515
[14,] 2.052732 3.2586033
[15,] 3.659164 6.6596379
[16,] 8.853904 7.5355225
[17,] 9.678661 4.6257948
[18,] 1.915251 5.2620798
[19,] 8.891000 3.1809229
[20,] 6.561551 8.9839769
[21,] 4.408708 1.7704181
[22,] 1.321774 7.1097119
[23,] 6.623597 1.5064483
[24,] 8.829832 5.5578118
[25,] 4.682717 0.6810434
[26,] 3.882768 7.8485273
[27,] 5.003543 3.8042809
[28,] 1.048866 3.4327629
[29,] 7.320170 7.9466484
[30,] 2.359277 7.9983304
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.