# Based on Shuichiro Ike's textbook.
# Is TFR approximated by CWR*7?
# Using Japan's data for 1950-2020
# Further reference
# https://doi.org/10.1371/journal.pone.0067226
library(fmsb)
YEAR <- 1950+0:14*5
CWRs <- (colSums(Jpop[1:5, sprintf("M%d", YEAR)]+Jpop[1:5, sprintf("F%d", YEAR)]))/ colSums(Jpop[16:50, sprintf("F%d", YEAR)])
TFRs <- Jvital$TFR[Jvital$YEAR %in% YEAR]
plot(TFRs, CWRs*7, main="Relationship between TFR and CWR times 7")
lines(c(1, 4), c(1, 4), col="blue")
arrows(TFRs, CWRs*7, c(TFRs[-1], NA), c(CWRs[-1]*7, NA), col="red", length=0.1)
