Learn R Programming

mvgraphnorm (version 1.81)

viz.rmvggm: Provides summary of sampeles generated from multivariate normal distribution using constrained covariance matrix.

Description

Generate boxplot of correlation and inverse correlation matrix of generated sample from the "rmvggm" function. Also plots an inferred network using conditional independence test when "net=TRUE".

Usage

viz.rmvggm(x,col = c("red", "blue"), net = FALSE, ...)

Arguments

x

This is a list object returned by "rmvggm" function.

col

color vector of length 2 for coloring boxplots for edge and non-edge components

net

is a boolean variable if "TRUE" returns a graph object and graph plot. The graph is inferred using conditional independent test using Grow-Shrink (GS) method. For details pleas check "gs" method in "bnlearn" package.

check "gs" function inputs in "bnlearn" package.

Value

Returns a list objects chich contains following objects:

covp

plot

covp

'recordplot' object contains the distribution of constrained covariance matrix generated by "HTF", "IPF" or "KIM" algorithm.

covp

'recordplot' object contains the distribution of constrained covariance matrix generated by "HTF", "IPF" or "KIM" algorithm.

covsmp

'recordplot' object contains the distribution of inverse of covariance of sample matrix. The samples are generated from multivariate normal distribution using constrained covariance matrix generated by "HTF", "IPF" or "KIM" algorithm.

netp

'recordplot' object contains networp plot which is inferred from the samples of multivariate normal distribution using constrained covariance matrix generated by "HTF", "IPF" or "KIM" algorithm. The network is inferred using Grow-Shrink (GS) method.

infnet

"igraph" object of inferred network.

References

Margaritis D (2003). Learning Bayesian Network Model Structure from Data. Ph.D. thesis, School of Computer Science, Carnegie-Mellon University, Pittsburgh, PA.

See Also

gs, bnlearn

Examples

Run this code
# NOT RUN {
  a = barabasi.game(20, directed=FALSE)
  ss <- rmvggm(20, net.str=a, 
    method="htf", cor=.4)
  zz <- viz.rmvggm(ss,net=TRUE, 
    undirected=TRUE, test="cor")

  zz$covp
  zz$covsmp
  zz$netp
# }

Run the code above in your browser using DataLab