May 2019
Intermediate to advanced
664 pages
15h 41m
English
Now that you have read Duan's paper several times, here's how to apply to our work. I'm going to provide you with a user-defined function. It will do the following:
Here's the function, which requires only two arguments:
> duan_smear <- function(pred, resid){ expo_resid <- exp(resid) expo_pred <- exp(pred) avg_expo_resid <- mean(expo_resid) smear_predictions <- avg_expo_resid * expo_pred return(smear_predictions) } ...