Learn R Programming

regmhmm (version 1.0.0)

IRLS_EM: Iterative Reweighted Least Squares for the EM algorithm

Description

Iterative Reweighted Least Squares algorithm for optimizing the parameters in the M-step of the EM algorithm.

Usage

IRLS_EM(X, gamma, Y, beta, family, eps_IRLS, max_N)

Value

A vector representing the estimates of beta.

Arguments

X

A design matrix of size n x p.

gamma

A vector of size n specifying the posterior probability of the hidden states.

Y

A vector of observations of size n.

beta

A vector of size p + 1 specifying the GLM parameters.

family

The family of the response.

eps_IRLS

convergence tolerance in the iteratively reweighted least squares step.

max_N

the maximal number of IRLS iterations.

Examples

Run this code
if (FALSE) {
# Example usage of the function
IRLS_EM_one_step <- IRLS_EM_one(X,
                                gamma,
                                Y,
                                beta,
                                family)
}

Run the code above in your browser using DataLab