Compute by Patra and Sen technique the estimate of f.s (density corresponding to F.s) when f.s is known to be either decreasing or increasing.

PatraSen_density_est(input, dec.density = TRUE)

Arguments

input

an R object of class 'cv.mixmodel' or 'mixmodel'.

dec.density

a boolean indicating whether the density is increasing or decreasing.

Value

an estimator of the unknown component density.

Details

See Patra, R.K. and Sen, B. (2016); Estimation of a Two-component Mixture Model with Applications to Multiple Testing; JRSS Series B, 78, pp. 869--893.

Author

Xavier Milhaud xavier.milhaud.research@gmail.com

Examples

comp.dist <- list(f = 'norm', g = 'norm') comp.param <- list(f = list(mean = 3, sd = 0.5), g = list(mean = 0, sd = 1)) data1 <- rsimmix(n = 2000, unknownComp_weight = 0.6, comp.dist, comp.param)[['mixt.data']] data1_transfo <- knownComp_to_uniform(data = data1, comp.dist = list(comp.dist$f, comp.dist$g), comp.param = list(comp.param$f, comp.param$g)) res <- PatraSen_cv_mixmodel(data = data1_transfo, folds = 3, reps = 1, cn.s = NULL, cn.length = 3, gridsize = 200)
#> Warning: Make sure that data is transformed such that the known component is Uniformly(0,1) distributed.
PatraSen_density_est(res, dec.density = TRUE)
#> $x #> [1] 0.0002285724 0.0002285724 0.9999993800 0.9999993800 #> #> $y #> [1] 0.0000000 0.9996695 0.9996695 0.0000000 #>