logLik.gkwreg: Extract Log-Likelihood from Generalized Kumaraswamy...

View source: R/gkwreg-inference.R

logLik.gkwregR Documentation

Extract Log-Likelihood from Generalized Kumaraswamy Regression Models

Description

Extracts the log-likelihood value from a fitted Generalized Kumaraswamy (GKw) regression model object.

Usage

## S3 method for class 'gkwreg'
logLik(object, ...)

Arguments

object

An object of class "gkwreg", typically obtained from gkwreg.

...

Currently not used.

Details

The log-likelihood is extracted from the fitted model object and returned as an object of class "logLik" with appropriate attributes for the number of parameters (df) and observations (nobs). These attributes are required for information criteria calculations.

For a GKw regression model with parameter vector \theta, the log-likelihood is defined as:

\ell(\theta \mid y) = \sum_{i=1}^n \log f(y_i; \alpha_i, \beta_i, \gamma_i, \delta_i, \lambda_i)

where f(\cdot) is the probability density function of the specified GKw family distribution, and the parameters may depend on covariates through link functions.

Value

An object of class "logLik" containing the log-likelihood value with the following attributes:

df

Number of estimated parameters

nobs

Number of observations

Author(s)

Lopes, J. E.

See Also

gkwreg, AIC.gkwreg, BIC.gkwreg

Examples


# Load example data
data(GasolineYield)

# Fit a Kumaraswamy regression model
fit <- gkwreg(yield ~ batch + temp, data = GasolineYield, family = "kw")

# Extract log-likelihood
ll <- logLik(fit)
print(ll)

# Access attributes
cat("Log-likelihood:", as.numeric(ll), "\n")
cat("Parameters:", attr(ll, "df"), "\n")
cat("Observations:", attr(ll, "nobs"), "\n")



gkwreg documentation built on Nov. 27, 2025, 5:06 p.m.