Nothing
#' Certainty Equivalent Function with Power Utility Function
#'
#' @param profit \code{data.frame} with profit values
#' @param rac scalar of RAC value
#' @param weight original wealth
#'
#' @return Scalar with the CE value
#'
ce_p <- function(profit,rac,weight=0){
profit <- as.matrix(profit)
if(rac == 0){
CEpower <- mean(profit,na.rm=T)
} else {
su <- sum((profit+weight)^(1-rac), na.rm=T)
CEpower <- ((su/length(profit))^(1/(1-rac))) - weight
}
return(CEpower)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.