https://github.com/cran/ensembleBMA
Tip revision: 3323f8b6f9fea8a934b62398bf6af0de151cc290 authored by Chris Fraley on 19 June 2016, 09:47:53 UTC
version 5.1.3
version 5.1.3
Tip revision: 3323f8b
quantBMAnormal.R
quantBMAnormal <-
function(alpha, WEIGHTS, MEAN, SD)
{
#
# copyright 2006-present, University of Washington. All rights reserved.
# for terms of use, see the LICENSE file
#
lower <- min(MEAN-6*SD)
upper <- max(MEAN+6*SD)
if (cdfBMAnormal(lower, WEIGHTS, MEAN, SD, 0) > alpha) return(NA)
if (cdfBMAnormal(upper, WEIGHTS, MEAN, SD, 0) < alpha) return(NA)
z <- uniroot(cdfBMAnormal, lower = lower, upper = upper,
WEIGHTS=WEIGHTS, MEAN=MEAN, SD=SD, offset = alpha)
z$root
}