do_sim: Internal: Simulate a column from the post intervention...

View source: R/joint_PAF.R

do_simR Documentation

Internal: Simulate a column from the post intervention distribution corresponding to eliminating a risk factor

Description

Internal: Simulate a column from the post intervention distribution corresponding to eliminating a risk factor

Usage

do_sim(colnum, current_mat, model, SN = TRUE)

Arguments

colnum

The column indicator for the variable being simulated

current_mat

The current value of the data frame

model

A fitted model for simulating values of the variable, given the parent values

SN

Logical. If TRUE (default) simulations are achieved via adding the original model residuals, to the new fitted values based on the updated values of parents in current_mat.

Value

An updated data frame (a new version of current_mat) with a new column simulated


graphPAF documentation built on May 29, 2024, 10:21 a.m.

Related to do_sim in graphPAF...