weightedVariance_matrix: weightedVariance_matrix

Description Usage Arguments Value Examples

View source: R/DCARS.R

Description

The weightedVariance_matrix function calculates a vector of weighted variances for a given data vector, for a matrix of given weights.

Usage

1

Arguments

x

x is a data vector

y

default to NULL, if given, it is ignored

W

weight matrix, values should be between 0 and 1, number of columns should be the same as length(x) and length(y)

Value

vector weighted variances of x for the weights

Examples

1
2
3
x = rnorm(100)
W = weightMatrix(100)
weightedVariance_matrix(x,y,w)

shazanfar/DCARS documentation built on Oct. 14, 2020, 11:11 a.m.