set_parameter_matrix: Set parameter matrix

View source: R/set_parameter_matrix.R

set_parameter_matrixR Documentation

Set parameter matrix

Description

Add a parameter matrix to a model

Usage

set_parameter_matrix(model, P = NULL)

Arguments

model

A causal_model. A model object generated by make_model.

P

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

Value

An object of class causal_model. It essentially returns a list containing the elements comprising a model (e.g. 'statement', 'nodal_types' and 'DAG') with the parameter matrix attached to it.

Examples

model <- make_model('X -> Y')
P <- diag(8)
colnames(P) <- rownames(model$causal_types)
model <- set_parameter_matrix(model, P = P)

CausalQueries documentation built on Oct. 20, 2023, 1:06 a.m.