# Exam 1.
#
# 1 (40pts). Compute the net lifetime low dose risk of CML in the absence of competing risks assuming
# mn = (exp(c1+k*age) + sv*(tsx^2)*exp(c2-kt*tsx) + sv*exp(c3-(tsx-mu)^2/sd2))*py
# first for hiroshima males, then hiroshima females, then for both sexes, then both sexes and both cities.
# How did the Nagasaki data alter the risk estimates?
#
# 2 (30pts). Repeat the calculations using the same models but in the presence of (US 2001) competing risks. Assume an exposure at the age of 40 years.
# Which of the two risks estimates decreased by a greater percentage, HM or HF? Why?
#
# 3 (30pts). a) Since early diagnosis and early treatment improve treatment prognosis, one can conjecture that if one could survive the acute effects
# of a very high dose, the same dose which caused the cancer could cure it too. To explore this, remove the kerma constraint to obtain an
# additional dose group at 5 Sv. Now let the dose-response speak for HM CML as in block 2 of CMLriskHM.r. What happens in the highest dose group?
# Now do the same for AML and ALL with sexes and cities combined; assume a pure exponential waiting time function exp(-kt*tsx). Are the three
# leukemias self-consistent in the highest dose group? Describe the observed phenomenon.
# b) The low dose regions of the leukemia dose-response curves differ slightly. Treating the dose-response parameters of 3a as "data", fit the
# seven data points to the model exp(c)*(sv+boa*sv^2)^k*exp(-ak*sv) where k is the smallest integer that leads to an acceptable fit.
# For chromosomal translocations and gamma rays, beta/alpha (of alphaD+betaD^2) is .06/(.01 to.02) or roughly 3-6. Approximating A-bomb
# doses in sieverts as gamma ray doses in gray, how many chromosomal tranlocation hits k are needed to cause CML?, AML?, and ALL?
#
# Please perform all of your work using R. Your answers should be supported by numbers and codes.