estimate_latent_count: Estimate number of latent confounders Compute the true casual...

View source: R/utils.R

estimate_latent_countR Documentation

Estimate number of latent confounders Compute the true casual effects of a simulated dag

Description

This function takes a DAG with edgeweights as input and computes the causal effects of all nodes on all direct and indirect children in the DAG. Alternatively see pcalg::causalEffect for pairwise computation.

Usage

estimate_latent_count(X1, X2, method = "auto")

Arguments

X1

data matrix corresponding to the first condition

X2

data matrix corresponding to the second condition

method

a string indicating the method used for estimating the number of latent variables

Value

estimated number of latent variables

Author(s)

Domagoj Ćevid

Examples

graph1 <- create_random_DAG(node_num = 100, prob = .1)
graph2 <- resample_edge_weights(graph1, tp=0.15)
X1 <- simulate_data(graph1, n=200, latent = 3)
X2 <- simulate_data(graph2, n=200, latent = 3)
estimate_latent_count(X1, X2)

cbg-ethz/dce documentation built on Oct. 29, 2022, 8:14 a.m.