Learn R Programming

sn (version 0.30)

sn.dev.gh: Derivatives of deviance for skew-normal distributions

Description

Computes first and second derivatives of twice the negative log-likelihood (the "deviance") for regression models with errors having a skew-normal distribution.

Usage

sn.dev.gh(cp, X, y, trace=FALSE, hessian=FALSE)

Arguments

cp
a vector of initial values for the centred parameters, with length(cp)=ncol(X)+2
X
a matrix of explanatory variables. Missing values (NAs) are not allowed.
y
a vector contaning the observed variable. Missing values (NAs) are not allowed.
trace
logical value. If trace=TRUE, details are printed. Default value is F.
hessian
logical value. If hessian=TRUE, the Hessian is computed. Default value is F.

Value

  • a vector containing the gradient; if hessian=TRUE, this is given an attribute containing the Hessian matrix

Details

This function produces of derivatives of the objective function of sn.mle, whose documentation gives additional details.

See Also

sn.mle, sn.dev,msn.mle