Calculate de log density of a binomial
log_density_binom(y, matrix_id, b_hk, k, var_weights)A dataframe corresponding to a specific id levels from col_id
A design matrix corresponding to a specific id levels from col_id
A matrix of estimated beta
A numeric value to select the beta from a specific cluster
A character value corresponding to the weights variable
res A numeric value