## ----include = FALSE---------------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ----setup-------------------------------------------------------------------- library(tempodisco) ## ----------------------------------------------------------------------------- data("td_bc_single_ptpt") mod1 <- td_bcnm(td_bc_single_ptpt, discount_function = 'scaled-exponential') mod2 <- td_bcnm(td_bc_single_ptpt, discount_function = 'nonlinear-time-hyperbolic') k1 <- coef(mod1)['k'] k2 <- coef(mod2)['k'] cat(sprintf('Percentage difference in k values: %.2f%%\n', 100*abs((k1 - k2)/((k1 + k2)/2)))) ed501 <- ED50(mod1) ed502 <- ED50(mod2) cat(sprintf('Percentage difference in ED50 values: %.2f%%\n', 100*abs(ed501 - ed502)/((ed501 + ed501)/2))) ## ----------------------------------------------------------------------------- auc1 <- AUC(mod1) auc2 <- AUC(mod2) cat(sprintf('Percentage difference in AUC values: %.2f%%\n', 100*abs(auc1 - auc2)/((auc1 + auc2)/2)))