meanw: Calculates the means of all components for a weighted sample.

Description Usage Arguments Value Examples

Description

meanw calculates weighted means of a sample using the individual weights of all components.

Usage

1
meanw(xs)

Arguments

xs

object from class wtsamp containing the sample and weights for components' distributions.

Value

a vector of components' means

Examples

1
2
3
4
5
6
set.seed(3)
p <- genunifp(1000,2) # create mixing probabilities
a <- lsweight(p) # calculate minimax weights
# create a weighted sample:
xs <- wtsamp(genormixt(p,c(0,1),c(1,1)),indiv=a)
meanw(xs)

RostyslavMaiboroda/mixvconc documentation built on June 12, 2019, 12:34 a.m.