R/vfcfaj.R

Defines functions vfalihaq vfjoe

Documented in vfalihaq vfjoe

#' @export vfalihaq
#'
vfalihaq <- function(C, u, tht){
  # Ali–Mikhail–Haq
	r = (C*(1 - tht*(1 - u))/(u - tht*C*(1 - u)))
	return(ifelse(r > 1, NaN, ifelse(r < 0, NaN, r)))
}

#' @export vfjoe
#'
vfjoe <- function(C, u, tht){
  # tht >= 1
  r = (1 - (((1 - C)^tht - (1 - u)^tht)/(1 - (1 - u)^tht))^(1/tht))
  return(ifelse(r > 1, NaN, ifelse(r < 0, NaN, r)))
}

Try the vfcp package in your browser

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

vfcp documentation built on May 2, 2019, 2:52 p.m.