binaryMCMC {hglasso}R Documentation

Generate samples using Gibbs sampling for binary network specified by the parameter Theta

Description

Sampling from the binary Ising model using Gibbs sampling. This function is not efficient and is only intended to be used in the examples.

Usage

binaryMCMC(n, Theta, burnin, skip,trace=FALSE)

Arguments

n

The number of samples.

Theta

A symmetric parameter matrix for the model from which the data is being generated.

burnin

The number of samples to discard as burn in.

skip

The number of samples to discard in-between returned samples.

trace

Default value of trace=FALSE. If trace=TRUE, the progress of Gibbs sampling is printed when each observation is sampled.

Value

X

An n x p matrix of samples generated from the binary network specified by Theta.

Author(s)

Kean Ming Tan

References

Tan et al. (2014). Learning graphical models with hubs. To appear in Journal of Machine Learning Research. arXiv.org/pdf/1402.7349.pdf.

See Also

HubNetwork

Examples

# generate Theta that specified the structure of a binary Ising model with p=10 variables and 2 hubs
#p<-10
#n<-50
#Theta <- HubNetwork(p,0.95,2,0.3,type="binary")$Theta

# generate samples using Gibbs sampling
#X <- binaryMCMC(n,Theta,burnin=1000,skip=500)


[Package hglasso version 1.3 Index]