R/pdef.R

Defines functions pdef

Documented in pdef

# Function to ensure the spectrum is positive definite.

pdef <- function(spec, W = 1e-10){
  if(!is.mvLSW(spec)){
    spec = as.mvLSW(spec, filter.number = 1, family = "DaubExPhase")
  }

  AdjPositiveDef = getFromNamespace("AdjPositiveDef","mvLSW")

  spec = AdjPositiveDef(spec, W)
  return(spec)
}

Try the mvLSWimpute package in your browser

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

mvLSWimpute documentation built on Aug. 16, 2022, 5:06 p.m.