calculate_conditional_prob {stCEG} | R Documentation |
Calculate Conditional Probability in a Chain Event Graph (CEG)
Description
This function calculates the conditional probability of a specified group of conditions occurring, given a set of unique values, based on the calculated path products.
Usage
calculate_conditional_prob(
path_df,
unique_values,
selected_indices,
last_group
)
Arguments
path_df |
A data frame containing paths and their corresponding products,
as returned by the |
unique_values |
A character vector containing the unique values (e.g., labels or categories) to condition on. |
selected_indices |
A numeric vector of indices corresponding to the groupings of the unique values. |
last_group |
A string representing the last group for which the conditional probability is to be calculated. |
Value
A numeric value representing the conditional probability P(last_group | unique_values).
[Package stCEG version 0.1.0 Index]