ry_momentProb: Arbitrary moment

Description Usage Arguments Examples

Description

This function returns order-th weighted sample moment.

Usage

1
ry_momentProb(x, p, order = 1, center = FALSE)

Arguments

x

is a numeric vector.

p

is a numeric vector of weight of x elements

order

is order of moment.

center

is logical; when TRUE, moment is around mean and otherwise zero.

Examples

1
2
3
4
5
n <- 10
x <- runif(n)
p <- runif(n)
p <- p/sum(p)
out <- ry_momentProb(x,p,oder=2,center=TRUE)

ryamada22/Ronlyryamada documentation built on May 28, 2019, 10:43 a.m.