Learn R Programming

admix (version 2.1-3)

PatraSen_dist_calc: Compute the distance to be minimized using Patra and Sen estimation technique in admixture models

Description

Compute the distance to be minimized using Patra and Sen estimation technique by integrating along some given grid the appropriate distance. For further developments, see 'Details' below.

Usage

PatraSen_dist_calc(data, gridsize = 200)

Value

a list containing the evaluated distance and some additional information.

Arguments

data

Sample where the known component density of the admixture model has been transformed into a Uniform(0,1) distribution.

gridsize

Gridsize to make the computations.

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.

Examples

Run this code
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 = 3000, 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))
PatraSen_dist_calc(data = data1_transfo, gridsize = 200)

Run the code above in your browser using DataLab