Fit the fBM model.
fbm_fit(
Xt,
dt,
drift = c("linear", "none", "quadratic"),
vcov = TRUE,
ad_only = TRUE
)
Matrix of trajectory positions, where each row is an observation and each column is a measurement coordinate. The trajectory is assumed to be sampled at a constant frequency.
Interobservation time \(\Delta t\) = 1/fps (positive scalar).
Character string specifying one of the preset drift types "linear", "none", or "quadratic". Custom drift functions are not supported through this simplified interface. See csi_model for details.
Logical; if TRUE
, also estimate the variance matrix.
Whether to return estimates of (alpha, log(D)
) only, or the entire parameter vector omega
in the computational basis.
A vector of estimated parameters on the transformed scale. If vcov == TRUE
, a list with components:
A vector of estimated parameters on transformed scale.
A matrix of estimated covariance of parameters on transformed scale.
If ad_only == TRUE
, instead of the transformed scale parameters, returns an estimate (and possibly the estimated convariance) of (alpha, D)
.
fbm_model, the class definition for the fBM model.
# simulate data from the fbm model
alpha <- .8
dt <- 1/60
N <- 1800
ndim <- 2
Xt <- csi_sim(drift = matrix(0, N-1, ndim),
acf = fbm_acf(alpha, dt, N-1),
Sigma = diag(ndim),
X0 = rep(0, ndim))
# Fit the fbm model
fbm_fit(Xt, dt = dt, drift = "linear")
#> $coef
#> alpha logD
#> 0.7604718 -0.8502970
#>
#> $vcov
#> alpha logD
#> alpha 0.0003726923 0.001424218
#> logD 0.0014242183 0.005998638
#>