From b47d9e42ec4cb6865539bafccbc850316708e0b7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 7 Nov 2024 16:29:50 +0100 Subject: [PATCH] fix --- R/methods_fixest.R | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/R/methods_fixest.R b/R/methods_fixest.R index 555bd2467..ca058dcb4 100644 --- a/R/methods_fixest.R +++ b/R/methods_fixest.R @@ -74,17 +74,9 @@ standard_error.fixest <- function(model, vcov = NULL, vcov_args = NULL, ...) { if (is.null(vcov)) { # get standard errors from summary + # see https://github.com/easystats/parameters/issues/1039 stats <- summary(model) - SE <- as.vector(stats$se) - # sometimes, the correct SEs are in the `coeftable`. In this case, - # SE from summary have different length - if (length(SE) != nrow(params)) { - SE <- NULL - SE_ct <- .safe(as.vector(model$coeftable[, "Std. Error"])) - if (!is.null(SE_ct) && length(SE_ct) == nrow(params)) { - SE <- SE_ct - } - } + SE <- as.vector(stats$coeftable[, "Std. Error"]) } else { # we don't want to wrap this in a tryCatch because the `fixest` error is # informative when `vcov` is wrong. @@ -92,11 +84,6 @@ standard_error.fixest <- function(model, vcov = NULL, vcov_args = NULL, ...) { SE <- sqrt(diag(V)) } - if (is.null(SE)) { - SE <- NA - insight::format_alert("Could not extract standard errors. Please file an issue at https://github.com/easystats/parameters/issues/") - } - .data_frame( Parameter = params$Parameter, SE = SE