edfgen: Generator of weighted empirical CDS.

Description Usage Arguments Value Examples

Description

Generator of weighted empirical CDS.

Usage

1
edfgen(xs, m)

Arguments

xs

a wtsamp or wtcens object representing a sample with distributions of different components.

m

number of the component whose CDF is estimated.

Value

a function with the call f(t) where t is the vector of points at which the estimate is calculated. f(t) returns the vector of estimates.

Examples

1
2
3
4
5
6
7
8
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)
F1<-edfgen(xs,1) # generate the estimate for 1-st component
F1(0)            # 0.5289866 approximately 0.5
plot(F1,-3,3) # plot the estimate (approx. standard normal CDF )

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