R/SSR.R

#' SSR
#' to be documented
#' @usage SSR(model)
#' @param model  to be documented
#' @noRd
#' @return to be documented
SSR <-
function (model)
{
    term1 = 0
    term2 = 0
    if (!is.null(model$XV))
        term1 <- rowSums(model$XV * model$Betav)
    if (!is.null(model$XC))
        term2 <- model$XC %*% as.matrix(model$Betac)
    residuals <- model$Y - term1 - term2
    sum(residuals^2)
}

Try the mgwrsar package in your browser

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

mgwrsar documentation built on April 17, 2023, 9:09 a.m.