diff --git a/R/broom.R b/R/broom.R index bd02a99..bfe5df8 100644 --- a/R/broom.R +++ b/R/broom.R @@ -1,8 +1,8 @@ #' Augment method for fepoisson (Broom) #' #' @param x A fitted model object. -#' @param newdata Optional argument to use data different from the data used to fit -#' the model. +#' @param newdata Optional argument to use data different from the data used to +#' fit the model. #' @param ... Additional arguments passed to the method. #' #' @return A tibble with the input data and additional columns for the fitted @@ -11,18 +11,16 @@ #' @rdname broom #' #' @examples -#' if (require("broom")) { -#' set.seed(123) -#' trade_2006 <- trade_panel[trade_panel$year == 2006, ] -#' trade_2006 <- trade_2006[sample(nrow(trade_2006), 1000), ] -#' -#' mod <- fepoisson( -#' trade ~ log_dist + lang + cntg + clny | exp_year + imp_year, -#' trade_2006 -#' ) -#' -#' broom::augment(mod) -#' } +#' set.seed(123) +#' trade_2006 <- trade_panel[trade_panel$year == 2006, ] +#' trade_2006 <- trade_2006[sample(nrow(trade_2006), 1000), ] +#' +#' mod <- fepoisson( +#' trade ~ log_dist + lang + cntg + clny | exp_year + imp_year, +#' trade_2006 +#' ) +#' +#' broom::augment(mod) #' Glance method for fepoisson (Broom) #' @@ -35,23 +33,22 @@ #' @rdname broom #' #' @examples -#' if (require("broom")) { -#' set.seed(123) -#' trade_2006 <- trade_panel[trade_panel$year == 2006, ] -#' trade_2006 <- trade_2006[sample(nrow(trade_2006), 1000), ] -#' -#' mod <- fepoisson( -#' trade ~ log_dist + lang + cntg + clny | exp_year + imp_year, -#' trade_2006 -#' ) -#' -#' broom::glance(mod) -#' } +#' set.seed(123) +#' trade_2006 <- trade_panel[trade_panel$year == 2006, ] +#' trade_2006 <- trade_2006[sample(nrow(trade_2006), 1000), ] +#' +#' mod <- fepoisson( +#' trade ~ log_dist + lang + cntg + clny | exp_year + imp_year, +#' trade_2006 +#' ) +#' +#' broom::glance(mod) #' Tidy method for fepoisson (Broom) #' #' @param x A fitted model object. -#' @param conf.int Logical indicating whether to include the confidence interval. +#' @param conf.int Logical indicating whether to include the confidence +#' interval. #' @param conf.level The confidence level for the confidence interval. #' @param ... Additional arguments passed to the method. #' @@ -62,15 +59,13 @@ #' @rdname broom #' #' @examples -#' if (require("broom")) { -#' set.seed(123) -#' trade_2006 <- trade_panel[trade_panel$year == 2006, ] -#' trade_2006 <- trade_2006[sample(nrow(trade_2006), 1000), ] -#' -#' mod <- fepoisson( -#' trade ~ log_dist + lang + cntg + clny | exp_year + imp_year, -#' trade_2006 -#' ) -#' -#' broom::tidy(mod) -#' } +#' set.seed(123) +#' trade_2006 <- trade_panel[trade_panel$year == 2006, ] +#' trade_2006 <- trade_2006[sample(nrow(trade_2006), 1000), ] +#' +#' mod <- fepoisson( +#' trade ~ log_dist + lang + cntg + clny | exp_year + imp_year, +#' trade_2006 +#' ) +#' +#' broom::tidy(mod) diff --git a/R/generics_print.R b/R/generics_print.R index a5b7d1a..d76a66a 100644 --- a/R/generics_print.R +++ b/R/generics_print.R @@ -104,7 +104,7 @@ summary_estimates_print_header_ <- function(coef_width, max_widths) { function(name, width) { sprintf("| %-*s", width, name) }, - name = c("Estimate", "Std. Error", "t value", "Pr(>|t|)"), + name = c("Estimate", "Std. Error", "z value", "Pr(>|z|)"), width = max_widths + 1L ) diff --git a/R/generics_vcov.R b/R/generics_vcov.R index 6b306c2..6422e1f 100644 --- a/R/generics_vcov.R +++ b/R/generics_vcov.R @@ -89,7 +89,7 @@ vcov.feglm <- function( } else { V <- vcov_feglm_clustered_sandwich_covariance_( object, type, H, G, - cl_vars, sp_vars, k, p + cl_vars, k, p ) } } @@ -121,7 +121,7 @@ vcov_feglm_outer_covariance_ <- function(G, p) { vcov_feglm_clustered_sandwich_covariance_ <- function( object, type, H, G, - cl_vars, sp_vars, k, p) { + cl_vars, k, p) { # Check if the hessian is invertible and compute its inverse V <- try(solve(H), silent = TRUE) if (inherits(V, "try-error")) { diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 6e90996..274cc03 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -3,5 +3,5 @@ pkgdown: 2.0.7 pkgdown_sha: ~ articles: intro: intro.html -last_built: 2024-08-28T20:13Z +last_built: 2024-09-07T21:44Z diff --git a/docs/reference/apes.html b/docs/reference/apes.html index 76fbb1e..989452c 100644 --- a/docs/reference/apes.html +++ b/docs/reference/apes.html @@ -188,7 +188,7 @@