coef.gkwfit: Extract Model Coefficients from a gkwfit Object

coef.gkwfitR Documentation

Extract Model Coefficients from a gkwfit Object

Description

Extracts the estimated coefficients for the parameters of a model fitted by gkwfit. This is an S3 method for the generic coef function.

Usage

## S3 method for class 'gkwfit'
coef(object, ...)

Arguments

object

An object of class "gkwfit", typically the result of a call to gkwfit.

...

Additional arguments (currently ignored).

Value

A named numeric vector containing the estimated coefficients for the parameters of the specified GKw family distribution. The names correspond to the parameter names (e.g., "alpha", "beta", etc.).

Author(s)

Lopes, J. E.

See Also

gkwfit, coef, vcov.gkwfit, logLik.gkwfit

Examples


# Generate data and fit model
set.seed(2203)
y <- rgkw(50, alpha = 1.5, beta = 2.5, gamma = 1.2, delta = 0.3, lambda = 1.1)
fit <- gkwfit(data = y, family = "gkw", plot = FALSE)

# Extract all coefficients
params <- coef(fit)
print(params)

# Access specific parameters
alpha_est <- coef(fit)["alpha"]
lambda_est <- coef(fit)["lambda"]
cat("Estimated alpha:", alpha_est, "\n")
cat("Estimated lambda:", lambda_est, "\n")



gkwreg documentation built on April 16, 2025, 1:10 a.m.