gfun: Gradients of common densities

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Gradients of common density functions in their standard forms, i.e., with zero location (mean) and unit scale. These are implemented in C for speed and care is taken that the correct results are provided for the argument being NA, NaN, Inf, -Inf or just extremely small or large.

Usage

1
2
3
4
5
gnorm(x)

glogis(x)

gcauchy(x)

Arguments

x

numeric vector of quantiles.

Details

The gradients are given by:

These gradients are used in the Newton-Raphson algorithms in fitting cumulative link models with clm and cumulative link mixed models with clmm.

Value

a numeric vector of gradients.

Author(s)

Rune Haubo B Christensen

See Also

Gradients of densities are also implemented for the extreme value distribtion (gumbel) and the the log-gamma distribution (log-gamma).

Examples

1
2
3
4
x <- -5:5
gnorm(x)
glogis(x)
gcauchy(x)

ordinal documentation built on May 2, 2019, 5:47 p.m.