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 \Delta t

corr_process

vmp for von-Mises process; cbm for circular brownian motion

iter

number of iterations (Default is 2000)

lambda

regularization parameter for cbm (Default is 0)

lambda_1

regularization parameter for vmp (Default is 0)

lambda_2

regularization parameter for vmp (Default is 0)

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

else if corr_process=cbm then it returns

See Also

circ.bootstrap()

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

[Package stochcorr version 0.0.1 Index]