Working out the multiple uncertainty computational performance and noise forms. Fixing a few things in the way log-normal noise was calculated. Uniform noise in particular can still give rather non-smooth policy, needs a bit of digging. Uniform noise doesn’t show the non-monotonicity of the log-normal noise in measurement uncertainty though.


uniform noise policy functions
uniform noise policy functions


log-normal noise policy functions
log-normal noise policy functions


  • A few small tweaks to probability calculations
  1. Handle the case of mu = grid zero, not just exactly zero, to avoid introducing NAs
  2. Calculate dlnorm as (x_grid/mu, 0, sigma), rather than as (x_grid, mu, sigma).
  3. Transpose of measurement error in M %*% F. Because now we want to treat x as given, integrate over range of y? (no, probably not?)
  4. standardize noise level between old and g 12:52 pm 2012/11/22
  1. vectorized calculation of mu.
  2. matrix-based calc of deterministic part of growth rate 02:13 pm 2012/11/22
  • Another efficiency change. Not identical but appears to be a decent approximation: Snap mu to the x_grid, and look up the pdfn value rather than calculating it each time in F. 03:00 pm 2012/11/22

Now pretty efficient. Matrix multiplication is dominant time sink, followed by the applys. snap_to_grid is probably the slowest functional contribution.