View source: R/B_splines_est.R
splines_est | R Documentation |
Compute the estimated covariance function by using the method from Choi, Li & Wang (2013, pp. 614-617).
C(\tau) = \sum_{j = 1}^{m + p} \beta_{j} f_{j}^{(p-1)}(\tau^{2}),
where m
is the number of nonboundary knots, p
is the order of the splines, \tau
is the isotropic distance, \beta_{j}
are nonnegative weights and f_{j}^{(p)}
are basis functions of order p.
For optimisation, the Nelder-Mead and L-BFGS-B methods are used, the one which selects parameters which minimises the objective function is chosen.
splines_est(
X,
x,
estCov,
p,
m,
maxLag = length(X) - 1,
type = "autocovariance",
inital_pars = c(),
control = list(maxit = 1000)
)
X |
A vector representing observed values of the time series. |
x |
A vector of lags. |
estCov |
An estimated autocovariance function to fit to (a vector). |
p |
The order of the splines. |
m |
The number of nonboundary knots. |
maxLag |
An optional parameter that determines the maximum lag to compute the estimated autocovariance function at. Defaults to |
type |
Compute either the 'autocovariance' or 'autocorrelation'. Defaults to 'autocovariance'. |
inital_pars |
An optional vector of parameters - can be used to fine tune the fit. By default, it is a vector of 0.5 whose length is |
control |
An optional list of optimisation parameters used in the optimisation process, see |
A vector whose values are the spline autocovariance estimates.
Choi, I., Li, B. & Wang, X. (2013). Nonparametric Estimation of Spatial and Space-Time Covariance Function. JABES 18, 611-630. https://doi.org/10.1007/s13253-013-0152-z
X <- rnorm(100)
x <- seq(0, 5, by = 0.25)
maxLag <- 5
estCov <- standard_est(X, maxLag = maxLag)
estimated <- splines_est(X, x, estCov, 3, 2, maxLag = maxLag)
estimated
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.