var_pop: Population variance

View source: R/deepUtils.r

var_popR Documentation

Population variance

Description

Population variance

Usage

var_pop(x, y = NULL, na.rm = FALSE, use)

Arguments

x

A numeric vector, matrix or data frame.

y

NULL (default) or a vector, matrix or data frame with compatible dimensions to x. The default is equivalent to y = x (but more efficient).

na.rm

A logical value indicating whether missing values should be removed or not (default).

use

An optional character string giving a method for computing covariances in the presence of missing values. This must be (an abbreviation of) one of the strings everything, all.obs, complete.obs, na.or.complete, or pairwise.complete.obs.

Details

The population variance and sample variance, implemented in stats package, differ in the denominator. The value of denominator in the formula for variance in case of population data is n, while it is n-1 for sample data.

Value

The population variance.

See Also

cor.

Other Utils: as_ANN_matrix(), degree(), distance(), list_as_numeric(), probability(), radian(), random_seed(), re.factor(), sd_pop(), similarity(), vector_as_ANN_matrix(), vector_as_numeric()

Examples

  x <- sample(1000)
  var_pop(x)

stschn/deepANN documentation built on June 25, 2024, 7:27 a.m.