https://github.com/cran/ensembleBMA
Raw File
Tip revision: f5ae722309f273a5b3e5fae294b71d73501cec72 authored by Chris Fraley on 15 July 2013, 00:00:00 UTC
version 5.0.4
Tip revision: f5ae722
subset.ensembleBMAgamma.R
`[.ensembleBMAgamma` <-
function(x,d) {
#
# copyright 2006-present, University of Washington. All rights reserved.
# for terms of use, see the LICENSE file
#
  d <- as.character(d) 
  if (any(!dateCheck(d))) stop("improperly specified dates")
  m <- match( d, names(x$nIter), nomatch = 0)
  if (any(!m)) stop("dates not matched in model")
  x$training$table <- x$training$table[d]
  x$biasCoefs <- x$biasCoefs[,d,drop = FALSE]
  x$varCoefs <- x$varCoefs[,d,drop = FALSE]
  x$weights <- x$weights[,d,drop = FALSE]
  x$nIter <- x$nIter[d]
  attr(x,"call") <- list(attr(x,"call"), match.call())
  x
}

back to top