weightedMean: Calculation of Outlier-Robust Weighted Mean

Description Usage Arguments Value Author(s) Examples

Description

This function calculates the outlier-robust weighted mean in presence of outliers. A kernel weight function has been used in this function.

Usage

1

Arguments

x

a numerical vector of metabolomic measurements.

b

value of tuning parameter. Default value is 0.2.

Value

Computed the weighted mean.

Author(s)

Nishith Kumar <nk.bru09@gmail.com>

Examples

1
2
3
4
5
6
7
set.seed(2345)
x<-c(rnorm(200,3,1)) 
x1<-c(rnorm(180,3,1),rnorm(20,60,3)) #contain 20 outliers#
weightedMean(x)
mean(x)
weightedMean(x1)
mean(x1)

nishithkumarpaul/Rvolcano documentation built on May 19, 2019, 10:49 p.m.