Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
timriffe committed Dec 29, 2023
1 parent ab2b2ad commit 021dcf8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 30 deletions.
7 changes: 5 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Changes in this update
2018-08-15

## 2018-08-15

- NEWS.md file added. When a first release comes out, major functionality
and features will be listed here at that time.

2019-11-28
## 2019-11-28

- new function mig_calculate_rc() added
- several function names harmonized, see ?DemoTools-renamed
- graduate_sprague() and other graduation functions no longer support matrix inputs

## 2023-12-29
- minor fixes to pass checks


17 changes: 3 additions & 14 deletions R/extra_mortality.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
#' f2 <- lt_rule_m_extrapolate(mx, x, x_fit, x_extr, law = "kannisto_makeham")
#' f3 <- lt_rule_m_extrapolate(mx, x, x_fit, x_extr, law = "gompertz")
#' f4 <- lt_rule_m_extrapolate(mx, x, x_fit, x_extr, law = "ggompertz")
#' f5 <- lt_rule_m_extrapolate(mx, x, x_fit, x_extr, law = "makeham")
#' # makeham falls back to gompertz for this data
#' suppressWarnings(f5 <- lt_rule_m_extrapolate(mx, x, x_fit, x_extr, law = "makeham"))
#' f6 <- lt_rule_m_extrapolate(mx, x, x_fit, x_extr, law = "beard")
#' f7 <- lt_rule_m_extrapolate(mx, x, x_fit, x_extr, law = "beard_makeham")
#' f8 <- lt_rule_m_extrapolate(mx, x, x_fit, x_extr, law = "quadratic")
Expand Down Expand Up @@ -126,19 +127,7 @@
#' lty = c(NA, NA, 1:8), pch = c(16, 16, rep(NA, 8)),
#' col = c(1, 4, 2:9), lwd = 2, pt.cex = 2)
#'}
#' # ----------------------------------------------
#' # Example 3 - Extrapolate mortality for multiple years at once
#'
#' # Create some data
#' mx_matrix <- matrix(rep(mx1, 3), ncol = 3) %*% diag(c(1, 1.05, 1.1))
#' dimnames(mx_matrix) <- list(age = x1, year = c("year1", "year2", "year3"))
#'
#' # TR: temporary warning suppression until case handling is fixed
#' # in MortalityLaws package
#' F1 <- suppressWarnings(lt_rule_m_extrapolate(mx_matrix, x = x1, x_fit, x_extr, law = "kannisto"))
#' F1
#' ls(F1)
#' coef(F1)

#' @author Marius D. Pascariu <rpascariu@@outlook.com>
#' @export
lt_rule_m_extrapolate <- function(mx,
Expand Down
16 changes: 2 additions & 14 deletions man/lt_rule_m_extrapolate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 021dcf8

Please sign in to comment.