View source: R/covariance_directional_ou.R
| directional_ou_variance | R Documentation |
r(x,x) at each evaluation point – the diagonal of
directional_ou_covariance(), computed directly via the marginal
variance recursion along each edge, without any last-common-ancestor or
transfer-factor work.
directional_ou_variance(
graph,
kappa,
tau,
PtE = NULL,
sigma_source = NULL,
normalized = TRUE,
cpp = TRUE
)
graph |
A |
kappa |
Rate parameter of the OU process ( |
tau |
White-noise scale. The stationary marginal variance is
|
PtE |
Evaluation points, a matrix with columns |
sigma_source |
Anchoring variance at the source vertices
(indegree 0). |
normalized |
If |
cpp |
If |
A numeric vector of length nrow(PtE).
directional_ou_covariance() for the full closed-form
covariance (including the \deqn{r(s,t) = r(a,a) A(a,s) A(a,t)} formula
and the tree/acyclicity requirements).
edge1 <- rbind(c(0, 0), c(1, 0))
edge2 <- rbind(c(1, 0), c(2, 0))
edge3 <- rbind(c(1, 0), c(1, 1))
graph <- metric_graph$new(edges = list(edge1, edge2, edge3))
graph$set_edge_weights(weights = data.frame(w = c(1, 1, 1)),
directional_weights = "w")
graph$setDirectionalWeightFunction(f_in = function(x) sqrt(x / sum(x)))
directional_ou_variance(graph, kappa = 1, tau = 1,
PtE = rbind(c(1, 0.5), c(2, 0.5)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.