R/calcCorOneObs.R

Defines functions `calcCorOneObs`

`calcCorOneObs` <-
function(Z, B, a, newZ) {
  obs = dim(Z)[1]
  newCor = matrix(0, ncol = obs)
  for (i in 1:obs) {
        z <- as.numeric(Z[i,]) 
        newCor[i] <- exp(-sum(B*abs(z-newZ)**a))
  }
  return (newCor)
}

Try the mlegp package in your browser

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

mlegp documentation built on March 18, 2022, 5:29 p.m.