denoise: Coefficients of the denoised comparison density estimator

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/LPBkg.R

Description

Selects the largest coefficients according to the AIC or BIC criterion.

Usage

1
denoise(LP, n, method)

Arguments

LP

Original vector of coefficients estimates. See details.

n

The dimension of the sample on which the estimates in LP have been obtained.

method

Either “AIC” or “BIC”. See details.

Details

Give a vector of M coefficient estimates, the largest is selected according to the AIC or BIC criterion as described in Algeri, 2019 and Mukhopadhyay, 2017.

Value

Selected coefficient estimates.

Author(s)

Sara Algeri

References

S. Algeri, 2019. Detecting new signals under background mismodelling. <arXiv:1906.06615>.

S. Mukhopadhyay, 2017. Large-scale mode identification and data-driven sciences. Electronic Journal of Statistics 11 (2017), no. 1, 215–240.

See Also

Legj.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#generating data
x<-rnorm(1000,10,7)
xx<-x[x>=10 & x<=20]

#create suitable postulated quantile function
G<-pnorm(20,5,15)-pnorm(10,5,15)
g<-function(x){dnorm(x,5,15)/G}

#Vectorize quantile function
g<-Vectorize(g)
u<-g(xx)

Mmax=20
S<- as.matrix(Legj(u=u,m=Mmax))
n<-length(u)

LP <- apply(S,FUN="mean",2)

denoise(LP,n=n,method="AIC")

LPBkg documentation built on Oct. 5, 2019, 1:05 a.m.

Related to denoise in LPBkg...