sum_weighted_bpr_lik: Sum of weighted BPR log likelihoods

Description Usage Arguments Value See Also

Description

sum_weighted_bpr_lik computes the sum of the BPR log likelihoods for each elements of x, and then weights them by the corresponding posterior probabilities. This function is mainly used for the M-Step of the EM algorithm bpr_EM.

Usage

1
sum_weighted_bpr_lik(w, x, des_mat, post_prob, is_NLL = TRUE)

Arguments

w

A vector of parameters (i.e. coefficients of the basis functions)

x

A list of elements of length N, where each element is an L x 3 matrix of observations, where 1st column contains the locations. The 2nd and 3rd columns contain the total trials and number of successes at the corresponding locations, repsectively.

des_mat

A list of length N, where each element contains the L x M design matrices, where L is the number of observations and M the number of basis functions.

post_prob

A vector of length N containing the posterior probabilities fore each element of list x, respectively.

is_NLL

Logical, indicating if the Negative Log Likelihood should be returned.

Value

The weighted sum of BPR log likelihoods

See Also

bpr_likelihood, bpr_EM


andreaskapou/mpgex documentation built on May 12, 2019, 3:33 a.m.