Weighted.Desc.Stat-package: Weighted Descriptive Statistics

Description Details Author(s) Examples

Description

Weighted Descriptive Statistics is an open source (LGPL 3) package for R which provides descriptive statistical methods to deal with weighted data. 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 or weighted data. Weighted descriptive statistics is the discipline of quantitatively describing the main features of a real-valued fuzzy data which usually given from a fuzzy population.

Details

The weighted descriptive statistics provide a concise summary a set of real data x=(x_1, x_2, \cdots , x_n) on the basis of the vector weight μ=(μ_1, μ_2, \cdots , μ_n). By Weighted.Desc.Stat package, one can easily summarize real-valued fuzzy data numerically or graphically using this package. Calculating numerically summarize is possible by some weighted statistics in this package (such as mean, variance, covariance, correlation coefficent and etc) that summarize and interpret some of the properties of one or several sets of real-valued fuzzy data (real-valued fuzzy samples). Also, graphically interpretation can be drown by weighted histogram and weighted scatter plot using this package to describe properties of real-valued fuzzy data set.

Author(s)

Abbas Parchami

Maintainer: Abbas Parchami <parchami@uk.ac.ir>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## Weighted statistics for one variable (property):
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.mean(x, mu)
w.sd(x, mu)
w.var(x, mu)
w.ad(x, mu)
w.cv(x, mu)
w.skewness(x, mu)
w.kurtosis(x, mu)

## Weighted covariance, weighted correlation coefficent and weighted scatter
## plot for two variables (properties):
n=50
x =  rnorm(n,0,1)
y =  rnorm(n,0,1)
mu =  runif(n,0,1)
w.cov(x, y, mu)
w.r(x, y, mu)
w.plot(x, y, 0.3, mu, lwd=2)

## Weighted histogram for one variable (property):
n = 5000
x = rnorm(n,17,1)
x[x<14 | x>20] = NA
range(x)
mu = runif(n,0,1)
bre = seq(from=14,to=20,len=18)
cu = seq(from=0,to=1,len=10)
w.hist(x, mu, breaks=bre, cuts=cu, ylim=c(0,n/7), lwd = 2)

Example output

[1] 3.765957
[1] 2.252306
[1] 5.072884
[1] 1.846084
[1] 0.59807
[1] 0.6722584
[1] -0.1852421
[1] -0.1471276
[1] -0.1513229
[1] NA NA

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