Skip to contents

Skew-Lognormal Deviances

Usage

dev_skewlnorm(
  x,
  locationlog = 0,
  scalelog = 1,
  shapelog = 0,
  res = FALSE,
  ...,
  meanlog,
  sdlog,
  shape
)

Arguments

x

A numeric vector of values.

locationlog

A numeric vector of location parameters of log(x).

scalelog

A non-negative numeric vector of scale parameters of log(x).

shapelog

A numeric vector of shape parameters of log(x). Negative values result in leftward skew, while positive values result in rightward skew.

res

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

...

Other arguments passed to methods.

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 non-negative numeric vector of shape.

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