do_sim {graphPAF} | R 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
[Package graphPAF version 2.0.0 Index]