R/LocalConvexity.r

Defines functions LocalConvexity

Documented in LocalConvexity

LocalConvexity <- function(x, phi) {
  n <- length(x)
  deriv <- diff(phi) / diff(x)
  conv <- 1:n * 0
  if (n > 2) {
    conv[2:(n - 1)] <- diff(deriv[1:(n - 1)])
  }
  return(matrix(conv, ncol = 1))
}

Try the logcondens package in your browser

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

logcondens documentation built on Aug. 22, 2023, 5:06 p.m.