splines_est: Compute the Splines Estimator.

View source: R/B_splines_est.R

splines_estR Documentation

Compute the Splines Estimator.

Description

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.

Usage

splines_est(
  X,
  x,
  estCov,
  p,
  m,
  maxLag = length(X) - 1,
  type = c("autocovariance", "autocorrelation"),
  initial_pars = c(),
  control = list(maxit = 1000)
)

## S3 method for class 'CovEsts'
splines_est(
  X,
  x,
  estCov,
  p,
  m,
  maxLag = length(X) - 1,
  type = c("autocovariance", "autocorrelation"),
  initial_pars = c(),
  control = list(maxit = 1000)
)

## Default S3 method:
splines_est(
  X,
  x,
  estCov,
  p,
  m,
  maxLag = length(X) - 1,
  type = c("autocovariance", "autocorrelation"),
  initial_pars = c(),
  control = list(maxit = 1000)
)

Arguments

X

A vector representing observed values of the time series.

x

A vector of lag indices.

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 length(X) - 1.

type

Compute either the 'autocovariance' or 'autocorrelation'. Defaults to 'autocovariance'.

initial_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 m+p.

control

An optional list of optimisation parameters used in the optimisation process, see control in stats::optim.

Details

Due to the weighting scheme, the autocovariance at lag zero cannot be 1,

w_{i} = \frac{N - i}{1 - C(i)}

Value

A vector whose values are the spline autocovariance estimates or a CovEsts S3 object (list) with the following values

acf

A numeric vector containing the autocovariance/autocorrelation estimates.

lags

A numeric vector containing the lag indices used to compute the estimates on.

est_type

The type of estimate, namely 'autocorrelation' or 'autocovariance', this depends on the type parameter.

est_used

The estimator function used, in this case, 'splines_est'.

If a numeric vector is given for the argument estCov, then a numeric vector output is given, and if a CovEsts S3 object is given, a CovEsts object is given as output.

Methods (by class)

  • splines_est(CovEsts): Method for 'CovEsts' objects.

  • splines_est(default): Method for numeric vectors.

References

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

Examples

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

CovEsts documentation built on April 19, 2026, 5:06 p.m.

Related to splines_est in CovEsts...