Skip to content

Commit 68b22ad

Browse files
committed
small fixes for CRAN submission
1 parent f073cf9 commit 68b22ad

15 files changed

Lines changed: 43 additions & 28 deletions

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Title: Time Series Forecasting Auxiliary Functions
44
Version: 1.0.0
55
Authors@R: c(person("Alexios", "Galanos", role = c("aut", "cre","cph"), email = "[email protected]", comment = c(ORCID = "0009-0000-9308-0457")))
66
Maintainer: Alexios Galanos <[email protected]>
7-
Description: General purpose calendar and auxiliary functions including normalizing transformations, outlier detection and forecast metrics for time series.
7+
Description: A suite of auxiliary functions that enhance time series estimation and forecasting, including a robust anomaly detection routine based on Chen and Liu (1993) <doi:10.2307/2290724> (imported and wrapped from the 'tsoutliers' package), utilities for managing calendar and time conversions, performance metrics to assess both point forecasts and distributional predictions, advanced simulation by allowing the generation of time series components—such as trend, seasonal, ARMA, irregular, and anomalies—in a modular fashion based on the innovations form of the state space model and a number of transformation methods including Box-Cox, Logit, 'Softplus-Logit' and Sigmoid.
88
Depends: R (>= 4.1.0), tsmethods
99
Imports: methods, zoo, xts, lubridate, car, Rdpack, scoringRules, stlplus, tsoutliers, forecast, data.table
1010
RdMacros: Rdpack

R/outliers.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#' Automatic Detection of Outliers, Trends Breaks and Temporary Changes
22
#'
33
#' @description
4-
#' A wrapper function for \emph{tso} from the \code{\link[tsoutliers]{tso}} package.
4+
#' A wrapper function for function \code{\link[tsoutliers]{tso}} from the tsoutliers package.
55
#' Takes as input a univariate xts object and returns a list with an xts object with any
66
#' identified outliers, trend breaks and/or temporary changes to be used as
77
#' regressors during estimation as well initial coefficients (see details).
@@ -305,12 +305,12 @@ auto_regressors <- function(y, frequency = 1, lambda = NULL, forc_dates = NULL,
305305

306306
#' Automatic Cleaning of Outliers and Temporary Changes
307307
#'
308-
#' A wrapper function for \emph{tso} from the tsoutliers packages. Takes as
309-
#' input a univariate xts object and returns a series decomtaminated from
308+
#' A wrapper function for \code{\link[tsoutliers]{tso}} from the tsoutliers package.
309+
#' Takes as input a univariate xts object and returns a series decontaminated from
310310
#' outliers and temporary changes.
311311
#'
312312
#' Calls the \code{\link[tsaux]{auto_regressors}} function to obtain the matrix of
313-
#' regressors and coefficients which are then used to decomtaminate the series.
313+
#' regressors and coefficients which are then used to decontaminate the series.
314314
#' If lambda is not NULL, the series is first transformed to perform the
315315
#' decontamination and then back transformed afterwards.
316316
#'

R/seasonal.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ seasonality_test <- function(x, frequency = NULL){
5757

5858

5959

60-
#' Fourier terms for modelling seasonality
60+
#' Fourier terms for modeling seasonality
6161
#'
6262
#' Returns a matrix containing terms from a Fourier series, up to order K
6363
#'

R/simulator.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ tsdecompose.issm.component <- function(object, ...)
530530
#' @param y the type of output to plot.
531531
#' @param ... additional parameters passed to the \code{\link[zoo]{plot.zoo}} function.
532532
#' @method plot issm.component
533+
#' @returns a plot of the simulated series or multiple plots of the simulation components.
533534
#' @aliases plot
534535
#' @rdname plot
535536
#' @export
@@ -557,6 +558,11 @@ plot.issm.component <- function(x, y = c("simulated","components"), ...)
557558
#' @param y not used.
558559
#' @param type character indicating the type of plotting.
559560
#' @param ... additional parameters passed to the lines function.
561+
#' @details
562+
#' Overlays the simulated series from the object (x), and is meant to be
563+
#' used when plotting different simulations from the same series
564+
#' for comparison.
565+
#' @returns a line plot.
560566
#' @method lines issm.component
561567
#' @aliases lines
562568
#' @rdname lines
@@ -576,7 +582,7 @@ lines.issm.component <- function(x, y = NULL, type = "l", ...)
576582
#' Anomaly Component
577583
#'
578584
#' @param x an object of class issm.component or other supported class.
579-
#' @param time the numeric index of when the anomaly occurs. If NULL, a ranom
585+
#' @param time the numeric index of when the anomaly occurs. If NULL, a random
580586
#' time will be chosen.
581587
#' @param delta the autoregressive component determining the type of anomaly. A
582588
#' value of zero results in an additive outlier, a value of 1 in a level shift
@@ -585,7 +591,7 @@ lines.issm.component <- function(x, y = NULL, type = "l", ...)
585591
#' value of 1 means that the anomaly will jump by 100 percent compared to the
586592
#' data series.
587593
#' @param ... additional parameters.
588-
#' @return An object of class issm.component updated with the anomaly
594+
#' @returns An object of class issm.component updated with the anomaly
589595
#' component.
590596
#' @method add_anomaly issm.component
591597
#' @aliases add_anomaly

R/transform.R

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,14 @@ logit <- function(lower = 0, upper = 1.0, ...)
5050
#'
5151
#' The function returns a list of 2 functions called \dQuote{transform} and
5252
#' \dQuote{inverse} which can be called with a data object and a frequency to
53-
#' calculate the transformed values. It is meant to be used in the transform
54-
#' argument of the model specifications in the ts universe of models. The
55-
#' auto_lambda function uses the method of Guerrero(1993).
53+
#' calculate the transformed values. The auto_lambda function uses the
54+
#' method of Guerrero(1993).
5655
#' @name box_cox
5756
#' @aliases box_cox
5857
#' @param lambda the power parameters. If NA then it will automatically
5958
#' calculate the optimal parameter using the method of Guerrero (for univariate
6059
#' case) else for the multivariate case, the method of Velilla (1993) which
61-
#' implemented in the \code{car} package of John Fox. This targets a
60+
#' is implemented in the \code{car} package of John Fox. This targets a
6261
#' transformation to multivariate normality. If any of the inputs has a
6362
#' frequency other than 1, then an stl decomposition is first applied and the
6463
#' seasonal component removed prior to the estimation in order to avoid
@@ -352,11 +351,11 @@ sigmoid_inverse <- function(x, lower = 0, upper = 1) {
352351

353352
#' General transformation function
354353
#'
355-
#' Includes the Box Cox, logit, softplus-logit and sigmoif transforms.
354+
#' Includes the Box Cox, logit, softplus-logit and sigmoid transforms.
356355
#' Returns a list of functions for the transform and its inverse.
357356
#'
358357
#' @param method valid methods are currently \dQuote{box-cox},
359-
#' \dQuote{logit}, \dQuote{soft-logit} and \dQuote{sigmoid}.
358+
#' \dQuote{logit}, \dQuote{softplus-logit} and \dQuote{sigmoid}.
360359
#' @param lambda parameter in the Box Cox transformation.
361360
#' @param lower lower bound for the transformations.
362361
#' @param upper upper bound for the transformations.

man/add_anomaly.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/auto_clean.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/auto_regressors.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/box_cox.Rd

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/fourier_series.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)