do_sim | R Documentation |
Internal: Simulate a column from the post intervention distribution corresponding to eliminating a risk factor
do_sim(colnum, current_mat, model, SN = TRUE)
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. |
An updated data frame (a new version of current_mat) with a new column simulated
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.