R/makeBootCIs.R

Defines functions makeBootCIs

Documented in makeBootCIs

#-----------------------------------------------------------------------------
#' Calculate percentile confidence intervals from a matrix of bootstrapped predictions
#' 
#' @param preds matrix of bootstrap predictions where each column is a bootstrap realisation
#' @param quants (\code{default = c(0.025, 0.975)}. Vector of length two of quantiles. 
#' 
#' @examples 
#' \dontrun{
#' makeBootCIs(bootPreds)
#' }
#' @export
#' 

makeBootCIs<-function(preds, quants=c(0.025,0.975)){
  cis<-t(apply(preds, 1,  quantile, probs = quants, na.rm=T ))
}
  
  
lindesaysh/MRSea documentation built on April 26, 2024, 2:42 p.m.