Description Usage Arguments Details Value See Also Examples
This function computes Whittle estimator to LSARMA and LSARFIMA models.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 
series 
(type: numeric) univariate time series. 
start 
(type: numeric) numeric vector, initial values for parameters to run the model. 
order 
(type: numeric) vector corresponding to 
ar.order 
(type: numeric) AR polimonial order. 
ma.order 
(type: numeric) MA polimonial order. 
sd.order 
(type: numeric) polinomial order noise scale factor. 
d.order 
(type: numeric) 
include.d 
(type: numeric) logical argument for 
N 
(type: numeric) value corresponding to the length of the window to
compute periodogram. If 
S 
(type: numeric) value corresponding to the lag with which will go taking the blocks or windows. 
include.taper 
(type: logical) logical argument that by default is

control 
(type: list) A list of control parameters. More details in

lower 
(type: numeric) lower bound, replicated to be as long as

upper 
(type: numeric) upper bound, replicated to be as long as

m 
(type: numeric) truncation order of the MA infinity process, by
default m = 0.25n^{0.8}. Parameter used in 
n.ahead 
(type: numeric) The number of steps ahead for which prediction is required. By default is zero. 
This function estimates the parameters in models: LSARMA
Φ(t/T, \, B)\, Y_{t, T} = Θ(t/T,\, B)\,σ(t/T)\, \varepsilon_t
and LSARFIMA
Φ(t/T, \, B)\, Y_{t, T} = Θ(t/T,\, B)\, (1B)^{d(t/T)}\, σ(t/T)\, \varepsilon_t,
with infinite moving average expansion
Y_{t, T} = σ(t/T)\, ∑_{j=0}^{∞} ψ(t/T)\,\varepsilon_t,
for t = 1,…, T, where for
u = t/T \in [0,1], Φ(u,B)=1+φ_1(u)B +\cdots+φ_p(u)B^p
is an autoregressive polynomial,
Θ(u, B) = 1 + θ_1(u)B + \cdots + θ_q(u)B^q is a
moving average polynomial, d(u) is a longmemory parameter,
σ(u) is a noise scale factor and \{\varepsilon_t \} is a
Gaussian white noise sequence with zero mean and unit variance. This class
of models extends the wellknown ARMA and ARFIMA process, which is obtained
when the components Φ(u, B), Θ(u, B), d(u) and
σ(u) do not depend on u.
The evolution of these models can be specified in terms of a general class
of functions. For example, let \{g_j(u)\}, j = 1, 2, …, be
a basis for a space of smoothly varying functions and let
d_{θ}(u) be the timevarying longmemory parameter in model
LSARFIMA. Then we could write d_{θ}(u) in terms of the basis
\{g_j(u) = u^j\} as follows
d_{θ}(u) = ∑_{j=0}^{k} α_j\,g_j(u)
for unknown values of k and
θ = (α_0,\,α_1,\,…, \,α_k)^{\prime}.
In this situation, estimating θ involves determining k and
estimating the coefficients α_0,\,α_1,\,…, \,α_k.
LS.whittle
optimizes LS.whittle.loglik
as objective
function using nlminb
function, for both LSARMA
(include.d=FALSE
) and LSARFIMA (include.d=TRUE
) models.
Also computes Kalman filter with LS.kalman
and this values
are given in var.coef
in the output.
A list with the following components:
coef 
The best set of parameters found. 
var.coef 
covariance matrix approximated for maximum likelihood estimator \hat{θ} of θ:=(θ_1,…,θ_k)^{\prime}. This matrix is approximated by H^{1}/n, where H is the Hessian matrix [\partial^2 \ell(θ)/\partialθ_i \partialθ_j]_{i,j=1}^{k}. 
loglik 
loglikelihood of 
aic 
Akaike'S ‘An Information Criterion’, for one fitted model LSARMA
or LSARFIMA. The formula is 2L + 2k/n, where L represents the
loglikelihood, k represents the number of parameters in the fitted
model and n is equal to the length of the 
series 
original time serie. 
residuals 
standard residuals. 
fitted.values 
model fitted values. 
pred 
predictions of the model. 
se 
the estimated standard errors. 
model 
A list representing the fitted model. 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25  # Analysis by blocks of phi and sigma parameters
N < 200
S < 100
M < trunc((length(malleco)  N) / S + 1)
table < c()
for (j in 1:M) {
x < malleco[(1 + S * (j  1)):(N + S * (j  1))]
table < rbind(table, nlminb(
start = c(0.65, 0.15), N = N,
objective = LS.whittle.loglik,
series = x, order = c(p = 1, q = 0)
)$par)
}
u < (N / 2 + S * (1:M  1)) / length(malleco)
table < as.data.frame(cbind(u, table))
colnames(table) < c("u", "phi", "sigma")
# Start parameters
phi < smooth.spline(table$phi, spar = 1, tol = 0.01)$y
fit.1 < nls(phi ~ a0 + a1 * u, start = list(a0 = 0.65, a1 = 0.00))
sigma < smooth.spline(table$sigma, spar = 1)$y
fit.2 < nls(sigma ~ b0 + b1 * u, start = list(b0 = 0.65, b1 = 0.00))
fit_whittle < LS.whittle(
series = malleco, start = c(coef(fit.1), coef(fit.2)), order = c(p = 1, q = 0),
ar.order = 1, sd.order = 1, N = 180, n.ahead = 10
)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.