generate.bmn.data: Generate a dataset from binary markov network
Description
Generate a dataset with binary variables upon the interaction matrix. If the interaction matrix is not provided, and then, an interaction matrix would be generated.
a list that includes three components: data, weight, theta. data is an n-by-p matrix that record samples; weight: an n-dimensional vector that records the frequency of each row of data; theta is the interaction matrix used for generating samples.
Arguments
n
The number of observations.
p
The number of predictors of interest.
type
a numeric value that indicates the type of an interaction matrix
seed
Seed to be used to reproduce dataset
graph.seed
Seed used to reproduce the interaction matrix
theta
An user specified interaction matrix. It should be a symmetric matrix.
beta
a numeric value that specifies the remaining signal of the interaction matrix
degree
an integer value that specifies the maximum node degree in the interaction matrix
alpha
a numeric value that specifies the minimum signal of the interaction matrix
method
the method used for generating samples. One is the "freq", another is it "gibbs". The former is more suitable when p<18, while the later is more suitable when p > 18.