causnet: Find globally optimal causal network

Description Usage Arguments Value Examples

View source: R/causnet.R

Description

Find globally optimal causal network

Usage

1
causnet(data, alpha = 0.05, max_parents = 2, score_fun = NULL)

Arguments

data

A data.frame of numeric variables.

alpha

Numerical, p-value threshold to determine cutoff for possible parents.

max_parents

Numeric, maximal number of parents. Defaults to 2.

score_fun

A function used for scoring parent sets. For more details see score_fun vignette.

Value

A list with 2 elements: a data data.frame with 3 columns; from, to and component, and a vector of number of best parents.

Examples

1
2
3
set.seed(1)
new_data <- simdat(n_var = 5)
out <- causnet(data = new_data, 0.5)

USCbiostats/causnet documentation built on July 15, 2020, 10:41 a.m.