R/dlgamma.R

Defines functions dlgamma

Documented in dlgamma

#' @title 
#' Log-Gamma Distribution
#'
#' @description 
#' Density function for log-gamma distribution with parameters 
#' \sQuote{shape} and \sQuote{scale}.
#'
#' @param x a numeric vector of quantiles.
#' @param shape a shape parameter; must be positive.
#' @param rate a scale parameter; must be positive.
#' 
#' @details
#' If \sQuote{rate} is omitted, it assumes the default value is 1.
#'
#' The log-gamma distribution with parameters \sQuote{shape} = a and
#' \sQuote{rate} = 1/scale has density
#' 
#' @section TODO:
#' Add the definition of Log-Gamma in this page
#' 
#' @author Chel Hee Lee <\email{gnustats@@gmail.com}>
#' @export
dlgamma <- function(x, shape, rate=1, scale=1/rate){
  val <- rate^shape/gamma(shape) * exp(shape*x - rate*exp(x))
  return(val)
}
NULL

Try the ipeglim package in your browser

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

ipeglim documentation built on May 2, 2019, 4:31 p.m.