summary.gkwfit: Summary Method for gkwfit Objects

summary.gkwfitR Documentation

Summary Method for gkwfit Objects

Description

Calculates and prepares a detailed summary of a model fitted by gkwfit. This includes coefficients, standard errors, test statistics (z-values), p-values, log-likelihood, information criteria (AIC, BIC, AICc), number of estimated parameters, convergence status, and optimizer details.

Usage

## S3 method for class 'gkwfit'
summary(object, correlation = FALSE, ...)

Arguments

object

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

correlation

Logical; if TRUE, the correlation matrix of the estimated parameters is computed from the vcov component and included in the summary. Defaults to FALSE.

...

Additional arguments (currently unused).

Details

This function computes standard errors, z-values (Estimate / SE), and p-values (two-tailed test based on the standard normal distribution) for the estimated model parameters by utilizing the coefficient estimates (coef) and their variance-covariance matrix (vcov). This requires that the variance-covariance matrix was successfully computed and is available in the object (typically requires hessian = TRUE in the original gkwfit call and successful Hessian inversion).

If standard errors cannot be reliably calculated (e.g., vcov is missing, invalid, or indicates non-positive variance), the corresponding columns in the coefficient table will contain NA values, and the se_available flag will be set to FALSE.

The returned object is of class "summary.gkwfit", and its printing is handled by print.summary.gkwfit.

Value

An object of class "summary.gkwfit", which is a list containing:

call

The original function call.

family

The specified distribution family.

coefficients

A matrix of estimates, standard errors, z-values, and p-values. Contains NAs if SEs could not be computed.

loglik

The maximized log-likelihood value (numeric).

df

The number of estimated parameters.

aic

Akaike Information Criterion.

bic

Bayesian Information Criterion.

aicc

Corrected Akaike Information Criterion.

nobs

Number of observations used in fitting (integer).

convergence

The convergence code returned by the optimizer.

message

The message returned by the optimizer.

se_available

Logical indicating if standard errors could be computed.

correlation

The correlation matrix of coefficients (if correlation = TRUE and calculable), otherwise NULL.

fixed

A named list of parameters that were held fixed during estimation, or NULL.

fit_method

The primary fitting method specified ('tmb' or 'nr').

optimizer_method

The specific optimizer used (e.g., 'nlminb', 'optim', 'Newton-Raphson').

Author(s)

Lopes, J. E. (with refinements)

See Also

gkwfit, print.summary.gkwfit, coef.gkwfit, vcov.gkwfit, logLik.gkwfit, AIC.gkwfit

Examples


# Generate data and fit model
set.seed(2203)
y <- rkw(50, alpha = 2, beta = 3)
fit <- gkwfit(data = y, family = "kw", plot = FALSE)

# Display detailed summary with parameter estimates and standard errors
summary(fit)

# Control digits in output
summary(fit, digits = 4)



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