causal_effect: Causal Effect Identification

View source: R/causal_effect.R

causal_effectR Documentation

Causal Effect Identification

Description

Identify a causal effect of the form P(y|do(x),z) from P(v) in G.

Usage

causal_effect(g, y, x = character(0), z = character(0), v = integer(0))

Arguments

g

A dag object depicting the causal diagram G.

y

A character vector of response variables Y.

x

A character vector of intervention variables X.

z

An optional character vector of conditioning variables Z.

v

An optional named integer vector giving the value assignments for observed variables in the model, i.e. V = v or for a subset of V.

Value

An object of class query which is a list with the following components:

  • id
    A logical value that is TRUE if the query is identifiable and FALSE otherwise.

  • formula
    A functional object expressing the causal effect in terms of the joint probability distribution P(v) for identifiable queries or NULL if the query is not identifiable.

  • data
    The available data, for causal_effect this is always "observations"

  • causaleffect
    The original query P(y|do(x),z) as a probability object.

  • undefined
    A logical value, this is always FALSE for causaleffect


santikka/cfid documentation built on July 17, 2024, 5:16 p.m.