R/mc_core_pearson.R

Defines functions mc_core_pearson

Documented in mc_core_pearson

#' @title Core of Pearson estimating functions
#' @author Wagner Hugo Bonat
#'
#' @description Core of the Pearson estimating function.
#'
#' @param product A matrix.
#' @param inv_C A matrix.
#' @param res A vector of residuals.
#' @param W Matrix of weights.
#' @return A vector
#' @keywords internal
#' @details It is an internal function.

mc_core_pearson <- function(product, inv_C, res, W) {
    product <- product %*% W
    output <- t(res) %*% product %*%
        (inv_C %*% res) - sum(diag(product))
    return(as.numeric(output))
}

Try the mcglm package in your browser

Any scripts or data that you put into this service are public.

mcglm documentation built on Sept. 16, 2022, 1:06 a.m.