Learn R Programming

cNORM (version 3.5.0)

log_likelihood_shash: Calculate the negative log-likelihood for a ShaSh regression model

Description

This function computes the negative log-likelihood for a Sinh-Arcsinh regression model where the location, scale, and skewness parameters are modeled as functions of predictors.

Usage

log_likelihood_shash(
  params,
  X_mu,
  X_sigma,
  X_epsilon,
  X_delta = NULL,
  y,
  weights = NULL,
  fixed_delta = NULL
)

Value

The negative log-likelihood of the model

Arguments

params

A numeric vector containing all model parameters

X_mu

Design matrix for location parameter

X_sigma

Design matrix for scale parameter

X_epsilon

Design matrix for skewness parameter

X_delta

Design matrix for tails

y

Response vector

weights

Observation weights

fixed_delta

If not NULL, the delta parameter is fixed to this value