ziSIMY: Exhaustive search using BIC for DAGs for zero-inflated data...

Description Usage Arguments Details Value Examples

View source: R/zero_est_graph.R

Description

Exhaustive search using BIC for DAGs for zero-inflated data based on Hurdle conditionals.

Usage

1
ziSIMY(V, Y, parametrization, verbose = FALSE, control = list())

Arguments

V

A matrix of 0/1s, equal to Y != 0.

Y

A data matrix of the same size as V.

parametrization

A string, either "abk" (canonical) or "pms" (moment).

verbose

A logical, whether to print intermediate steps.

control

A list passed to zi_fit(). Please consult ?zi_fit.

Details

Performs exhaustive DAG search (using BIC) for DAGs for zero-inflated data based on Hurdle conditionals. See Silander and Myllymaki (2006) or ?pcalg::simy for details. However, unlike the Gaussian case in their implementation that returns an equivalence class of DAGs, the DAG estimated by this function is exact.

Value

An adjacency matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
m <- 4; n <- 1000
adj_mat <- ZiDAG::make_dag(m, mode = "chain", shuffle=TRUE)
d <- ZiDAG::gen_zero_dat(seed=1, gen_para="pms", adj_mat=adj_mat, n=n, gen_uniform_degree=1)
est <- ZiDAG::ziSIMY(V=d$V, Y=d$Y, parametrization="pms", verbose=FALSE,
    control=list("max_uniform_degree"=1L, "tol"=1e-8, "print_best_degree"=FALSE))
adj_mat == est

d <- ZiDAG::gen_zero_dat(seed=1, gen_para="abk", adj_mat=adj_mat, n=n, gen_uniform_degree=1)
est <- ZiDAG::ziSIMY(V=d$V, Y=d$Y, parametrization="abk", verbose=FALSE,
    control=list(use_C=TRUE, maxit=1000, runs=2, report=0))
adj_mat == est

est <- ZiDAG::ziSIMY(V=d$V, Y=d$Y, parametrization="pms", verbose=FALSE,
    control=list("max_uniform_degree"=1L, "tol"=1e-8, "print_best_degree"=FALSE))
adj_mat == est

est <- ZiDAG::ziSIMY(V=d$V, Y=d$Y, parametrization="pms", verbose=FALSE,
    control=list("max_uniform_degree"=2L, "tol"=1e-8, "print_best_degree"=FALSE))
adj_mat == est

sqyu/ZiDAG documentation built on Jan. 19, 2021, 4:11 p.m.