R/gaussian.kernel.R

Defines functions gaussian.kernel

gaussian.kernel <-
function(x, rho = 10)
{
  n <- nrow(x)
  k <- seq_len(n)
  i <- rep(k, times = n)
  j <- rep(k, each = n)
  u <- x[i, , drop = FALSE] - x[j, , drop = FALSE]
  kernel <- matrix(exp(-rho * rowSums(u ^ 2)), n, n)
  kernel
}

Try the lmeVarComp package in your browser

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

lmeVarComp documentation built on May 2, 2019, 8:55 a.m.