SubsetPM-class | R Documentation |
Class "SubsetPM"
- subset PAR models with trigonometric
parameterisation.
Objects can be created by calls of the form new("SubsetPM", ...)
but they are typically created by model fitting functions, see the examples.
theTS
:"ANY"
, the time series to which the model is fitted.
period
:"integer"
, the period.
order
:"integer"
, the order.
findex
:"function"
.
harmonics
:"integer"
, Fourier harmonics to include in the model.
call
:"call"
, the call used to fit the model.
other
:"namedList"
.
signature(object = "SubsetPM")
: ...
signature(object = "SubsetPM")
: ...
signature(object = "SubsetPM")
: ...
signature(object = "SubsetPM")
: ...
signature(object = "SubsetPM")
: ...
fit_trigPAR_optim
pcfr4 <- pcts(dataFranses1996)[[4]]
x4 <- as.numeric(window(pcfr4, start = availStart(pcfr4), end = availEnd(pcfr4)))
## without 'harmonics' these models are equivalent
tmpfit <- fit_trigPAR_optim(x4, 2, 4, tol = 1e-14, verbose = FALSE)
tmpfitL <- fit_trigPAR_optim(x4, 2, 4, tol = 1e-14, type = "bylag", verbose = FALSE)
## for comparison
tmpfitP <- pclsdf(x4, 4, 1:2, sintercept = FALSE)
## with intercept
tmpfitc <- fit_trigPAR_optim(x4, 2, 4, tol = 1e-14, verbose = FALSE,
sintercept = TRUE)
tmpfitcn <- fit_trigPAR_optim(x4, 2, 4, tol = 1e-14, verbose = FALSE,
sintercept = structure(TRUE, merge = TRUE))
tmpfitLc <- fit_trigPAR_optim(x4, 2, 4, tol = 1e-14, type = "bylag",
verbose = FALSE, sintercept = TRUE)
coef(tmpfitc, matrix = TRUE)
coef(tmpfitcn, matrix = TRUE)
coef(tmpfitLc, matrix = TRUE)
coef(tmpfitc)
coef(tmpfitcn)
coef(tmpfitLc)
coef(tmpfit)
coef(tmpfitL)
## convert to PAR coefficients:
coef(tmpfitc, type = "PAR", matrix = TRUE)
coef(tmpfitcn, type = "PAR", matrix = TRUE)
coef(tmpfitLc, type = "PAR", matrix = TRUE)
coef(tmpfitL, type = "PAR", matrix = TRUE)
predict(tmpfitc, n.ahead = 4)
predict(tmpfitcn, n.ahead = 4)
sqrt(diag((vcov(tmpfitL))))
e <- residuals(tmpfitL)
fi <- fitted(tmpfitL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.