-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a337e73
commit e502c43
Showing
5 changed files
with
94 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#' 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 ... Additional arguments passed to the method. | ||
#' | ||
#' @return A tibble with the input data and additional columns for the fitted | ||
#' values and residuals. | ||
#' | ||
#' @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) | ||
#' } | ||
|
||
#' Glance method for fepoisson (Broom) | ||
#' | ||
#' @param x A fitted model object. | ||
#' @param ... Additional arguments passed to the method. | ||
#' | ||
#' @return A tibble with the deviance, null deviance, and the number of | ||
#' observations (full rows, missing values, and perfectly classified). | ||
#' | ||
#' @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) | ||
#' } | ||
|
||
#' Tidy method for fepoisson (Broom) | ||
#' | ||
#' @param x A fitted model object. | ||
#' @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. | ||
#' | ||
#' @return A tibble with the estimated coefficients, standard errors, test | ||
#' statistics, p-values, and optionally the lower and upper bounds of the | ||
#' confidence interval. | ||
#' | ||
#' @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) | ||
#' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters