bbn.predict performs predictions using a Bayesian Belief Network (BBN) model,
accommodating multiple priors scenarios and allowing for bootstrapping to assess variability.
bbn.predict(
bbn.model,
...,
boot_max = 1,
values = 1,
figure = 1,
font.size = 5
)Plots of the (BBN) predictions and optionally prints the predicted values.
A matrix or dataframe of interactions between different model nodes.
An X by 2 array of initial changes to the system under investigation.
It requires at least 1 prior scenario (up to 12 priors).
The first column should be a -4 to 4 (including 0) integer value for each node in the network with negative values
indicating a decrease and positive values representing an increase. 0 represents no change.
Note, names included here are included as outputs in tables and figures.
Shortening these names can provide better figures.
The number of bootstraps to perform. Suggested range for exploratory analysis 1-1000.
For final analysis recommended size = 1000 - 10000 - note, this can take a long time to run.
Default value is 1, running with no bootstrapping - suitable for exploration of data and error checking.
This provides a numeric output of posterior values and any confidence intervals.
Default value 1. Set to 0 to hide this output.
Sets the figure options. Default value 1. 0 = no figures produced. 1 = figure is saved in working directory as a PDF file (note, this is overwritten if the name is not changed, and no figure is produced if the existing PDF is open when the new one is generated). 2 = figure is produced in a graphics window. All figures are combined on a single plot where scenario 2 is below scenario 1 (i.e. scenarios work in columns then rows)
Font size for the plot labels. Defaults to 5.
Supports input of multiple priors through ellipsis().
Allows bootstrapping with a specified number of maximum iterations to assess prediction variability.
Generates plots for visual representation of the predictions.
data(my_BBN, combined)
# Run the prediction
bbn.predict(bbn.model = my_BBN, priors1 = combined, boot_max=100, values=1, figure=1, font.size=5)
Run the code above in your browser using DataLab