CY-Chan/Arcidiacono-2011 — pull request #5 by mattybeam (2014-11-11 15:19:01+00:00)
Title: Fix Operators

Johnny,

I think I figured out what was wrong with the probabilities. In my Operator, I wasn't subtracting the log of the probability of replacing the engine in the next time period, but the current one. To fix this, I made p a (x_m + 2) by 4 data frame, where the last row contains probabilities of keeping and replacing engines at age x_m + 1, which I set to be 0 for keeping the engine and 1 for replacement at every iteration. The probabilities look quite a bit more reasonable now. I'll generate the data and save it using saveRDS. Check out the code and see if there are other mistakes or areas for improvement!