logLik.gcrq: Log Likelihood, AIC and BIC for gcrq objects

View source: R/logLik.gcrq.R

logLik.gcrqR Documentation

Log Likelihood, AIC and BIC for gcrq objects

Description

The function returns the log-likelihood value(s) evaluated at the estimated coefficients

Usage

## S3 method for class 'gcrq'
logLik(object, summ=TRUE, ...)
## S3 method for class 'gcrq'
AIC(object, ..., k=2, bondell=FALSE)

Arguments

object

A gcrq fit returned by gcrq()

summ

If TRUE, the log likelihood values (and relevant edf) are summed over the different taus to provide a unique value accounting for the different quantile curves. If FALSE, tau-specific values are returned.

k

Optional numeric specifying the penalty of the edf in the AIC formula. k < 0 means k=log(n).

bondell

Logical. If TRUE, the SIC according to formula (7) in Bondell et al. (2010) is computed.

...

optional arguments (nothing in logLik.gcrq). For AIC.gcrq, summ=TRUE or FALSE can be set.

Details

The 'logLikelihood' is computed by assuming an asymmetric Laplace distribution for the response as in logLik.rq, namely n (\log(\tau(1-\tau))-1-\log(\rho_\tau/n)), where \rho_\tau is the minimized objective function. When there are multiple quantile curves j=1,2,...,J (and summ=TRUE) the formula is

n (\sum_j\log(\tau_j(1-\tau_j))-J-\log(\sum_j\rho_{\tau_j}/(n J)))

AIC.gcrq simply returns -2*logLik + k*edf where k is 2 or log(n).

Value

The log likelihood(s) of the model fit object

Author(s)

Vito Muggeo

References

Bondell HD, Reich BJ, Wang H (2010) Non-crossing quantile regression curve estimation, Biometrika, 97: 825-838.

See Also

logLik.rq

Examples

   
## logLik(o) #a unique value (o is the fit object  from gcrq)
## logLik(o, summ=FALSE) #vector of the log likelihood values
## AIC(o, k=-1) #BIC
   

quantregGrowth documentation built on July 9, 2023, 6:06 p.m.