R/esgn.R

Defines functions esgn

Documented in esgn

# Extended Skew Generalized Normal  (ESGN)

#' Extended Skewed Generalized Normal (ESGN) prediction function
#'
#' Generates a prediction based on an ESGN scaled function based on and using nomenclature from Choundhury 2011
#'
#' @param x A vector of values (In the context of the package, a vector of Temperature values)
#' @param h Value of the "h" new scale parameter
#' @param mu Value of the "mu" parameter of the PDF
#' @param sd Value of the "sd" parameter of the PDF
#' @param l1 Value of the "l1" parameter of the CPDF
#' @param l2 Value of the "l2" parameter of the CPDF
#' @param l3 Value of the "l3" parameter of the CPDF
#'
#' @return A vector of predicted values (In the context of the package, a vector of Performance values)
#'
#' @examples
#'
#' @export

esgn <- function(x,h,mu,sd,l1,l2,l3){

  y <- h*2*dnorm(x, mean = mu, sd = sd)*pnorm((l1*x)/(sqrt(1 + l2*(x^2) + l3*(x^4))))

  return(y)

}
ggcostoya/tpcurves2 documentation built on Jan. 1, 2021, 2:19 a.m.