| PatraSen_density_est | R Documentation |
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)
input |
an R object of class 'cv.mixmodel' or 'mixmodel'. |
dec.density |
a boolean indicating whether the density is increasing or decreasing. |
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.
an estimator of the unknown component density.
Xavier Milhaud xavier.milhaud.research@gmail.com
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)
PatraSen_density_est(res, dec.density = TRUE)