Description Usage Arguments Value Examples
Gradient of the GrOU likelihood function with penalty.
1 2 3 4 5 6 7 8 | grad_likelihood_fn(
times,
data,
thresholds,
div = 1e+05,
use_scaling = FALSE,
log = TRUE
)
|
times |
Times at which data is given |
data |
Values to compute the MLE with. |
thresholds |
Jump threshold values. |
div |
Batch size/divisor to avoid large memory allocation. |
use_scaling |
Brownian motion covariance matrix scaling in the likelihood. |
log |
Log-scale for the likelihood or not (defaults to |
(Log)likelihood of the GrOU process with penalty.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | n <- 1000
d <- 10
times <- seq(n)
delta_time <- 0.01
beta_value <- 0.499
noise <- matrix(rnorm(n * d, sd = sqrt(delta_time)), ncol = d)
data <- construct_path(
diag(d),
noise = noise, y_init = rep(0, d), delta_time = delta_time
)
thresholds <- rep(delta_time^beta_value, d)
grad_loglik <- grad_likelihood_fn(
times = times, data = data, thresholds = thresholds, div = 1e2
)
grad_loglik(diag(d))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.