# \donttest{
# Generate data and fit model (ensure hessian = TRUE for vcov)
set.seed(2203)
y <- rbkw(50, alpha = 2, beta = 3, gamma = 1.5, delta = 0.5)
fit <- gkwfit(data = y, family = "bkw", plot = FALSE, hessian = TRUE)
# Extract variance-covariance matrix
vcov_matrix <- vcov(fit)
print(vcov_matrix)
# Extract standard errors from the diagonal
std_errors <- sqrt(diag(vcov_matrix))
print(std_errors)
# Compare with standard errors from summary
summary_se <- summary(fit)$coefficients[, "Std. Error"]
all.equal(std_errors, summary_se)
# }
Run the code above in your browser using DataLab