dplateau: Distribution for the magnitude of ascending and descending...

dplateauR Documentation

Distribution for the magnitude of ascending and descending plateau magnitude coefficients

Description

dplateaumags and rplateaumags provide the required information for defining the distribution for the magnitude of ascending and descending plateau magnitude coefficients. dplateaumags defines the probability density function and rplateaumags defines a function for generating random samples from this distribution. They can be used directly from R or in nimble models.

Usage

dplateaumags(x, prec, rho, log = 0)

rplateaumags(n, prec, rho)

Arguments

x

Numeric vector of length 2 with the first element containing the value of the ascending magnitude coefficient and the second element containing the value of the descending magnitude coefficient

prec

Scalar double containing the precision hyperparameter to control the scale of the magnitude coefficients

rho

Scalar double containing the correlation coefficient of the ascending and descending magnitude coefficients

log

Logical scalar which if TRUE (default) results in the return of the log probability density. Otherwise output will be on the natural scale

n

Number of random draws. Currently only n = 1 is supported, but the argument exists for standardization of "r" functions.

Value

For dplateaumags the probability density (on the log or natural scale depending on the value used for log) is return as a numeric scalar. For rplateaumags a vector of length two is returned with the first element containing the magnitude coefficient for the ascending portion and the second element containing the magnitude coefficient for the descending portion.

Author(s)

Joseph D. Chipperfield, joechip90@googlemail.com

See Also

h.plateau


joechip90/PaGAn documentation built on April 17, 2025, 4:05 p.m.