https://github.com/cran/ensembleBMA
Tip revision: 95cce576eb46ce512c1355769cfdafd8c2af4b02 authored by Chris Fraley on 25 December 2011, 00:00:00 UTC
version 5.0.3
version 5.0.3
Tip revision: 95cce57
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
}