Constructor for farma model object.

Details

Let X_n denote the true position of an fBM process at time t = n dt. The farma(p,q) error model describes the measured position Y_n at time t = n dt as

Y_n = sum_{i=1}^p phi_i Y_{n-i} + sum_{j=0}^q rho_j X_{n-j},

with rho_0 = 1 - sum_{i=1}^p phi_i - sum_{j=1}^q rho_j. The resulting MSD as a function of phi and rho is what gets passed to the csi_model base class to construct the farma_model derived class.

Super class

subdiff::csi_model -> farma_model

Public fields

phi_names

Kernel parameter names. The character vector (alpha, phi_1, ..., phi_p, rho_1, ..., rho_q).

Methods

Inherited methods


Method acf()

Increment autocorrelation function.

Usage

farma_model$acf(phi, dt, N)

Arguments

phi, dt, N

See csi_model.


Method trans()

Transform kernel parameters from regular to computational basis.

Usage

farma_model$trans(phi)

Arguments

phi

See csi_model.


Method itrans()

Transform kernel parameters from computational to regular basis.

Usage

farma_model$itrans(psi)

Arguments

psi

See csi_model.


Method get_subdiff()

Transform parameters from computational basis to subdiffusion parameters.

Usage

farma_model$get_subdiff(omega)

Arguments

omega

See csi_model.

Returns

Vector with named elements alpha and logD.


Method new()

Class constructor.

Usage

farma_model$new(Xt, dt, order = c(0, 0), m = 50, drift = "linear", n_drift)

Arguments

Xt, dt, drift, n_drift

See csi_model.

order

Vector of two nonnegative integers specifying the number of autoregressive and moving-average terms, respectively.

m

Order of the moving-average approximation (see farma_acf()).


Method clone()

The objects of this class are cloneable with this method.

Usage

farma_model$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

# simulate data from a farma(1,1) model
alpha <- .8
phi <- .1
rho <- .1

dt <- 1/60
N <- 1800
ndim <- 2

Xt <- csi_sim(drift = matrix(0, N-1, ndim),
              acf = farma_acf(alpha, phi = phi, rho = rho, dt, N-1),
              Sigma = diag(ndim),
              X0 = rep(0, ndim))


# create farma(1,1) model object
model <- farma_model$new(Xt = Xt, dt = dt, order = c(1, 1), drift = "linear")

# evaluate loglikelihood
model$loglik(phi = c(alpha = alpha, phi = phi, rho = rho),
             mu = rep(0, ndim),
             Sigma = diag(ndim))
#> [1] 1680.692