BestM {LPBkg} | R Documentation |
Chooses the size of the polynomial basis
Description
Computes the deviance p-values considering different sizes of the polynomial basis and selects the one for which the deviance p-value is the smallest.
Usage
BestM(data, g, Mmax = 20, range = c(min(data),max(data)))
Arguments
data |
A vector of data. See details. |
g |
The postulated model from which we want to assess if deviations occur. |
Mmax |
The maximum size of the polynomial basis from which a suitable value |
range |
Range of the data/ search region considered. |
Details
The argument data
collects the data for which we want to test if deviations occur from the postulated model specified in the argument g
. As in Algeri, 2019, the sample specified under data
corresponds to the source-free sample in the background calibration phase and to the physics sample in the signal search phase.
The value M
selected determines the smoothness of the estimated comparison density, with smaller values of M leading to smoother estimates. The deviance test is used to select the value M
which leads to the most significant deviation from the postulated model. The default value for Mmax
is set to 20. Notice that numerical issues may
arise for larger values of Mmax
.
Value
pvals |
The deviance test p-value obtained for each values of |
minp |
The minimum value of the deviance p-values observed. |
Msel |
The value of |
Author(s)
Sara Algeri
References
S. Algeri, 2019. Detecting new signals under background mismodelling <arXiv:1906.06615>.
See Also
Examples
#Generating data
x<-rnorm(1000,10,7)
data<-x[x>=10 & x<=20]
#Create suitable postulated quantile function of data
G<-pnorm(20,5,15)-pnorm(10,5,15)
g<-function(x){dnorm(x,5,15)/G}
Mmax=10
range=c(10,20)
BestM(data,g,Mmax,range)