Skip to content

Commit

Permalink
add log_quad_augm
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanWilli committed Sep 23, 2024
1 parent 043501e commit adc8462
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions R/log_quad_augm.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,15 @@ HMD_old_logquad <- function(nMx, Age = NULL,

# plot diagnostic
if(plot_comparison){
df <-
rbind(
data.frame(Age = Age, nMx = nMx, Type = "Input"),
data.frame(Age = smooth_transtition_nMx$Age, nMx = smooth_transtition_nMx$nMx, Type = "Adjusted"),
data.frame(Age = Age_smooth, nMx = nMx_interpolated, Type = "Transition")) %>%
ggplot2::ggplot(ggplot2::aes(x = Age, y = nMx, color = Type)) +
Type <- NULL
df1 <- data.frame(Age = Age, nMx = nMx)
df1$Type <- "Input"
df2 <- data.frame(Age = smooth_transtition_nMx$Age, nMx = smooth_transtition_nMx$nMx)
df2$Type <- "Adjusted"
df3 <- data.frame(Age = Age_smooth, nMx = nMx_interpolated)
df3$Type <- "Transition"
rbind(df1, df2, df3) %>%
ggplot2::ggplot(ggplot2::aes(x = Age, y = nMx, color = Type)) +
ggplot2::geom_line() +
ggplot2::geom_vline(xintercept = Age_transition, linetype = "dashed", color = "grey") +
ggplot2::scale_y_log10() +
Expand Down

0 comments on commit adc8462

Please sign in to comment.