From 07721f2d6f0ebe5ba3c3bbdc51e04f45d76a2b4d Mon Sep 17 00:00:00 2001 From: Tanguy BARTHELEMY Date: Fri, 18 Oct 2024 16:30:43 +0200 Subject: [PATCH 1/4] update lintr with string_as_factor_linter --- R/display.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/display.R b/R/display.R index 15518e5e..287a04e8 100644 --- a/R/display.R +++ b/R/display.R @@ -190,7 +190,8 @@ print.summary.JD3_SARIMA_ESTIMATION <- function(x, digits = max(3L, getOption("d stde <- sqrt(diag(x$parameters$cov)) t <- estimate / stde pval <- 2 * pt(abs(t), ndf, lower.tail = FALSE) - table <- data.frame(estimate, "ESTIMATED", stde, t, pval) + table <- data.frame(estimate, "ESTIMATED", stde, t, pval, + stringsAsFactors = FALSE) colnames(table) <- c( "Estimate", "Type", "Std. Error", "T-stat", "Pr(>|t|)" @@ -398,7 +399,8 @@ print.JD3_SARIMA_ESTIMATE <- function(x, digits = max(3L, getOption("digits") - stde <- sqrt(diag(x$bvar)) t <- estimate / stde pval <- 2 * pt(abs(t), ndf, lower.tail = FALSE) - table <- data.frame(estimate, "ESTIMATED", stde, t, pval) + table <- data.frame(estimate, "ESTIMATED", stde, t, pval, + stringsAsFactors = FALSE) colnames(table) <- c( "Estimate", "Type", "Std. Error", "T-stat", "Pr(>|t|)" From 9e61cfad3c6e6c7c98ea14b312cf69095b12fa03 Mon Sep 17 00:00:00 2001 From: Tanguy BARTHELEMY Date: Fri, 25 Oct 2024 10:24:50 +0200 Subject: [PATCH 2/4] document --- man/add_usrdefvar.Rd | 16 ++++++------ man/aggregate.Rd | 2 +- man/arima_difference.Rd | 4 +-- man/arima_model.Rd | 2 +- man/arima_properties.Rd | 2 +- man/arima_sum.Rd | 4 +-- man/autocorrelations.Rd | 2 +- man/calendar_td.Rd | 11 ++++++--- man/chained_calendar.Rd | 6 ++--- man/data_to_ts.Rd | 4 +-- man/differences.Rd | 2 +- man/differencing_fast.Rd | 2 +- man/do_stationary.Rd | 2 +- man/easter_dates.Rd | 2 +- man/easter_day.Rd | 8 +++--- man/easter_variable.Rd | 4 +-- man/fixed_day.Rd | 4 +-- man/holidays.Rd | 25 ++++++++++--------- man/intervention_variable.Rd | 16 ++++++------ man/ljungbox.Rd | 4 +-- man/long_term_mean.Rd | 28 +++++++++++---------- man/lp_variable.Rd | 4 +-- man/mad.Rd | 4 +-- man/modelling_context.Rd | 14 ++++++----- man/national_calendar.Rd | 35 +++++++++++++++------------ man/normality_tests.Rd | 2 +- man/outliers_variables.Rd | 16 ++++++------ man/periodic.dummies.Rd | 8 +++--- man/r2jd_calendarts.Rd | 8 +++--- man/ramp_variable.Rd | 4 +-- man/rangemean_tstat.Rd | 10 ++++---- man/sarima_decompose.Rd | 2 +- man/sarima_estimate.Rd | 2 +- man/sarima_hannan_rissanen.Rd | 2 +- man/sarima_random.Rd | 2 +- man/seasonality_canovahansen.Rd | 6 ++--- man/seasonality_canovahansen_trigs.Rd | 6 ++--- man/seasonality_combined.Rd | 2 +- man/seasonality_f.Rd | 2 +- man/seasonality_friedman.Rd | 2 +- man/seasonality_kruskalwallis.Rd | 2 +- man/seasonality_modified_qs.Rd | 2 +- man/seasonality_periodogram.Rd | 2 +- man/seasonality_qs.Rd | 2 +- man/set_tradingdays.Rd | 25 ++++++++++--------- man/special_day.Rd | 6 +++-- man/statisticaltest.Rd | 2 +- man/td.Rd | 4 +-- man/td_canovahansen.Rd | 4 +-- man/td_timevarying.Rd | 2 +- man/tsdata_of.Rd | 4 +-- man/ucarima_canonical.Rd | 6 ++--- man/ucarima_estimate.Rd | 12 ++++----- man/ucarima_model.Rd | 4 +-- man/ucarima_wk.Rd | 10 ++++---- man/weighted_calendar.Rd | 6 ++--- 56 files changed, 198 insertions(+), 176 deletions(-) diff --git a/man/add_usrdefvar.Rd b/man/add_usrdefvar.Rd index 311c3301..ad24faed 100644 --- a/man/add_usrdefvar.Rd +++ b/man/add_usrdefvar.Rd @@ -61,19 +61,21 @@ the seasonally adjusted series: \eqn{sa_t=T+I+effect} \examples{ # creating one or several external regressors (TS objects), # which will be gathered in one or several groups -iv1<-intervention_variable(12, c(2000, 1), 60, -starts = "2001-01-01", ends = "2001-12-01") -iv2<- intervention_variable(12, c(2000, 1), 60, -starts = "2001-01-01", ends = "2001-12-01", delta = 1) +iv1 <- intervention_variable(12, c(2000, 1), 60, + starts = "2001-01-01", ends = "2001-12-01" +) +iv2 <- intervention_variable(12, c(2000, 1), 60, + starts = "2001-01-01", ends = "2001-12-01", delta = 1 +) # configuration 1: regressors in the same default group (named "r") -variables<-list("iv1"=iv1, "iv2"=iv2) +variables <- list("iv1" = iv1, "iv2" = iv2) # to use those regressors, input : name=r.iv1 and r.iv2 in add_usrdefvar function # configuration 2: group names are user-defined # here: regressors as a list of two groups (lists) reg1 and reg2 -vars<-list(reg1=list(iv1 = iv1),reg2=list(iv2 = iv2) ) +vars <- list(reg1 = list(iv1 = iv1), reg2 = list(iv2 = iv2)) # to use those regressors, input : name=reg1.iv1 and name=reg2.iv2 in add_usrdefvar function # creating the modelling context -my_context<-modelling_context(variables=vars) +my_context <- modelling_context(variables = vars) # customize a default specification # init_spec <- rjd3x13::x13_spec("RSA5c") # regressors have to be added one by one diff --git a/man/aggregate.Rd b/man/aggregate.Rd index 4d340dbe..d9ef5fbd 100644 --- a/man/aggregate.Rd +++ b/man/aggregate.Rd @@ -30,7 +30,7 @@ A new time series of frequency \code{nfreq}. Makes a frequency change of this series. } \examples{ -s = ABS$X0.2.09.10.M +s <- ABS$X0.2.09.10.M # Annual sum aggregate(s, nfreq = 1, conversion = "Sum") # first and last years removed aggregate(s, nfreq = 1, conversion = "Sum", complete = FALSE) diff --git a/man/arima_difference.Rd b/man/arima_difference.Rd index adf6ad37..2bfcc560 100644 --- a/man/arima_difference.Rd +++ b/man/arima_difference.Rd @@ -20,8 +20,8 @@ a \code{"JD3_ARIMA"} model. Remove an arima model from an existing one. More exactly, m_diff = m_left - m_right iff m_left = m_right + m_diff. } \examples{ -mod1 = arima_model(delta = c(1,-2,1)) -mod2 = arima_model(variance=.01) +mod1 <- arima_model(delta = c(1, -2, 1)) +mod2 <- arima_model(variance = .01) diff <- arima_difference(mod1, mod2) sum <- arima_sum(diff, mod2) # sum should be equal to mod1 diff --git a/man/arima_model.Rd b/man/arima_model.Rd index 5b07c942..874f7e8f 100644 --- a/man/arima_model.Rd +++ b/man/arima_model.Rd @@ -24,5 +24,5 @@ a \code{"JD3_ARIMA"} model. ARIMA Model } \examples{ -model <- arima_model("trend", ar=c(1,-.8), delta = c(1,-1), ma=c(1,-.5), var=100) +model <- arima_model("trend", ar = c(1, -.8), delta = c(1, -1), ma = c(1, -.5), var = 100) } diff --git a/man/arima_properties.Rd b/man/arima_properties.Rd index 9682975d..f6576cb1 100644 --- a/man/arima_properties.Rd +++ b/man/arima_properties.Rd @@ -20,6 +20,6 @@ A list with tha auto-covariances and with the (pseudo-)spectrum Properties of an ARIMA model; the (pseudo-)spectrum and the auto-covariances of the model are returned } \examples{ -mod1 <- arima_model(ar = c(0.1, 0.2), delta = c(1,-1), ma = 0) +mod1 <- arima_model(ar = c(0.1, 0.2), delta = c(1, -1), ma = 0) arima_properties(mod1) } diff --git a/man/arima_sum.Rd b/man/arima_sum.Rd index 49221879..31b4ac36 100644 --- a/man/arima_sum.Rd +++ b/man/arima_sum.Rd @@ -25,7 +25,7 @@ polynomials is then computed and factorized, to get the moving average polynomial and innovation variance of the sum. } \examples{ -mod1 = arima_model(ar = c(0.1, 0.2), delta = 0, ma = 0) -mod2 = arima_model(ar = 0, delta = 0, ma = c(0.4)) +mod1 <- arima_model(ar = c(0.1, 0.2), delta = 0, ma = 0) +mod2 <- arima_model(ar = 0, delta = 0, ma = c(0.4)) arima_sum(mod1, mod2) } diff --git a/man/autocorrelations.Rd b/man/autocorrelations.Rd index 345f9557..7d50de23 100644 --- a/man/autocorrelations.Rd +++ b/man/autocorrelations.Rd @@ -26,7 +26,7 @@ If \code{FALSE}, we consider that the (known) mean is 0 and that the series has Autocorrelation Functions } \examples{ -x = ABS$X0.2.09.10.M +x <- ABS$X0.2.09.10.M autocorrelations(x) autocorrelations_partial(x) autocorrelations_inverse(x) diff --git a/man/calendar_td.Rd b/man/calendar_td.Rd index 9837dc89..596762d5 100644 --- a/man/calendar_td.Rd +++ b/man/calendar_td.Rd @@ -55,7 +55,7 @@ Regressors are corrected for long-term mean if \code{contrasts = TRUE}. } \examples{ BE <- national_calendar(list( - fixed_day(7,21), + fixed_day(7, 21), special_day("NEWYEAR"), special_day("CHRISTMAS"), special_day("MAYDAY"), @@ -64,9 +64,12 @@ BE <- national_calendar(list( special_day("WHITMONDAY"), special_day("ASSUMPTION"), special_day("ALLSAINTSDAY"), - special_day("ARMISTICE"))) -calendar_td(BE, 12, c(1980,1), 240, holiday=7, groups=c(1,1,1,2,2,3,0), -contrasts = FALSE) + special_day("ARMISTICE") +)) +calendar_td(BE, 12, c(1980, 1), 240, + holiday = 7, groups = c(1, 1, 1, 2, 2, 3, 0), + contrasts = FALSE +) } \references{ More information on calendar correction in JDemetra+ online documentation: diff --git a/man/chained_calendar.Rd b/man/chained_calendar.Rd index 455c5d04..ff0b026e 100644 --- a/man/chained_calendar.Rd +++ b/man/chained_calendar.Rd @@ -23,9 +23,9 @@ In such a case two calendars describing the situation before and after the chang and bound together, one before the break and one after the break. } \examples{ -Belgium <- national_calendar(list(special_day("NEWYEAR"),fixed_day(7,21))) -France <- national_calendar(list(special_day("NEWYEAR"),fixed_day(7,14))) -chained_cal<-chained_calendar(France, Belgium, "2000-01-01") +Belgium <- national_calendar(list(special_day("NEWYEAR"), fixed_day(7, 21))) +France <- national_calendar(list(special_day("NEWYEAR"), fixed_day(7, 14))) +chained_cal <- chained_calendar(France, Belgium, "2000-01-01") } \references{ diff --git a/man/data_to_ts.Rd b/man/data_to_ts.Rd index 1fb6a60c..25c52fef 100644 --- a/man/data_to_ts.Rd +++ b/man/data_to_ts.Rd @@ -15,6 +15,6 @@ data_to_ts(s, name) Promote a R time series to a "full" \code{ts} of JDemetra+ } \examples{ -s<-ABS$X0.2.09.10.M -t<-data_to_ts(s,"test") +s <- ABS$X0.2.09.10.M +t <- data_to_ts(s, "test") } diff --git a/man/differences.Rd b/man/differences.Rd index 70d5f4c4..7da82211 100644 --- a/man/differences.Rd +++ b/man/differences.Rd @@ -20,6 +20,6 @@ The differenced series. Differencing of a series } \examples{ -differences(retail$BookStores, c(1,1,12), FALSE) +differences(retail$BookStores, c(1, 1, 12), FALSE) } diff --git a/man/differencing_fast.Rd b/man/differencing_fast.Rd index d977c5b7..195013ef 100644 --- a/man/differencing_fast.Rd +++ b/man/differencing_fast.Rd @@ -33,6 +33,6 @@ Stationary transformation The series is differenced till its variance is decreasing. } \examples{ -differencing_fast(log(ABS$X0.2.09.10.M),12) +differencing_fast(log(ABS$X0.2.09.10.M), 12) } diff --git a/man/do_stationary.Rd b/man/do_stationary.Rd index 7a0170dc..b4ae123b 100644 --- a/man/do_stationary.Rd +++ b/man/do_stationary.Rd @@ -29,5 +29,5 @@ The series should not be seasonal. Source: Tramo } \examples{ -do_stationary(log(ABS$X0.2.09.10.M),12) +do_stationary(log(ABS$X0.2.09.10.M), 12) } diff --git a/man/easter_dates.Rd b/man/easter_dates.Rd index d07629c6..fd400d06 100644 --- a/man/easter_dates.Rd +++ b/man/easter_dates.Rd @@ -20,7 +20,7 @@ Allows to display the date of Easter Sunday for each year, in the defined period displayed in "YYYY-MM-DD" format and as a number of days since January 1st 1970. } \examples{ -#Dates from 2018(included) to 2023 (included) +# Dates from 2018(included) to 2023 (included) easter_dates(2018, 2023) } \references{ diff --git a/man/easter_day.Rd b/man/easter_day.Rd index a14c7990..f5f1d046 100644 --- a/man/easter_day.Rd +++ b/man/easter_day.Rd @@ -19,12 +19,14 @@ easter_day(offset, julian = FALSE, weight = 1, validity = NULL) Allows to define a holiday which date is related to Easter Sunday. } \examples{ -easter_day(1) #Easter Monday +easter_day(1) # Easter Monday easter_day(-2) # Easter Good Friday # Corpus Christi 60 days after Easter # Sunday in Julian calendar with weight 0.5, from January 2000 to December 2020 -easter_day(offset=60,julian=TRUE,weight=0.5, -validity = list(start="2000-01-01", end = "2020-12-01")) +easter_day( + offset = 60, julian = TRUE, weight = 0.5, + validity = list(start = "2000-01-01", end = "2020-12-01") +) } \references{ More information on calendar correction in JDemetra+ online documentation: diff --git a/man/easter_variable.Rd b/man/easter_variable.Rd index e4456d2a..ac9154fd 100644 --- a/man/easter_variable.Rd +++ b/man/easter_variable.Rd @@ -40,8 +40,8 @@ A time series (object of class \code{"ts"}) Allows to generate a regressor taking into account the (Julian) Easter effect in monthly or quarterly time series. } \examples{ -#Monthly regressor, five-year long, duration 8 days, effect finishing on Easter Monday -ee<-easter_variable(12, c(2020,1),length=5*12,duration=8, endpos=1) +# Monthly regressor, five-year long, duration 8 days, effect finishing on Easter Monday +ee <- easter_variable(12, c(2020, 1), length = 5 * 12, duration = 8, endpos = 1) } \references{ More information on calendar correction in JDemetra+ online documentation: diff --git a/man/fixed_day.Rd b/man/fixed_day.Rd index 86d5a66f..c6f02f73 100644 --- a/man/fixed_day.Rd +++ b/man/fixed_day.Rd @@ -22,10 +22,10 @@ like Christmas which is always celebrated on December 25th. } \examples{ day <- fixed_day(7, 21, .9) -day # July 21st, with weight=0.9, on the whole sample +day # July 21st, with weight=0.9, on the whole sample day <- fixed_day(12, 25, .5, validity = list(start = "2010-01-01")) day # December 25th, with weight=0.5, from January 2010 -day <- fixed_day(12, 25, .5, validity = list(start="1968-02-01", end = "2010-01-01")) +day <- fixed_day(12, 25, .5, validity = list(start = "1968-02-01", end = "2010-01-01")) day # December 25th, with weight=0.9, from February 1968 until January 2010 } \references{ diff --git a/man/holidays.Rd b/man/holidays.Rd index f6abedea..4c550140 100644 --- a/man/holidays.Rd +++ b/man/holidays.Rd @@ -44,18 +44,19 @@ This kind of non-aggregated regressors are used for calendar correction in daily } \examples{ BE <- national_calendar(list( - fixed_day(7,21), - special_day("NEWYEAR"), - special_day("CHRISTMAS"), - special_day("MAYDAY"), - special_day("EASTERMONDAY"), - special_day("ASCENSION"), - special_day("WHITMONDAY"), - special_day("ASSUMPTION"), - special_day("ALLSAINTSDAY"), - special_day("ARMISTICE"))) -q<-holidays(BE, "2021-01-01", 366*10, type="All") -plot(apply(q,1, max)) + fixed_day(7, 21), + special_day("NEWYEAR"), + special_day("CHRISTMAS"), + special_day("MAYDAY"), + special_day("EASTERMONDAY"), + special_day("ASCENSION"), + special_day("WHITMONDAY"), + special_day("ASSUMPTION"), + special_day("ALLSAINTSDAY"), + special_day("ARMISTICE") +)) +q <- holidays(BE, "2021-01-01", 366 * 10, type = "All") +plot(apply(q, 1, max)) } \references{ More information on calendar correction in JDemetra+ online documentation: diff --git a/man/intervention_variable.Rd b/man/intervention_variable.Rd index 78ef25aa..73561828 100644 --- a/man/intervention_variable.Rd +++ b/man/intervention_variable.Rd @@ -48,17 +48,19 @@ by the parameters \code{starts} and \code{ends}. With \code{delta = 1} and \code the cumulative sum of temporary level shifts, once differenced the regressor will become a classical level shift. } \examples{ -iv1<-intervention_variable(12, c(2000, 1), 60, - starts = "2001-01-01", ends = "2001-12-01") +iv1 <- intervention_variable(12, c(2000, 1), 60, + starts = "2001-01-01", ends = "2001-12-01" +) plot(iv1) -iv2<- intervention_variable(12, c(2000, 1), 60, - starts = "2001-01-01", ends = "2001-12-01", delta = 1) -plot (iv2) +iv2 <- intervention_variable(12, c(2000, 1), 60, + starts = "2001-01-01", ends = "2001-12-01", delta = 1 +) +plot(iv2) # using one variable in a a seasonal adjustment process # regressors as a list of two groups reg1 and reg2 -vars<-list(reg1=list(x = iv1),reg2=list(x = iv2) ) +vars <- list(reg1 = list(x = iv1), reg2 = list(x = iv2)) # creating the modelling context -my_context<-modelling_context(variables=vars) +my_context <- modelling_context(variables = vars) # customize a default specification # init_spec <- rjd3x13::x13_spec("RSA5c") # new_spec<- add_usrdefvar(init_spec,id = "reg1.iv1", regeffect="Trend") diff --git a/man/ljungbox.Rd b/man/ljungbox.Rd index 8ceda81e..4bae32c9 100644 --- a/man/ljungbox.Rd +++ b/man/ljungbox.Rd @@ -29,6 +29,6 @@ A \code{c("JD3_TEST", "JD3")} object (see \code{\link[=statisticaltest]{statisti Compute Ljung-Box test to check the independence of a data. } \examples{ -ljungbox(random_t(2, 100), lag = 24, k =1) -ljungbox(ABS$X0.2.09.10.M, lag = 24, k =1) +ljungbox(random_t(2, 100), lag = 24, k = 1) +ljungbox(ABS$X0.2.09.10.M, lag = 24, k = 1) } diff --git a/man/long_term_mean.Rd b/man/long_term_mean.Rd index 04f50341..c263b27c 100644 --- a/man/long_term_mean.Rd +++ b/man/long_term_mean.Rd @@ -39,17 +39,19 @@ A long-term mean is a probability based computation of the average value for eve } \examples{ BE <- national_calendar(list( -fixed_day(7,21), -special_day("NEWYEAR"), -special_day("CHRISTMAS"), -special_day("MAYDAY"), -special_day("EASTERMONDAY"), -special_day("ASCENSION"), -special_day("WHITMONDAY"), -special_day("ASSUMPTION"), -special_day("ALLSAINTSDAY"), -special_day("ARMISTICE"))) -lt<-long_term_mean(BE,12, - groups = c(1,1,1,1,1,0,0), - holiday = 7) + fixed_day(7, 21), + special_day("NEWYEAR"), + special_day("CHRISTMAS"), + special_day("MAYDAY"), + special_day("EASTERMONDAY"), + special_day("ASCENSION"), + special_day("WHITMONDAY"), + special_day("ASSUMPTION"), + special_day("ALLSAINTSDAY"), + special_day("ARMISTICE") +)) +lt <- long_term_mean(BE, 12, + groups = c(1, 1, 1, 1, 1, 0, 0), + holiday = 7 +) } diff --git a/man/lp_variable.Rd b/man/lp_variable.Rd index 7fccf57f..7646b59a 100644 --- a/man/lp_variable.Rd +++ b/man/lp_variable.Rd @@ -32,8 +32,8 @@ Allows to generate a regressor correcting for the leap year or length-of-period } \examples{ # Leap years occur in year 2000, 2004, 2008 and 2012 -lp_variable(4, start = c(2000, 1), length = 4*13) -lper<-lp_variable(12,c(2000,1),length=10*12,type ="LengthOfPeriod") +lp_variable(4, start = c(2000, 1), length = 4 * 13) +lper <- lp_variable(12, c(2000, 1), length = 10 * 12, type = "LengthOfPeriod") } \references{ More information on calendar correction in JDemetra+ online documentation: diff --git a/man/mad.Rd b/man/mad.Rd index 7fef9fe3..ec1d66e0 100644 --- a/man/mad.Rd +++ b/man/mad.Rd @@ -20,6 +20,6 @@ The median absolute deviation Compute a robust median absolute deviation (MAD) } \examples{ -y<-rnorm(1000) -m<-rjd3toolkit::mad(y, centile=70) +y <- rnorm(1000) +m <- rjd3toolkit::mad(y, centile = 70) } diff --git a/man/modelling_context.Rd b/man/modelling_context.Rd index b00e4868..48ac647b 100644 --- a/man/modelling_context.Rd +++ b/man/modelling_context.Rd @@ -22,14 +22,16 @@ or come from any other source, provided they are \code{ts} class objects. \examples{ # creating one or several external regressors (TS objects), which will # be gathered in one or several groups -iv1<-intervention_variable(12, c(2000, 1), 60, -starts = "2001-01-01", ends = "2001-12-01") -iv2<- intervention_variable(12, c(2000, 1), 60, -starts = "2001-01-01", ends = "2001-12-01", delta = 1) +iv1 <- intervention_variable(12, c(2000, 1), 60, + starts = "2001-01-01", ends = "2001-12-01" +) +iv2 <- intervention_variable(12, c(2000, 1), 60, + starts = "2001-01-01", ends = "2001-12-01", delta = 1 +) # regressors as a list of two groups reg1 and reg2 -vars<-list(reg1=list(x = iv1),reg2=list(x = iv2) ) +vars <- list(reg1 = list(x = iv1), reg2 = list(x = iv2)) # creating the modelling context -my_context<-modelling_context(variables=vars) +my_context <- modelling_context(variables = vars) # customize a default specification # init_spec <- rjd3x13::x13_spec("RSA5c") # new_spec<- add_usrdefvar(init_spec,name = "reg1.iv1", regeffect="Trend") diff --git a/man/national_calendar.Rd b/man/national_calendar.Rd index a26faa0d..445e676f 100644 --- a/man/national_calendar.Rd +++ b/man/national_calendar.Rd @@ -21,23 +21,26 @@ The holidays have to be generated by one of these functions: \code{fixed_day()}, \code{fixed_week_day()}, \code{easter_day()}, \code{special_day()} or \code{single_day()}. } \examples{ -#Fictional calendar using all possibilities to set the required holidays +# Fictional calendar using all possibilities to set the required holidays MyCalendar <- national_calendar(list( - fixed_day(7,21), - special_day("NEWYEAR"), - special_day("CHRISTMAS"), - fixed_week_day(7, 2, 3), # second Wednesday of July - special_day("MAYDAY"), - easter_day(1), # Easter Monday - easter_day(-2), # Good Friday - single_day("2001-09-11"), # appearing once - special_day("ASCENSION"), - easter_day(offset=60, julian=FALSE, weight=0.5, - validity = list(start="2000-01-01", end = "2020-12-01")), # Corpus Christi - special_day("WHITMONDAY"), - special_day("ASSUMPTION"), - special_day("ALLSAINTSDAY"), - special_day("ARMISTICE"))) + fixed_day(7, 21), + special_day("NEWYEAR"), + special_day("CHRISTMAS"), + fixed_week_day(7, 2, 3), # second Wednesday of July + special_day("MAYDAY"), + easter_day(1), # Easter Monday + easter_day(-2), # Good Friday + single_day("2001-09-11"), # appearing once + special_day("ASCENSION"), + easter_day( + offset = 60, julian = FALSE, weight = 0.5, + validity = list(start = "2000-01-01", end = "2020-12-01") + ), # Corpus Christi + special_day("WHITMONDAY"), + special_day("ASSUMPTION"), + special_day("ALLSAINTSDAY"), + special_day("ARMISTICE") +)) } \references{ More information on calendar correction in JDemetra+ online documentation: diff --git a/man/normality_tests.Rd b/man/normality_tests.Rd index d97ce53c..13b1f5db 100644 --- a/man/normality_tests.Rd +++ b/man/normality_tests.Rd @@ -46,7 +46,7 @@ Set of functions to test the normality of a time series. }} \examples{ -x <- rnorm(100) # null +x <- rnorm(100) # null bowmanshenton(x) doornikhansen(x) jarquebera(x) diff --git a/man/outliers_variables.Rd b/man/outliers_variables.Rd index 5b984ea5..6f14f976 100644 --- a/man/outliers_variables.Rd +++ b/man/outliers_variables.Rd @@ -52,11 +52,13 @@ A seasonal outlier (SO, \code{so_variable}) is defined as (if \code{zeroended = -\frac{1}{s-1} & \text{otherwise }\end{cases}} } \examples{ -#Outliers in February 2002 -ao <- ao_variable(12, c(2000,1), length = 12*4, date = "2002-02-01") -ls <- ls_variable(12, c(2000,1), length = 12*4, date = "2002-02-01") -tc <- tc_variable(12, c(2000,1), length = 12*4, date = "2002-02-01") -so <- so_variable(12, c(2000,1), length = 12*4, date = "2002-02-01") -plot.ts(ts.union(ao, ls, tc, so), plot.type = "single", - col = c("black", "orange", "green", "gray")) +# Outliers in February 2002 +ao <- ao_variable(12, c(2000, 1), length = 12 * 4, date = "2002-02-01") +ls <- ls_variable(12, c(2000, 1), length = 12 * 4, date = "2002-02-01") +tc <- tc_variable(12, c(2000, 1), length = 12 * 4, date = "2002-02-01") +so <- so_variable(12, c(2000, 1), length = 12 * 4, date = "2002-02-01") +plot.ts(ts.union(ao, ls, tc, so), + plot.type = "single", + col = c("black", "orange", "green", "gray") +) } diff --git a/man/periodic.dummies.Rd b/man/periodic.dummies.Rd index c5e55739..f91e5a7b 100644 --- a/man/periodic.dummies.Rd +++ b/man/periodic.dummies.Rd @@ -28,8 +28,8 @@ The periodic.contrasts function is based on periodic.dummies but adds -1 to the } \examples{ # periodic dummies for a quarterly series -p<-periodic.dummies(4, c(2000,1), 60) -#periodic contrasts for a quarterly series -q<-periodic.contrasts(4, c(2000,1), 60) -q[1:9,] +p <- periodic.dummies(4, c(2000, 1), 60) +# periodic contrasts for a quarterly series +q <- periodic.contrasts(4, c(2000, 1), 60) +q[1:9, ] } diff --git a/man/r2jd_calendarts.Rd b/man/r2jd_calendarts.Rd index 86c203c9..255b717d 100644 --- a/man/r2jd_calendarts.Rd +++ b/man/r2jd_calendarts.Rd @@ -13,9 +13,9 @@ r2jd_calendarts(calendarobs) Create Java CalendarTimeSeries } \examples{ -obs<-list( -list(start=as.Date("1980-01-01"), end=as.Date("1999-12-31"), value=2000), -list(start=as.Date("2000-01-01"), end=as.Date("2010-01-01"), value=1000) +obs <- list( + list(start = as.Date("1980-01-01"), end = as.Date("1999-12-31"), value = 2000), + list(start = as.Date("2000-01-01"), end = as.Date("2010-01-01"), value = 1000) ) -jobj<-r2jd_calendarts(obs) +jobj <- r2jd_calendarts(obs) } diff --git a/man/ramp_variable.Rd b/man/ramp_variable.Rd index df7545bd..e1062a4b 100644 --- a/man/ramp_variable.Rd +++ b/man/ramp_variable.Rd @@ -33,8 +33,8 @@ A ramp between two dates \eqn{t_0} and \eqn{t_1} is defined as: } \examples{ # Ramp variable from January 2001 to September 2001 -rp <- ramp_variable(12, c(2000,1), length = 12*4, range = c(13, 21)) +rp <- ramp_variable(12, c(2000, 1), length = 12 * 4, range = c(13, 21)) # Or equivalently -rp<-ramp_variable(12, c(2000,1), length = 12*4, range = c("2001-01-01", "2001-09-02")) +rp <- ramp_variable(12, c(2000, 1), length = 12 * 4, range = c("2001-01-01", "2001-09-02")) plot.ts(rp) } diff --git a/man/rangemean_tstat.Rd b/man/rangemean_tstat.Rd index 3dc8df04..7abc9dca 100644 --- a/man/rangemean_tstat.Rd +++ b/man/rangemean_tstat.Rd @@ -49,19 +49,19 @@ The function \code{rangemean_tstat} returns the T-statistic associated to \eqn{\ If it is significantly higher than 0, log transformation is recommended. } \examples{ -y = ABS$X0.2.09.10.M +y <- ABS$X0.2.09.10.M # Multiplicative pattern plot(y) -period = 12 -rm_t = rangemean_tstat(y, period = period, groupsize = period) +period <- 12 +rm_t <- rangemean_tstat(y, period = period, groupsize = period) rm_t # higher than 0 # Can be tested: pt(rm_t, period - 2, lower.tail = FALSE) # Or : -1-cdf_t(period-2, rm_t) +1 - cdf_t(period - 2, rm_t) # Close to 0 -rm_t_log = rangemean_tstat(log(y), period = period, groupsize = period) +rm_t_log <- rangemean_tstat(log(y), period = period, groupsize = period) rm_t_log pt(rm_t_log, period - 2, lower.tail = FALSE) } diff --git a/man/sarima_decompose.Rd b/man/sarima_decompose.Rd index 7491a3a7..a6697686 100644 --- a/man/sarima_decompose.Rd +++ b/man/sarima_decompose.Rd @@ -20,7 +20,7 @@ An UCARIMA model Decompose SARIMA Model into three components trend, seasonal, irregular } \examples{ -model <- sarima_model(period = 12, d =1, bd = 1, theta = -0.6, btheta = -0.5) +model <- sarima_model(period = 12, d = 1, bd = 1, theta = -0.6, btheta = -0.5) ucm <- sarima_decompose(model) } diff --git a/man/sarima_estimate.Rd b/man/sarima_estimate.Rd index 818726d9..4703ca92 100644 --- a/man/sarima_estimate.Rd +++ b/man/sarima_estimate.Rd @@ -32,5 +32,5 @@ Estimate SARIMA Model } \examples{ y <- ABS$X0.2.09.10.M -sarima_estimate(y, order = c(0,1,1), seasonal = c(0,1,1)) +sarima_estimate(y, order = c(0, 1, 1), seasonal = c(0, 1, 1)) } diff --git a/man/sarima_hannan_rissanen.Rd b/man/sarima_hannan_rissanen.Rd index d0faa56a..2c247b71 100644 --- a/man/sarima_hannan_rissanen.Rd +++ b/man/sarima_hannan_rissanen.Rd @@ -32,5 +32,5 @@ Title } \examples{ y <- ABS$X0.2.09.10.M -sarima_hannan_rissanen(y, order = c(0,1,1), seasonal = c(0,1,1)) +sarima_hannan_rissanen(y, order = c(0, 1, 1), seasonal = c(0, 1, 1)) } diff --git a/man/sarima_random.Rd b/man/sarima_random.Rd index 21111699..59b9e314 100644 --- a/man/sarima_random.Rd +++ b/man/sarima_random.Rd @@ -24,7 +24,7 @@ Simulate Seasonal ARIMA } \examples{ # Airline model -s_model <- sarima_model(period = 12, d =1, bd = 1, theta = 0.2, btheta = 0.2) +s_model <- sarima_model(period = 12, d = 1, bd = 1, theta = 0.2, btheta = 0.2) x <- sarima_random(s_model, length = 64, seed = 0) plot(x, type = "l") } diff --git a/man/seasonality_canovahansen.Rd b/man/seasonality_canovahansen.Rd index ccb43b02..1d823440 100644 --- a/man/seasonality_canovahansen.Rd +++ b/man/seasonality_canovahansen.Rd @@ -36,7 +36,7 @@ list with the FTest on seasonal variables, the joint test and the details for th Canova-Hansen seasonality test } \examples{ -s<-log(ABS$X0.2.20.10.M) -seasonality_canovahansen(s, 12, type="Contrast") -seasonality_canovahansen(s, 12, type="Trigonometric") +s <- log(ABS$X0.2.20.10.M) +seasonality_canovahansen(s, 12, type = "Contrast") +seasonality_canovahansen(s, 12, type = "Trigonometric") } diff --git a/man/seasonality_canovahansen_trigs.Rd b/man/seasonality_canovahansen_trigs.Rd index 5e824045..f6644c87 100644 --- a/man/seasonality_canovahansen_trigs.Rd +++ b/man/seasonality_canovahansen_trigs.Rd @@ -30,7 +30,7 @@ seasonality_canovahansen_trigs( Canova-Hansen test using trigonometric variables } \examples{ -s<-log(ABS$X0.2.20.10.M) -freqs<-seq(0.01, 0.5, 0.001) -plot(seasonality_canovahansen_trigs(s, 1/freqs, original = FALSE), type='l') +s <- log(ABS$X0.2.20.10.M) +freqs <- seq(0.01, 0.5, 0.001) +plot(seasonality_canovahansen_trigs(s, 1 / freqs, original = FALSE), type = "l") } diff --git a/man/seasonality_combined.Rd b/man/seasonality_combined.Rd index 6d63b533..33e61429 100644 --- a/man/seasonality_combined.Rd +++ b/man/seasonality_combined.Rd @@ -29,7 +29,7 @@ If \code{data} is not a \code{"ts"} object, \code{firstperiod = 1} by default.} Combined test on the presence of identifiable seasonality (see Ladiray and Quenneville, 1999). } \examples{ -s<-do_stationary(log(ABS$X0.2.09.10.M))$ddata +s <- do_stationary(log(ABS$X0.2.09.10.M))$ddata seasonality_combined(s) seasonality_combined(random_t(2, 1000), 7) } diff --git a/man/seasonality_f.Rd b/man/seasonality_f.Rd index eb5dec3d..ac255314 100644 --- a/man/seasonality_f.Rd +++ b/man/seasonality_f.Rd @@ -27,6 +27,6 @@ F-test on seasonal dummies Estimation of a model with seasonal dummies. Joint F-test on the coefficients of the dummies. } \examples{ -seasonality_f(ABS$X0.2.09.10.M, model="D1") +seasonality_f(ABS$X0.2.09.10.M, model = "D1") seasonality_f(random_t(2, 1000), 7) } diff --git a/man/seasonality_friedman.Rd b/man/seasonality_friedman.Rd index 107e051e..f5cb3996 100644 --- a/man/seasonality_friedman.Rd +++ b/man/seasonality_friedman.Rd @@ -25,7 +25,7 @@ Friedman Seasonality Test Non parametric test ("ANOVA"-type). } \examples{ -s<-do_stationary(log(ABS$X0.2.09.10.M))$ddata +s <- do_stationary(log(ABS$X0.2.09.10.M))$ddata seasonality_friedman(s) seasonality_friedman(random_t(2, 1000), 12) } diff --git a/man/seasonality_kruskalwallis.Rd b/man/seasonality_kruskalwallis.Rd index fce4dbdc..c8090e9f 100644 --- a/man/seasonality_kruskalwallis.Rd +++ b/man/seasonality_kruskalwallis.Rd @@ -25,7 +25,7 @@ Kruskall-Wallis Seasonality Test Non parametric test on the ranks. } \examples{ -s<-do_stationary(log(ABS$X0.2.09.10.M))$ddata +s <- do_stationary(log(ABS$X0.2.09.10.M))$ddata seasonality_kruskalwallis(s) seasonality_kruskalwallis(random_t(2, 1000), 7) } diff --git a/man/seasonality_modified_qs.Rd b/man/seasonality_modified_qs.Rd index 8a3ef0ea..1bd7b358 100644 --- a/man/seasonality_modified_qs.Rd +++ b/man/seasonality_modified_qs.Rd @@ -28,6 +28,6 @@ Remark: the length of the series has some impact on the p-values, mainly on short series. Not critical. } \examples{ -s<-do_stationary(log(ABS$X0.2.09.10.M))$ddata +s <- do_stationary(log(ABS$X0.2.09.10.M))$ddata seasonality_modified_qs(s) } diff --git a/man/seasonality_periodogram.Rd b/man/seasonality_periodogram.Rd index 87462ca9..1b6038b7 100644 --- a/man/seasonality_periodogram.Rd +++ b/man/seasonality_periodogram.Rd @@ -25,7 +25,7 @@ Periodogram Seasonality Test Tests on the sum of a periodogram at seasonal frequencies. } \examples{ -s<-do_stationary(log(ABS$X0.2.09.10.M))$ddata +s <- do_stationary(log(ABS$X0.2.09.10.M))$ddata seasonality_periodogram(s) seasonality_periodogram(random_t(2, 1000), 7) } diff --git a/man/seasonality_qs.Rd b/man/seasonality_qs.Rd index b915e104..40a17e80 100644 --- a/man/seasonality_qs.Rd +++ b/man/seasonality_qs.Rd @@ -25,7 +25,7 @@ A \code{c("JD3_TEST", "JD3")} object (see \code{\link[=statisticaltest]{statisti QS (seasonal Ljung-Box) test. } \examples{ -s<-do_stationary(log(ABS$X0.2.09.10.M))$ddata +s <- do_stationary(log(ABS$X0.2.09.10.M))$ddata seasonality_qs(s) seasonality_qs(random_t(2, 1000), 7) } diff --git a/man/set_tradingdays.Rd b/man/set_tradingdays.Rd index 02ab1eb0..f6cd2338 100644 --- a/man/set_tradingdays.Rd +++ b/man/set_tradingdays.Rd @@ -117,20 +117,21 @@ generated with \code{rjd3tramoseats::spec_tramoseats()} or "JD3_TRAMO_SPEC" gene # Pre-defined regressors based on user-defined calendar ### create a calendar BE <- national_calendar(list( -fixed_day(7,21), - special_day("NEWYEAR"), - special_day("CHRISTMAS"), - special_day("MAYDAY"), - special_day("EASTERMONDAY"), - special_day("ASCENSION"), - special_day("WHITMONDAY"), - special_day("ASSUMPTION"), - special_day("ALLSAINTSDAY"), - special_day("ARMISTICE"))) + fixed_day(7, 21), + special_day("NEWYEAR"), + special_day("CHRISTMAS"), + special_day("MAYDAY"), + special_day("EASTERMONDAY"), + special_day("ASCENSION"), + special_day("WHITMONDAY"), + special_day("ASSUMPTION"), + special_day("ALLSAINTSDAY"), + special_day("ARMISTICE") +)) ## put into a context -my_context<-modelling_context(calendars = list(cal=BE)) +my_context <- modelling_context(calendars = list(cal = BE)) ## create a specification -#init_spec <- rjd3x13::x13_spec("RSA5c") +# init_spec <- rjd3x13::x13_spec("RSA5c") ## modify the specification # new_spec<-set_tradingdays(init_spec, # option = "TradingDays", calendar.name="cal") diff --git a/man/special_day.Rd b/man/special_day.Rd index f2601b2b..73ae50c0 100644 --- a/man/special_day.Rd +++ b/man/special_day.Rd @@ -49,8 +49,10 @@ CHRISTMAS \tab Fixed holiday, falls on December, 25th. # To add Easter Monday special_day("EASTERMONDAY") # To define a holiday for the day after Christmas, with validity and weight -special_day("CHRISTMAS", offset = 1, weight = 0.8, -validity = list(start="2000-01-01", end = "2020-12-01")) +special_day("CHRISTMAS", + offset = 1, weight = 0.8, + validity = list(start = "2000-01-01", end = "2020-12-01") +) } \references{ More information on calendar correction in JDemetra+ online documentation: diff --git a/man/statisticaltest.Rd b/man/statisticaltest.Rd index f94f642d..0eedf9ee 100644 --- a/man/statisticaltest.Rd +++ b/man/statisticaltest.Rd @@ -30,7 +30,7 @@ statisticaltest(val, pval, dist = NULL) Generic function to format the results of 'JDemetra+' tests. } \examples{ -udr_test = testofupdownruns(random_t(5, 1000)) +udr_test <- testofupdownruns(random_t(5, 1000)) udr_test # default print print(udr_test, details = TRUE) # with the distribution diff --git a/man/td.Rd b/man/td.Rd index a93e9d4b..c6cf2f5c 100644 --- a/man/td.Rd +++ b/man/td.Rd @@ -46,10 +46,10 @@ the reference group (0). \examples{ # Monthly regressors for Trading Days: each type of day is different # contrasts to Sundays (6 series) -regs_td<- td(12,c(2020,1),60, groups = c(1, 2, 3, 4, 5, 6, 0), contrasts = TRUE) +regs_td <- td(12, c(2020, 1), 60, groups = c(1, 2, 3, 4, 5, 6, 0), contrasts = TRUE) # Quarterly regressors for Working Days: week days are similar # contrasts to week-end days (1 series) -regs_wd<- td(4,c(2020,1),60, groups = c(1, 1, 1, 1, 1, 0, 0), contrasts = TRUE) +regs_wd <- td(4, c(2020, 1), 60, groups = c(1, 1, 1, 1, 1, 0, 0), contrasts = TRUE) } \references{ More information on calendar correction in JDemetra+ online documentation: diff --git a/man/td_canovahansen.Rd b/man/td_canovahansen.Rd index b210cec2..7dff89b6 100644 --- a/man/td_canovahansen.Rd +++ b/man/td_canovahansen.Rd @@ -27,6 +27,6 @@ list with the ftest on td, the joint test and the details for the stability of t Canova-Hansen test for stable trading days } \examples{ -s<-log(ABS$X0.2.20.10.M) -td_canovahansen(s, c(1,12)) +s <- log(ABS$X0.2.20.10.M) +td_canovahansen(s, c(1, 12)) } diff --git a/man/td_timevarying.Rd b/man/td_timevarying.Rd index 509e83ba..99451fd5 100644 --- a/man/td_timevarying.Rd +++ b/man/td_timevarying.Rd @@ -22,6 +22,6 @@ A Chi2 test Likelihood ratio test on time varying trading days } \examples{ -s<-log(ABS$X0.2.20.10.M) +s <- log(ABS$X0.2.20.10.M) td_timevarying(s) } diff --git a/man/tsdata_of.Rd b/man/tsdata_of.Rd index 6d1a4621..e83425f9 100644 --- a/man/tsdata_of.Rd +++ b/man/tsdata_of.Rd @@ -21,7 +21,7 @@ Title } \examples{ # Annual series -s<-tsdata_of(c(1,2,3,4), c("1990-01-01", "1995-01-01", "1996-01-01", "2000-11-01")) +s <- tsdata_of(c(1, 2, 3, 4), c("1990-01-01", "1995-01-01", "1996-01-01", "2000-11-01")) # Quarterly series -t<-tsdata_of(c(1,2,3,NA,4), c("1990-01-01", "1995-01-01", "1996-01-01", "2000-08-01", "2000-11-01")) +t <- tsdata_of(c(1, 2, 3, NA, 4), c("1990-01-01", "1995-01-01", "1996-01-01", "2000-08-01", "2000-11-01")) } diff --git a/man/ucarima_canonical.Rd b/man/ucarima_canonical.Rd index ddc6b741..7b2cbd4f 100644 --- a/man/ucarima_canonical.Rd +++ b/man/ucarima_canonical.Rd @@ -20,8 +20,8 @@ A new UCARIMA model Makes a UCARIMA model canonical; more specifically, put all the noise of the components in one dedicated component } \examples{ -mod1 <- arima_model("trend", delta = c(1,-2,1)) +mod1 <- arima_model("trend", delta = c(1, -2, 1)) mod2 <- arima_model("noise", var = 1600) -hp <- ucarima_model(components=list(mod1, mod2)) -hpc <- ucarima_canonical(hp, cmp=2) +hp <- ucarima_model(components = list(mod1, mod2)) +hpc <- ucarima_canonical(hp, cmp = 2) } diff --git a/man/ucarima_estimate.Rd b/man/ucarima_estimate.Rd index 7e998c99..3bd36807 100644 --- a/man/ucarima_estimate.Rd +++ b/man/ucarima_estimate.Rd @@ -20,12 +20,12 @@ A matrix containing the different components and their standard deviations if st Estimate UCARIMA Model } \examples{ -mod1 <- arima_model("trend", delta = c(1,-2,1)) +mod1 <- arima_model("trend", delta = c(1, -2, 1)) mod2 <- arima_model("noise", var = 16) -hp <- ucarima_model(components=list(mod1, mod2)) +hp <- ucarima_model(components = list(mod1, mod2)) s <- log(aggregate(retail$AutomobileDealers)) -all <- ucarima_estimate(s, hp, stdev=TRUE) -plot(s, type = 'l') -t <- ts(all[,1], frequency = frequency(s), start = start(s)) -lines(t, col='blue') +all <- ucarima_estimate(s, hp, stdev = TRUE) +plot(s, type = "l") +t <- ts(all[, 1], frequency = frequency(s), start = start(s)) +lines(t, col = "blue") } diff --git a/man/ucarima_model.Rd b/man/ucarima_model.Rd index c7f7ae2e..3bc363bf 100644 --- a/man/ucarima_model.Rd +++ b/man/ucarima_model.Rd @@ -26,8 +26,8 @@ Creates an UCARIMA model, which is composed of ARIMA models with independent innovations. } \examples{ -mod1 <- arima_model("trend", delta = c(1,-2,1)) +mod1 <- arima_model("trend", delta = c(1, -2, 1)) mod2 <- arima_model("noise", var = 1600) -hp<-ucarima_model(components=list(mod1, mod2)) +hp <- ucarima_model(components = list(mod1, mod2)) print(hp$model) } diff --git a/man/ucarima_wk.Rd b/man/ucarima_wk.Rd index 54616b1e..0559c8bc 100644 --- a/man/ucarima_wk.Rd +++ b/man/ucarima_wk.Rd @@ -24,10 +24,10 @@ A list with the (pseudo-)spectrum, the weights of the filter and the squared-gai Wiener Kolmogorov Estimators } \examples{ -mod1 <- arima_model("trend", delta = c(1,-2,1)) +mod1 <- arima_model("trend", delta = c(1, -2, 1)) mod2 <- arima_model("noise", var = 1600) -hp<-ucarima_model(components=list(mod1, mod2)) -wk1<-ucarima_wk(hp, 1, nwk=50) -wk2<-ucarima_wk(hp, 2) -plot(wk1$filter, type='h') +hp <- ucarima_model(components = list(mod1, mod2)) +wk1 <- ucarima_wk(hp, 1, nwk = 50) +wk2 <- ucarima_wk(hp, 2) +plot(wk1$filter, type = "h") } diff --git a/man/weighted_calendar.Rd b/man/weighted_calendar.Rd index 09626936..79b45af3 100644 --- a/man/weighted_calendar.Rd +++ b/man/weighted_calendar.Rd @@ -25,9 +25,9 @@ For example, in Germany public holidays are determined by the federal states. Therefore, Epiphany is celebrated only in Baden-Wurttemberg, Bavaria and in Saxony-Anhalt, while from 1994 Day of Repentance and Prayer is celebrated only in Saxony. } \examples{ -Belgium <- national_calendar(list(special_day("NEWYEAR"),fixed_day(7,21))) -France <- national_calendar(list(special_day("NEWYEAR"),fixed_day(7,14))) -composite_calendar<- weighted_calendar(list(France,Belgium), weights = c(1,2)) +Belgium <- national_calendar(list(special_day("NEWYEAR"), fixed_day(7, 21))) +France <- national_calendar(list(special_day("NEWYEAR"), fixed_day(7, 14))) +composite_calendar <- weighted_calendar(list(France, Belgium), weights = c(1, 2)) } \references{ More information on calendar correction in JDemetra+ online documentation: From c905d9c3a72a69a7d446aafbc740d6c897a3db6c Mon Sep 17 00:00:00 2001 From: Tanguy BARTHELEMY Date: Fri, 25 Oct 2024 10:25:15 +0200 Subject: [PATCH 3/4] update DESCRIPPTION file --- DESCRIPTION | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 38e55d1f..79f226ec 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -31,7 +31,8 @@ Imports: stats, utils Suggests: - spelling + spelling, + knitr VignetteBuilder: knitr Encoding: UTF-8 From a51488720c2cda4da0f216ede52e27d256386b99 Mon Sep 17 00:00:00 2001 From: Tanguy BARTHELEMY Date: Fri, 25 Oct 2024 10:49:25 +0200 Subject: [PATCH 4/4] =?UTF-8?q?fix=20typo=20with=20ta=20modality=20of=20te?= =?UTF-8?q?=20variable=20=C3=83=20in=20the=20function=20=C3=A8=C3=A8=C3=A8?= =?UTF-8?q?add=5Fusrdefvar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/spec_regarima.R | 2 +- man/add_usrdefvar.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/spec_regarima.R b/R/spec_regarima.R index fbda555b..875e1700 100644 --- a/R/spec_regarima.R +++ b/R/spec_regarima.R @@ -1497,7 +1497,7 @@ set_transform.default <- function(x, #' - "Seasonal": after the decomposition the effect is allocated to the seasonal component, like a Seasonal-outlier #' - "Series": after the decomposition the effect is allocated to #' the raw series: \eqn{yc_t=y_t+ effect} -#' - "Seasonally Adjusted": after the decomposition the effect is allocated to +#' - "SeasonallyAdjusted": after the decomposition the effect is allocated to #' the seasonally adjusted series: \eqn{sa_t=T+I+effect} #' @examples #' # creating one or several external regressors (TS objects), diff --git a/man/add_usrdefvar.Rd b/man/add_usrdefvar.Rd index ad24faed..0500b300 100644 --- a/man/add_usrdefvar.Rd +++ b/man/add_usrdefvar.Rd @@ -54,7 +54,7 @@ for the decomposition. \item "Seasonal": after the decomposition the effect is allocated to the seasonal component, like a Seasonal-outlier \item "Series": after the decomposition the effect is allocated to the raw series: \eqn{yc_t=y_t+ effect} -\item "Seasonally Adjusted": after the decomposition the effect is allocated to +\item "SeasonallyAdjusted": after the decomposition the effect is allocated to the seasonally adjusted series: \eqn{sa_t=T+I+effect} } }