R/band.chol.R

Defines functions band.chol

Documented in band.chol

band.chol <-
function(x,k, centered=FALSE, method=c("fast", "safe"))
{
  n=dim(x)[1]
  method=match.arg(method)  
  if (!centered)
  {
    mx=apply(x, 2, mean)
    x=scale(x, center=mx, scale=FALSE)
  }
  if(method=="fast")
  {
    sigma=fast.band(x=x, k=k)
  } else
  {
    sigma=safe.band(x=x, k=k)
  }
  return(sigma)
}

Try the PDSCE package in your browser

Any scripts or data that you put into this service are public.

PDSCE documentation built on June 23, 2022, 9:12 a.m.