do.calculate.density: Internal function for subclasses to calculate the density for...

do.calculate.densityR Documentation

Internal function for subclasses to calculate the density for a distribution

Description

This function is provided to be overriden by developers. End users should instead call calculate.density

Usage

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

Arguments

dist

An object of class Distribution or a subclass

x

A matrix where each row represents one point and each column represents a variable in the distribution (the wrapper matches variable names before passing to this function)

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

The wrapper calculate.density takes care of matching variable names and of formatting the return value

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.