get_lpdf: Select a log-probability density function

Description Usage Arguments Details Value

View source: R/bayesian.R

Description

Choose a log-probability density function from the family of Gossett's t-distributions (including the normal distribution as a special case).

Usage

1

Arguments

df

Degrees of freedom for the distribution.

Details

The t-distributions are parameterized by a parameter ν called the "degrees of freedom". Despite the name, this parameter need not be an integer; however, it must be positive. The smaller ν is, the heavier the tails of the distribution. In the limit that ν \rightarrow ∞, the distribution becomes equivalent to the normal distribution. Therefore, as a special case, passing df = Inf will return a normal distribution.

The function returned from this generator should be called with a vector of differences between the model data and observed data, and a vector of scale factors sigma. Together, these will be used to compute t-scores; that is, scaled differences between the model data and observed data: t = (M-O)/σ.

The scaling factor σ is a parameter of the probability model. Since the scales of the observed and model values depend on the commodity and/or region, this will be a vector of the same length as the difference vector.

Value

A function lp(model-observation, sigma)


JGCRI/gcamland documentation built on Oct. 6, 2020, 5:30 p.m.