get_event_probabilities: Draw event probabilities

View source: R/get_event_prob.R

get_event_probabilitiesR Documentation

Draw event probabilities

Description

'get_event_probabilities' draws event probability vector 'w' given a single realization of parameters

Usage

get_event_probabilities(
  model,
  parameters = NULL,
  A = NULL,
  P = NULL,
  given = NULL
)

Arguments

model

A causal_model. A model object generated by make_model.

parameters

A vector of real numbers in [0,1]. Values of parameters to specify (optional). By default, parameters is drawn from model$parameters_df.

A

A data.frame. Ambiguity matrix. Not required but may be provided to avoid repeated computation for simulations.

P

A data.frame. Parameter matrix. Not required but may be provided to avoid repeated computation for simulations.

given

A string specifying known values on nodes, e.g. "X==1 & Y==1"

Value

An array of event probabilities

Examples


model <- make_model('X -> Y')
get_event_probabilities(model = model)
get_event_probabilities(model = model, given = "X==1")
get_event_probabilities(model = model, parameters = rep(1, 6))
get_event_probabilities(model = model, parameters = 1:6)



CausalQueries documentation built on June 22, 2024, 6:50 p.m.