w.skewness: weighted coefficient of skewness

Description Usage Arguments Value Warning Author(s) Examples

Description

Assume that x=(x_1, x_2, \cdots , x_n) is the observed value of a random sample from a fuzzy population. In classical and usual random sample, the degree of belonging x_i into the random sample is equal to 1, for 1 ≤q i ≤q n. But considering fuzzy population, we denote the degree of belonging x_i into the fuzzy population (or into the observed value of random sample) by μ_i which is a real-valued number from [0,1]. Therefore in such situations, it is more appropriate that we show the observed value of the random sample by notation \{ (x_1, μ_1), (x_2, μ_2), \cdots , (x_n, μ_n) \} which we called it real-valued fuzzy data. The goal of w.skewness function is computing the coefficient of skewness (or, the weighted coefficient of skewness) value of x_1, \cdots , x_n based on real-valued fuzzy data \{ (x_1, μ_1), \cdots , (x_n, μ_n) \} by formula

g = \frac{\frac{1}{∑_{i=1}^{n} μ_i} ∑_{i=1}^{n} μ_i ≤ft[ x_i - \bar{x} \right]^3}{s^3}.

Usage

1
w.skewness(x, mu)

Arguments

x

A vector-valued numeric data which you want to compute its weighted coefficient of skewness.

mu

A vector of weights. The length of this vector must be equal to the length of data and each element of it is belongs to interval [0,1].

Value

The weighted coefficient of skewness for the vector x, by considering weights vector mu, is numeric or a vector of length one.

Warning

The length of x and mu must be equal. Also, each element of mu must be in interval [0,1].

Author(s)

Abbas Parchami

Examples

1
2
3
4
5
6
x <- c(1:10)
mu <- c(0.9, 0.7, 0.8, 0.7, 0.6, 0.4, 0.2, 0.3, 0.0, 0.1)
w.skewness(x, mu)

## The function is currently defined as
function(x, mu)  ( sum( mu*(x-w.mean(x,mu))^3 ) / sum(mu) ) / w.sd(x,mu)^3

Example output

[1] 0.6722584
function (x, mu) 
(sum(mu * (x - w.mean(x, mu))^3)/sum(mu))/w.sd(x, mu)^3

Weighted.Desc.Stat documentation built on May 1, 2019, 7:06 p.m.