Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Oct 6, 2024
1 parent 9902717 commit 6d9e85a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions R/methods_fixest.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ model_parameters.fixest <- function(model,
standard_error.fixest <- function(model, vcov = NULL, vcov_args = NULL, ...) {
params <- insight::get_parameters(model)

if (!is.null(vcov)) {
if (is.null(vcov)) {
stats <- summary(model)
SE <- as.vector(stats$se)
} else {
# we don't want to wrap this in a tryCatch because the `fixest` error is
# informative when `vcov` is wrong.
V <- insight::get_varcov(model, vcov = vcov, vcov_args = vcov_args)
SE <- sqrt(diag(V))
} else {
stats <- summary(model)
SE <- as.vector(stats$se)
}

.data_frame(
Expand Down
2 changes: 1 addition & 1 deletion R/utils_model_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
if (isTRUE(include_info) && requireNamespace("performance", quietly = TRUE)) {
rsq <- .safe(suppressWarnings(performance::r2(model)))
attr(params, "r2") <- rsq
rmse <-.safe(performance::performance_rmse(model))
rmse <- .safe(performance::performance_rmse(model))
attr(params, "rmse") <- rmse
}

Expand Down

0 comments on commit 6d9e85a

Please sign in to comment.