M-step : update of beta parameters
update_beta(formula, df, k, col_id, tau, m, w_inv, z, matrix_id)A character formula with target variable and predictor variables
A dataframe
The numeric value of the specific cluster to be updated
A character value corresponding to id column name
A matrix of dimension : rows number is the number of cluster K, columns number is the number of distinct levels id
A numeric iterative value
An inverse matrix representing the W matrix in the beta equation for the M step
Working data in the EM algorithm
A list of design matrices filter by id levels
result_beta Estimated beta for cluster k