R/ecld-pdf-method.R

#' Calculate the PDF of an ecld object
#'
#' Calculate the PDF of an ecld object
#'
#' @param object an object of ecd class
#' @param x numeric vector of \eqn{x} dimension
#'
#' @return numeric vector of the PDF
#'
#' @keywords pdf distribution
#'
#' @author Stephen H-T. Lihn
#'
#' @export
#'
#' @examples
#' ld <- ecld(lambda=3)
#' x <- seq(-10, 10, by=1)
#' ecld.pdf(ld,x)
### <======================================================================>
"ecld.pdf" <- function(object, x)
{
    y <- ecld.solve(object, x)
    exp(y) /ecld.const(object)
}
### <---------------------------------------------------------------------->

Try the ecd package in your browser

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

ecd documentation built on May 10, 2022, 1:07 a.m.