Learn R Programming

ergmclust (version 1.0.0)

grad_HMM_stat_dir_re: C++ function for updating the gradient function in a static binary directed network.

Description

The C++ function grad_HMM_stat_dir_re() updates the gradient function when the number of clusters is greater than or equal to 2 in a static binary directed network. (The above description may need further improvement.)

Usage

grad_HMM_stat_dir_re(theta, gamma, network, N, K)

Arguments

theta

Vector of current theta (network canonical parameters) values.

gamma

Vector of current gamma (variational parameters) values.

network

Array of a network adjacency matrices.

N

Number of nodes.

K

Number of clusters.

Value

Returns the gradient vector of ELBO with respect to theta parameters for Newton-Raphson update in the M-step.