circdiff {stochcorr} | R Documentation |
Estimation of circular diffusion models
Description
circdiff
returns the estimates of parameters of a discretely observed von-Mises process or Circular Brownian motion
Usage
circdiff(theta, dt, corr_process, iter=2000, lambda=0, lambda_1=0, lambda_2=0)
Arguments
theta |
data of the discretely observed diffusion |
dt |
time step |
corr_process |
|
iter |
number of iterations (Default is 2000) |
lambda |
regularization parameter for |
lambda_1 |
regularization parameter for |
lambda_2 |
regularization parameter for |
Details
Let \theta_0,\theta_{\Delta t},\theta_{2\Delta t}, \ldots, \theta_{n\Delta t}
be a discretely observed circular diffusion
at time step \Delta t
. The circular diffusion could either be von-Mises process,
d\theta_t=-\lambda\sin(\theta_t-\mu)dt+\sigma dW_t
or the circular brownian motion,
d\theta_t=\sigma dW_t
under periodic boundary condition. The function returns the MLE of \lambda,\sigma,\mu
for von-Mises process or
\sigma
for circular brownian motion.
We provide an option to perform penalised MLE using an iterative optimization procedure as following,
we maximise for von Mises process, where n
is the number of observations,
\text{Log-lik}-n\lambda_1\sum(1-cos(\theta_{i+1}-\theta_{i}))-\lambda_2\frac{2\lambda}{\sigma^2}
For Circular Brownian motion we maximise,
\text{Log-lik}-n\lambda\sum(1-cos(\theta_{i+1}-\theta_{i}))
See section 3 of Majumdar and Laha (2024) doi:10.48550/arXiv.2412.06343.
Value
A list containing the estimates of the model
if corr_process=vmp
then it returns
-
dt
time step\Delta t
-
lambda_vm
the drift parameter of the von Mises process -
sigma_vm
the volatility parameter of the von Mises process -
mu_vm
the mean direction of the von Mises process -
lambda_1, lambda_2
value of the regularization parameters used for estimation
else if corr_process=cbm
then it returns
-
dt
time step\Delta t
-
sigma_cbm
the volatility parameter of the circular Brownian motion -
lambda
value of the regularization parameter used for estimation
See Also
Examples
library(stochcorr)
data(wind)
if(requireNamespace("ggplot2")){
library(ggplot2)
ggplot2::ggplot(wind, aes(x = Date, y = Dir)) +
geom_line() +
labs(title = "Sotavento Wind Farm",
x = "Date",
y = "Wind Direction") +
scale_x_datetime(date_labels = "%d-%b", date_breaks = "2 day") +
theme_test() +
theme(
text = element_text(size = 15),
axis.text.x = element_text(angle = 90, hjust = 1)
)
}
a<-circdiff(wind$Dir,10/1440,"vmp")
a
b<-circdiff(wind$Dir,10/1440,"cbm")
b