powered by
tightness function used to minimized the tightness as a function of the value of k
tightness
tightness(samp = NULL, prob = NULL, quant = NULL, k = NULL)
Returns the squared difference between the tightness and 1
Sample of data to model
Probability of interest
Quantile of interest
value of k to check tightness
samp <- rnorm(1e3, mean = 100, sd = 10) prob <- c(1-1e-2) k <- 1:100 quant <- qnorm(p = prob, mean = 100, sd = 10) tightness(samp = samp, prob = prob, quant = quant, k = k)
Run the code above in your browser using DataLab