Learn R Programming

gkwreg (version 1.0.7)

coef.gkwfit: 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 gkwfit
coef(object, ...)

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.).

Arguments

object

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

...

Additional arguments (currently ignored).

Author

Lopes, J. E.

See Also

gkwfit, coef, vcov.gkwfit, logLik.gkwfit

Examples

Run this code
# \donttest{
# 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")
# }

Run the code above in your browser using DataLab