Description Usage Arguments Value Examples
View source: R/calculate_group_frequency.R
Generate an ordered data.frame of different disease combinations on the basis of the most frequent or most strongly associated with outcomes.
1 2 3 4 5 6 7 8 | calculate_group_frequency(
unique_combinations,
all_diseases,
outcome_positions,
min_freq = 0,
tots,
use_outcome = FALSE
)
|
unique_combinations |
List of unique combinations of disease positions for a given number of combinations, generated using |
all_diseases |
List of positions associated with each disease, generated using |
outcome_positions |
Numeric vector where each element refers to a record that suffered a particular outcome. |
min_freq |
Number between 0 and 1; minimum proportion of code combinations to be included in the stem. If |
tots |
Numeric, total length of |
use_outcome |
Logical if to use outcome variable for stem generation. |
data.frame ordered from lowest to highest proportion of those suffering outcomes (if outcome_positions
entered) or number of records associated with that combination (if no outcome_positions
entered).
1 2 3 4 5 6 7 8 9 10 | disease_counts = list(c(1), c(1,4), c(1,2,3,4), c(1))
unique_pos = structure(c(1, 1, 1, 2, 2, 3, 2, 3, 4, 3, 4, 4), .Dim = c(6L, 2L))
calculate_group_frequency(unique_combinations = unique_pos,
all_diseases = disease_counts,
outcome_positions = 0, tots = 4)
calculate_group_frequency(unique_combinations = unique_pos,
all_diseases = disease_counts,
outcome_positions = c(0,1,1,0), tots = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.