Skip to contents

Skew-Lognormal Deviances

Usage

dev_skewlnorm(x, meanlog = 0, sdlog = 1, shape = 0, res = FALSE)

Arguments

x

A numeric vector of values.

meanlog

A numeric vector of the means on the log scale.

sdlog

A non-negative numeric vector of the standard deviations on the log scale.

shape

A numeric vector of shape.

res

A flag specifying whether to return the deviance residual as opposed to the deviance.

Value

An numeric vector of the corresponding deviances or deviance residuals.

Examples

dev_skewlnorm(exp(-2:2))
#> [1] 4 1 0 1 4
dev_skewlnorm(exp(-2:2), 0, 1, 5)
#> [1] 110.2602054  30.9276319   1.1839294   0.7976357   3.7976351
dev_skewlnorm(exp(-2:2), 0, 1, 5, res = TRUE)
#> [1] -10.5004860  -5.5612617  -1.0880852   0.8931045   1.9487522