opts_chunk$set(external = TRUE, cache = FALSE, cache.path = "bevholt-cache/") read_chunk('gaussian-process-control.R') library(knitcitations)
We use a Beverton-Holt model to drive the underlying dynamics, with parameters $A =$ r p[1]
and $B =$ r p[2]
.
sigma_g <- 0.02 z_g <- function(sigma_g) rlnorm(1, 0, sigma_g) #1+(2*runif(1, 0, 1)-1)*sigma_g # x_grid <- seq(0, 1.5 * K, length=101) h_grid <- x_grid profit = function(x,h) pmin(x, h) delta <- 0.01 OptTime = 20 xT = 0 reward = profit(x_grid[length(x_grid)], x_grid[length(x_grid)]) + 1 / (1 - delta) ^ OptTime ## x_0_observed is starting condition for simulation of the observed data. ## It should be in preferred state for bistable model, ## above Allee threshold for Allee model, ## and near zero for BH or Ricker models x_0_observed <- x_grid[2]
We consider stochastic growth driven by a lognormal noise process, $X_{t+1} = z_g f(X_t)$, where $f$ is the stock recruitment curve and $z_g$ a lognormal shock with $\sigma_g$ = r sigma_g
.
Simulate data
Estimates a Ricker curve with parameters $r =$ r p_alt[1]
and $K =$ r p_alt[2]
We fit a Gaussian process with
bibliography("html")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.