R/get_ave.R

Defines functions get_ave

Documented in get_ave

#' @title Calculate AVE (Average Variance Extracted)
#' 
#' @details
#' Internal function. \code{get_ave} is called by \code{plspm}.
#' 
#' @param communality list of communalities for each block
#' @return vector of average variance extracted for each block
#' @keywords internal
#' @template internals
#' @export
get_ave <- function(communality)
{
  # average variance extracted
  sapply(communality, function(x) sum(x) / (sum(x) + sum(1-x)))
}

Try the plspm package in your browser

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

plspm documentation built on March 31, 2023, 11:54 p.m.