summary.gkwreg | R Documentation |
Computes and returns a detailed statistical summary for a fitted Generalized
Kumaraswamy (GKw) regression model object of class "gkwreg"
.
## S3 method for class 'gkwreg'
summary(object, conf.level = 0.95, ...)
object |
An object of class |
conf.level |
Numeric. The desired confidence level for constructing confidence intervals for the regression coefficients. Default is 0.95. |
... |
Additional arguments, currently ignored by this method. |
This method provides a comprehensive summary of the fitted gkwreg
model.
It calculates z-values and p-values for the regression coefficients based on
the estimated standard errors (if available) and computes confidence intervals
at the specified conf.level
. The summary includes:
The model call.
The distribution family used.
A table of coefficients including estimates, standard errors, z-values,
and p-values. Note: Significance stars are typically added by the
corresponding print.summary.gkwreg
method.
Confidence intervals for the coefficients.
Link functions used for each parameter.
Mean values of the fitted distribution parameters (\alpha, \beta, \gamma, \delta, \lambda
).
A five-number summary (Min, Q1, Median, Q3, Max) plus the mean of the response residuals.
Key model fit statistics (Log-likelihood, AIC, BIC, RMSE, Efron's R^2).
Information about model convergence and optimizer iterations.
If standard errors were not computed (e.g., hessian = FALSE
in the
original gkwreg
call), the coefficient table will only contain estimates,
and confidence intervals will not be available.
An object of class "summary.gkwreg"
, which is a list containing
the following components:
call |
The original function call that created the |
family |
Character string specifying the distribution family. |
coefficients |
A data frame (matrix) containing the coefficient estimates, standard errors, z-values, and p-values. |
conf.int |
A matrix containing the lower and upper bounds of the confidence intervals for the coefficients (if standard errors are available). |
link |
A list of character strings specifying the link functions used. |
fitted_parameters |
A list containing the mean values of the estimated distribution parameters. |
residuals |
A named numeric vector containing summary statistics for the response residuals. |
nobs |
Number of observations used in the fit. |
npar |
Total number of estimated regression coefficients. |
df.residual |
Residual degrees of freedom. |
loglik |
The maximized log-likelihood value. |
aic |
Akaike Information Criterion. |
bic |
Bayesian Information Criterion. |
rmse |
Root Mean Squared Error of the residuals. |
efron_r2 |
Efron's pseudo-R-squared value. |
mean_absolute_error |
Mean Absolute Error of the residuals. |
convergence |
Convergence code from the optimizer. |
iterations |
Number of iterations reported by the optimizer. |
conf.level |
The confidence level used for calculating intervals. |
Lopes, J. E.
gkwreg
, print.summary.gkwreg
,
coef
, confint
set.seed(123)
n <- 100
x1 <- runif(n, -2, 2)
x2 <- rnorm(n)
alpha_coef <- c(0.8, 0.3, -0.2)
beta_coef <- c(1.2, -0.4, 0.1)
eta_alpha <- alpha_coef[1] + alpha_coef[2] * x1 + alpha_coef[3] * x2
eta_beta <- beta_coef[1] + beta_coef[2] * x1 + beta_coef[3] * x2
alpha_true <- exp(eta_alpha)
beta_true <- exp(eta_beta)
# Use stats::rbeta as a placeholder if rkw is unavailable
y <- stats::rbeta(n, shape1 = alpha_true, shape2 = beta_true)
y <- pmax(pmin(y, 1 - 1e-7), 1e-7)
df <- data.frame(y = y, x1 = x1, x2 = x2)
# Fit a Kumaraswamy regression model
kw_reg <- gkwreg(y ~ x1 + x2 | x1 + x2, data = df, family = "kw")
# Generate detailed summary using the summary method
summary_kw <- summary(kw_reg)
# Print the summary object (uses print.summary.gkwreg)
print(summary_kw)
# Extract coefficient table directly from the summary object
coef_table <- coef(summary_kw) # Equivalent to summary_kw$coefficients
print(coef_table)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.