Learn R Programming

binomialMix (version 1.0.1)

update_beta: M-step : update of beta parameters

Description

M-step : update of beta parameters

Usage

update_beta(formula, df, k, col_id, tau, m, w_inv, z, matrix_id)

Arguments

formula

A character formula with target variable and predictor variables

df

A dataframe

k

The numeric value of the specific cluster to be updated

col_id

A character value corresponding to id column name

tau

A matrix of dimension : rows number is the number of cluster K, columns number is the number of distinct levels id

m

A numeric iterative value

w_inv

An inverse matrix representing the W matrix in the beta equation for the M step

z

Working data in the EM algorithm

matrix_id

A list of design matrices filter by id levels

Value

result_beta Estimated beta for cluster k