| dTpdPde1D | R Documentation | 
Computation of the transition probability density (tpd) of the Wrapped Normal (WN) or von Mises (vM) diffusion, by solving its associated Fokker–Planck Partial Differential Equation (PDE) in 1D.
dTpdPde1D(Mx = 500, x0, t, alpha, mu, sigma, type = "WN",
  Mt = ceiling(100 * t), sdInitial = 0.1, ...)
| Mx | size of the equispaced spatial grid in  | 
| x0 | point giving the mean of the initial circular density, a WN with
standard deviation equal to  | 
| t | time separating  | 
| alpha | drift parameter. | 
| mu | mean parameter. Must be in  | 
| sigma | diffusion coefficient. | 
| type | either  | 
| Mt | size of the time grid in  | 
| sdInitial | the standard deviation of the concentrated WN giving the initial condition. | 
| ... | Further parameters passed to  | 
A combination of small sdInitial and coarse space-time
discretization (small Mx and Mt) is prone to create numerical
instabilities. See Sections 3.4.1, 2.2.1 and 2.2.2 in García-Portugués et
al. (2019) for details.
A vector of length Mx with the tpd evaluated at
seq(-pi, pi, l = Mx + 1)[-(Mx + 1)].
García-Portugués, E., Sørensen, M., Mardia, K. V. and Hamelryck, T. (2019) Langevin diffusions on the torus: estimation and applications. Statistics and Computing, 29(2):1–22. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s11222-017-9790-2")}
Mx <- 100
x <- seq(-pi, pi, l = Mx + 1)[-c(Mx + 1)]
x0 <- pi
t <- 0.5
alpha <- 1
mu <- 0
sigma <- 1
isRStudio <- identical(.Platform$GUI, "RStudio")
if (isRStudio) {
  manipulate::manipulate({
  plot(x, dTpdPde1D(Mx = Mx, x0 = x0, t = t, alpha = alpha, mu = 0,
                    sigma = sigma), type = "l", ylab = "Density",
       xlab = "", ylim = c(0, 0.75))
  lines(x, dTpdWou1D(x = x, x0 = rep(x0, Mx), t = t, alpha = alpha, mu = 0,
                      sigma = sigma), col = 2)
  }, x0 = manipulate::slider(-pi, pi, step = 0.01, initial = 0),
  alpha = manipulate::slider(0.01, 5, step = 0.01, initial = 1),
  sigma = manipulate::slider(0.01, 5, step = 0.01, initial = 1),
  t = manipulate::slider(0.01, 5, step = 0.01, initial = 1))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.