For obtaining the probabilities you can group people with same conditions and filter groups with same condition count.
Assuming n different conditions and for every condition: 1 means a person is suffering from a condition, 0 otherwise:
no_of_cond <- ncol(df) # number of conditions
Evaluate condition_set
and condition_count
for each individual:
df$condition_set <- apply(df, 1, function(x) {if (sum(x)>0) { paste(names(which(x == 1)),collapse = ", ")
} else {return(NA)}
})
df$condition_count <- rowSums(df[,1:no_of_cond])
Grouping people with same conditions and filtering groups with same condition_count
:
library(dplyr)
case_count_df <- function(n) { df_temp <- df %>% group_by_all() %>%
summarise(ppl_count= n()) %>%
filter(condition_count == n)
return (df_temp) }
Summary for people with 2 conditions, others can be obtained similarly:
df_2_cond <- case_count_df(2) %>% ungroup()
df_2_cond$prob <- df_2_cond$ppl_count/sum(df_2_cond$ppl_count)
plot(as.factor(df_2_cond$condition_set), df_2_cond$prob, xlab = 'condition_set',
ylab = 'probability', main = "People with 2 conditions")

Dummy Data:
df <- data.frame(expand.grid( a = rep(c(0,1),2), b = rep(0,3),
c = c(0,1,0), d = c(0,0,1) ))
PS: All above is basic aggregation. For any statistical tests, inferences cross validated would be a better forum.