Learn R Programming

TAD (version 1.0.1)

weighted_mvsk: Compute the weighted mean, variance, skewness and kurtosis

Description

Compute the weighted mean, variance, skewness and kurtosis of data with given weights

Usage

weighted_mvsk(data, weights)

Value

the list of weighted mean, variance, skewness and kurtosis of the data

Arguments

data

the data

weights

the vector or matrix of weights corresponding to the data (each row corresponding to an iteration of data)

Examples

Run this code

weighted_mvsk(
  data = c(1, 2, 3),
  weights = matrix(data = c(1, 1, 1, 2, 1, 3), nrow = 2, ncol = 3)
)

Run the code above in your browser using DataLab