R/RACa.R

#' Adjusted Risk Aversion Coefficient (RACa)
#'
#' @param rac An scalar with the value of the relative RAC
#' @param data Dataset to weight the RAC
#'
#' @return This function create an adjustment to the relative risk
#' aversion coefficient, following Hardaker et al (2004).

RACa <- function(rac,data){

  maxim <- max(data)
  RAC   <- 1 - rac*10^(nchar(abs(as.integer(maxim)))-1)

  return(RAC)
}

Try the ceRtainty package in your browser

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

ceRtainty documentation built on June 14, 2019, 5:04 p.m.