##= load the NCC example ==================================
setDALYexample(1)
##= perform DALY calculation =============================
##= without age weighting and time discounting ============
getDALY(aw = FALSE, dr = 0)
##= perform DALY calculation, store results in 'x' ========
##= (with age weighting and a 3% time discount rate) ======
x <- getDALY(aw = TRUE, dr = 0.03)
##= view the structure of 'x' =============================
str(x)
##= view the DALY calculation results =====================
print(x) # absolute, total ==============
print(x, relative = TRUE) # relative (ie, per 1000 pop) ==
print(x, outcomes = TRUE) # outcome-wise =================
##= obtain minimum & maximum simulated DALY ===============
min(x[[1]]$DALY)
max(x[[1]]$DALY)
##= standardized DALY histogram ===========================
hist(x)
##= DALY sensitivity analysis =============================
sensitivity(x)Run the code above in your browser using DataLab