plearn.moral: Learning Moral graph based on p-learning algorithm.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/plearn.moral.R

Description

Construct moral graph of Bayeisan network for mixed types of random varaibles based on p-learning algorithm. Each variable in the dataset can be either binary or Gaussian distributed.

Usage

1
2
plearn.moral(data, gaussian.index = NULL, binary.index = NULL,
alpha1 = 0.1, alpha2 = 0.02, restrict = FALSE, score.only=FALSE)

Arguments

data

The data matrix, of dimensions nxp. Each row is an observation vector and each column is a variable.

gaussian.index

The index vector of Gaussian nodes. The default value is NULL. If not specified, the system will automatically determine the index for each variable.

binary.index

The index vector of binary nodes. The default value is NULL. If not specified, the system will automatically determine the index for each variable.

alpha1

The significant level of correlation screening in p-learning algorithm. The default value is 0.1.

alpha2

The significant level of partial correlation screening in p-learning algorithm. The dafault value is 0.02.

restrict

Should edge restriction applied? (logical). If TRUE, we assume that there should be no edge among binary variables. The default is FALSE.

score.only

If TRUE, it only reports z-scores for all pair of variables. The default is FALSE.

Details

This is the function that implements the p-learning algorithm for learning moral graph of Bayesian Network with mixed type of random variables.

Value

A list of two objects.

moral.matrix

The estimated adjacency matrix of moral graph.

score

The estimated z-scores for all pair of variables.

Author(s)

Suwa Xu Bochao Jia and Faming Liang

References

Xu, S., Jia, B., and Liang, F. (2018). Learning Moral Graphs in Construction of High-Dimensional Bayesian Networks for Mixed Data. Submitted.

Examples

1
2
3
 library(equSA)
 data.graph <- DAGsim(n = 200, p = 100, type="AR(2)", p.binary = 50)$data
 plearn.moral(data.graph, alpha1 = 0.1, alpha2 = 0.02)

equSA documentation built on May 6, 2019, 1:06 a.m.