npnormfc: Mon-parametric method and components fixed when the component...

Description Usage Arguments Details Value Examples

Description

Compute the non-parametric mixing distrbution with components fixed

Usage

 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
31
32
33
34
35
36
37
38
39
40
41
42
43
npnormfc.ll(
  data,
  mu0 = 0,
  pi0 = 0,
  stdev = NULL,
  mix = NULL,
  order = FALSE,
  maxit = 1000,
  tol = 1e-06
)

npnormfc.sq(
  data,
  mu0 = 0,
  pi0 = 0,
  stdev = NULL,
  mix = NULL,
  order = FALSE,
  maxit = 100,
  tol = 1e-06
)

npnormfc.cvm(
  data,
  mu0 = 0,
  pi0 = 0,
  stdev = NULL,
  mix = NULL,
  order = FALSE,
  maxit = 100,
  tol = 1e-06
)

npnormfc.ad(
  data,
  mu0 = 0,
  pi0 = 0,
  stdev = NULL,
  mix = NULL,
  order = FALSE,
  maxit = 100,
  tol = 1e-06
)

Arguments

data

the vector of observation to compute the mixing distribution

mu0

the vector of fixed support points

pi0

the vector of probabilities corresponding to support points

stdev

the standard deviation of the component density

mix

the initial mixing distribution

order

the digit to round down the observations. If FALSE, no binning is performed.

maxit

the maximum iterations allowed.

tol

the tolerence. Stop if the directional derivative is less than tol

Details

This function uses the non-parametric method to compute the mixing distribution based on various losses with components fixed when the density is normal.

npnormfc.sq computes the mixing distribution under squared error loss.

npnormfc.cvm computes the mixing distribution under cramer-von Mises loss

npnormfc.ll computes the mixing distribution under KL divergence (Maximum likelihood)

npnormfc.ad computes the mixing distribution under Anderson-Darling loss.

Value

the nspmix object with ll meaning the loss.

Examples

1
2
3
4
5
6
7
8
9
data = rnorm(100, c(0, 2))
npnormfc.ll(data, mu0 = 0, pi0 = 0.2)
npnormfc.sq(data, mu0 = 0, pi0 = 0.2)
npnormfc.cvm(data, mu0 = 0, pi0 = 0.2)
npnormfc.ad(data, mu0 = 0, pi0 = 0.2)
datalarge = rnorm(1e5, c(0, 2))
npnormfc.cvm(datalarge, order = -2)
npnormfc.ad(datalarge, order = -2)
npnormfc.ll(datalarge, order = -2)

xiangjiexue/npfixedcomp documentation built on June 15, 2020, 9:18 a.m.