calculate.density: Calculate the density for a distribution

calculate.densityR Documentation

Calculate the density for a distribution

Description

Calculate the density for a distribution

Usage

calculate.density(dist, x, log = F, n.sim = 1000)

Arguments

dist

An object of class Distribution or a subclass

x

The values of the parameters at which to calculate the density. May be either a vector, if the density at a single point is desired, or a matrix where each row represents one point and each column represents a variable in the distribution

log

A logical indicating whether to return the density on the log scale

n.sim

If the values are to be calculated by random sample generation, how many random samples to generate

Details

Note to developers: This function should not be overridden directly. Insteady override do.calculate.density

Value

If x is a vector, a scalar density. If x is a matrix, a numeric vector of densities, one for each row in x


tfojo1/distributions documentation built on July 27, 2024, 3:29 p.m.