Skip to content

Commit

Permalink
version 2.5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
config-i1 authored and cran-robot committed Oct 22, 2019
1 parent dc6dba9 commit 390e01c
Show file tree
Hide file tree
Showing 46 changed files with 642 additions and 529 deletions.
8 changes: 4 additions & 4 deletions DESCRIPTION
@@ -1,8 +1,8 @@
Package: smooth
Type: Package
Title: Forecasting Using State Space Models
Version: 2.5.3
Date: 2019-08-19
Version: 2.5.4
Date: 2019-10-22
Authors@R: person("Ivan", "Svetunkov", email = "ivan@svetunkov.ru", role = c("aut", "cre"),
comment="Lecturer at Centre for Marketing Analytics and Forecasting, Lancaster University, UK")
URL: https://github.com/config-i1/smooth
Expand All @@ -26,9 +26,9 @@ VignetteBuilder: knitr
RoxygenNote: 6.1.1
Encoding: UTF-8
NeedsCompilation: yes
Packaged: 2019-08-19 13:10:03 UTC; config
Packaged: 2019-10-21 23:05:59 UTC; config
Author: Ivan Svetunkov [aut, cre] (Lecturer at Centre for Marketing Analytics
and Forecasting, Lancaster University, UK)
Maintainer: Ivan Svetunkov <ivan@svetunkov.ru>
Repository: CRAN
Date/Publication: 2019-08-19 18:10:06 UTC
Date/Publication: 2019-10-22 16:50:02 UTC
90 changes: 45 additions & 45 deletions MD5
@@ -1,86 +1,86 @@
36f515f24de7c9c579d91f7f14a906d1 *DESCRIPTION
15cd170a6b1c4902b7839640ad2be383 *DESCRIPTION
1799da829fb32a408fc4351ad888c2f0 *NAMESPACE
3f57bafb34ace7cda02d9ca1c332166f *NEWS
6a2f64a24c2dc2d8711caa9b9d3656b2 *NEWS
d9088ff66316b45f851e337df4fba4af *R/RcppExports.R
1cfbbd2214f636b11d4a11402b7591b3 *R/autoces.R
865d40b22795427d76cf78cc314b472e *R/autogum.R
c964a6bf865398cc11a030d4371c4a7a *R/automsarima.R
d27a7b84cb709567a2e0445cf179fc0b *R/autossarima.R
04827b56eae4cf7a45e125dfa5506465 *R/ces.R
1d265b8f027460368c53274d9882f656 *R/autoces.R
1d62d880eae0b769b9c3d0d7435049ae *R/autogum.R
bc6da438255e73cdf8df5facfea816fc *R/automsarima.R
6f35d3693509babf8173701fe8b17561 *R/autossarima.R
96a9b9d4a360eee2d858baf0aee0cbb0 *R/ces.R
7620fe2f34f9bcaa11b90cffeeeec20e *R/cma.R
31f124a4c711e51c07a755ad2ae4e88a *R/depricator.R
6fdf685b15bd5029141f174c2ac52f43 *R/es.R
474bb3c632da4ede1cb1b94f54072b6b *R/gum.R
fd7fc1a9a6adadc7ae7508a2fc942b67 *R/es.R
342c29d43d0ea7d62357b4a002cc8999 *R/gum.R
0bfe1ae12561a730e437ea4c5975dcdf *R/isFunctions.R
409cd8f916b16bad8a68e99934709ad2 *R/iss.R
527bb610d28d1499dda11fa56e048ffc *R/methods.R
9eb7f2442995700b0b4923c4530a5f82 *R/msarima.R
41242b8913a98e440dfb8b792b5230cd *R/oes.R
4500edd086e27dac72c95183ed6846b9 *R/oesg.R
f05cf20061db8bbcb912990939efb689 *R/msarima.R
97dd48a3622c62cfa7f5cf50869f6db4 *R/oes.R
c730bc032a6f1fefda84367263c38e38 *R/oesg.R
8a57d8c2b82e86863b1006a7af504f83 *R/simces.R
a3c9d986921424696c6dfc7353dcae52 *R/simes.R
facd86a5dc5cc1ae85a0b8aa8e520abb *R/simgum.R
e032b99453b0ff4312e6ef2226bb519d *R/simsma.R
ee5a8a54f252d8cba8e602b7104e1b87 *R/simssarima.R
e5629697c68011cc3d6177c3a239c6ba *R/simves.R
bdf21b89396e1aed18db4abb6b359446 *R/sma.R
6063a10d5d6144006864024163a3d3fd *R/sma.R
474c485bd44e489896ad1f7df6f8e1e0 *R/smooth-package.R
6630b9660581361b2eac2409ec4356b1 *R/smoothCombine.R
a3df50ed57000a2b2023ac49a9d38aaa *R/smoothCombine.R
24d42f1698e1f50eb27f1a32ecab61c8 *R/sowhat.R
1f9f737d0519704843e62b2b54574241 *R/ssarima.R
681dada75cfbcee5e3288293507e5d8f *R/ssfunctions.R
a667e6c16cf339e7465e969f75095813 *R/ssarima.R
1621d5f1070f0b239508113885e07dc6 *R/ssfunctions.R
b45db627556532cfdf6e20ccc1ff34dc *R/variance-covariance.R
12694fbe8bfb9e800b973c97cd1fa155 *R/ves.R
01b5f7f33ce46ffa829398d3bff8aee4 *R/ves.R
5c6a7c4259702efbb80b34c0012d09aa *R/viss.R
94fef7e3357bb043ecf7e0f3bc0e404e *R/vmethods.R
8f2c7bd2e44a91def4f55bcba5d4f2a2 *R/vssFunctions.R
aed7ba5d61fc9e8f6c1ce27bcfc89dc0 *R/vmethods.R
18dd9cf3832991d348d2af8ab503363a *R/vssFunctions.R
3113d776d98ddd16e1ee1c7cfe5ba513 *R/zzz.R
b26b95b9f014507d75e6a45be30d7fad *README.md
b01dbd7648a0a916e670a0954c7b4499 *build/partial.rdb
5d2e73bb205ea962f476c7f36e064804 *build/vignette.rds
aefc3a003d55919e1f4882aa4df0724d *build/partial.rdb
b468ec762f4ed484053855ba9ed57a09 *build/vignette.rds
e7ff134dfef81ef90cb355df49cd20ad *inst/doc/ces.R
63102e1de32a1dfa9fca0c23576696a1 *inst/doc/ces.Rmd
8244680cbebb65285dd56afb2253795b *inst/doc/ces.html
c7d819250c59b694cb4e44d7f5268c0d *inst/doc/ces.html
7a5731f4e90d943393e09cea3807eb39 *inst/doc/es.R
75d528e227579a8662d15950b92d6d55 *inst/doc/es.Rmd
e8f5c654683e30b7ddce1c7a0550757b *inst/doc/es.html
056021f591076f3ee5d4809977ea51ff *inst/doc/es.html
0183cb06ce8f3ad215895bff752bdf63 *inst/doc/gum.R
c757d7f4971db027d931c0543d77f79b *inst/doc/gum.Rmd
af2338670c44553f66851ccb68a0bcc8 *inst/doc/gum.html
ce4f1882cb4765d6f1ea7a3e3c725484 *inst/doc/gum.html
c6dff78b989971508587a79def61ad9b *inst/doc/oes.R
f0560360e70eff964c7e818a38f0a5eb *inst/doc/oes.Rmd
1c8ee7af0c6fc6ca1de9e693565f9ea3 *inst/doc/oes.html
d11ad07f4892e44a7f268a54b1c3ba97 *inst/doc/oes.html
990d77b6e7229994f2ae259df6f121a1 *inst/doc/simulate.R
3c284a1692f90426fba996c01a78af8c *inst/doc/simulate.Rmd
fa2291430e675f2298b4d905c4fc3f4d *inst/doc/simulate.html
19483479e0ff042546c2b64c52f0e227 *inst/doc/simulate.html
82219c258851c03622ae04b35f645022 *inst/doc/sma.R
7a6cd5f84b090d58c565b781c2801327 *inst/doc/sma.Rmd
d1d6e037ecf4a7df78b131dd7128091e *inst/doc/sma.html
22350f8f6357f6d246a0fccd3fcdd007 *inst/doc/sma.html
f2be0cff7be52faff06f2a377333a8c6 *inst/doc/smooth-Documentation.pdf
ab7560c1647929fa67f92f931009917d *inst/doc/smooth.R
23f9e9e4b5aeaaf04edf034dc871c2be *inst/doc/smooth.Rmd
f09129d4c2d06fb8bd8f77216b2da78a *inst/doc/smooth.html
3a55b0bcd2ab894acffbd365aad5f189 *inst/doc/smooth.html
45d8e57dc5084d4aafefc907917a2f34 *inst/doc/ssarima.R
3033ecc24af0b53c65632e0838b4a059 *inst/doc/ssarima.Rmd
ff62a78d4db69442a20a74f4b3089cb4 *inst/doc/ssarima.html
e6ce244c0acdfe6ee393d84503e50c1c *inst/doc/ssarima.html
d2a6fbb89cc8b25ad26c39c81097f865 *inst/doc/ves.R
449246ef10cdc217c4fffb69ee049d38 *inst/doc/ves.Rmd
2d4ca0c23d737639bf2fb18d6e612805 *inst/doc/ves.html
194f69cd8d5c1b0e8b694722329e2bde *man/auto.ces.Rd
9771a33d1eef094b837811de79e51e46 *man/auto.gum.Rd
e78f2ca3e2f2d87aedbc0111f8982fe7 *man/auto.msarima.Rd
a9f340337d73bf796813e98b69c66f00 *man/auto.ssarima.Rd
dc2d2ab21226c6ba363f78265eac390b *man/ces.Rd
aced09409f74f0889c88fb173ebc9229 *inst/doc/ves.html
73fa2bee7edb60ed4a1f3623920b3bcc *man/auto.ces.Rd
047e07c1066202b44e2c859af735e632 *man/auto.gum.Rd
5266534bd16fdff9552cae5dda85027e *man/auto.msarima.Rd
511519fc83731f83e1ea274cdf469c83 *man/auto.ssarima.Rd
011b5126d5117d718b45673de3cdbefb *man/ces.Rd
0685115bc87b456a6f18afa4709164de *man/cma.Rd
682b961418970a7c88da89553be1a734 *man/covar.Rd
b84f6c34c813fee7b866d68819de2394 *man/es.Rd
e8562ef32d6c71ad3728959653ceb084 *man/es.Rd
86598f88c0a95d24863e270455fbf77f *man/forecast.smooth.Rd
5534d246ca6e76b7e4899895579591c9 *man/gum.Rd
f9b89cd6893b6286b335ae611b7a6a93 *man/gum.Rd
7cb683020af82bfef06e6ebe35bb4004 *man/isFunctions.Rd
60699e209fb84df141bb6df57f5cacf5 *man/iss.Rd
6297f953f94dd98250ca8045fb8fd40a *man/msarima.Rd
7b156a279d4e9e6da33331462378be48 *man/oes.Rd
6735bde966b989b45c7f45748a2e1922 *man/oesg.Rd
aa6ed3f638e772e62a8dca4f33002acc *man/msarima.Rd
9180d9013ea40106f87d6e7b7e2f1659 *man/oes.Rd
353cf174c138b6753e5321c4a3c3e3f9 *man/oesg.Rd
0f3268c8a858c058a3fa8b8939767d2e *man/orders.Rd
794af59e4019d28d2250c13e112fa095 *man/pls.Rd
0a88c82743571b944e17a449d67b683d *man/sim.ces.Rd
Expand All @@ -89,18 +89,18 @@ d9be59d43ba1e8339e9052a7b8d2f927 *man/sim.gum.Rd
1ee9bd971c6944ffe5bb7b1b78457fde *man/sim.sma.Rd
764d74d71353e3cf4cbf7a1f467192e6 *man/sim.ssarima.Rd
cc05a6ecd264de1430aa2ea7eaaf4b6e *man/sim.ves.Rd
6ea9f98b3c13da722e11682d0fa056e8 *man/sma.Rd
bd5d6b37ff17d50df882c242d7a3619d *man/sma.Rd
5e3f4d5d21a600d459f1ea68d4aab801 *man/smooth.Rd
ed2c775df12f5fd91fbd45d64adebb8a *man/smoothCombine.Rd
755d496b9f2cbd2d8ae4b8a59bed811d *man/smoothCombine.Rd
a0993d7de7f0b96415bb7b69f66b60ab *man/sowhat.Rd
69fe9e56655640bea87c6fddf2a6a1ed *man/ssarima.Rd
568df108607c1c00fa6f79f936691d09 *man/ves.Rd
b24d6b6cc0e3e9ba6c618c515f7d0e97 *man/ssarima.Rd
61663222e564d7639224a9926dc5a651 *man/ves.Rd
0bed3336877e918ead66d79ba752cfe1 *man/viss.Rd
9859afefaf6500832d7469cadbbb28c8 *src/Makevars
a6850c2998c396b505104b800670480e *src/Makevars.win
d736b0ac3c57296a62ff17c520142d0c *src/RcppExports.cpp
9fb0915a4e7ffe192150808e5e890c69 *src/registerDynamicSymbol.c
65b2f8a2577e157d75f4104623cce7a2 *src/ssGeneral.cpp
d8c29fb21f816537b9c793ce9403db95 *src/ssGeneral.cpp
1ff530213052894349cca6864ef67a38 *src/ssGeneral.h
d31b1c1655ca634aa87e441089f7ea61 *src/ssOccurrence.cpp
cccddc1650403630c1f85f6bc9a2ac63 *src/ssSimulator.cpp
Expand Down
10 changes: 10 additions & 0 deletions NEWS
@@ -1,3 +1,13 @@
smooth v2.5.4 (Release data: 2019-10-22)
==============

Changes:
* loss="TFL" is now called loss="GPL" - General Predictive Likelihood.
* The return of unbiased estimate of variance (division by T-k)... We now use it for the calculation of the all the prediction interval types, but there is also an option of using the biased (division by T) parametric prediction interval with interval="likelihood".
* Fix for the initials in the optimiser in case of difficult mixed mdels.
* Updated the description of the bounds parameter in ves().


smooth v2.5.3 (Release data: 2019-08-19)
==============

Expand Down
3 changes: 2 additions & 1 deletion R/autoces.R
Expand Up @@ -18,6 +18,7 @@ utils::globalVariables(c("silentText","silentGraph","silentLegend","initialType"
#'
#' @template ssBasicParam
#' @template ssAdvancedParam
#' @template ssIntervals
#' @template ssInitialParam
#' @template ssAuthor
#' @template ssKeywords
Expand Down Expand Up @@ -58,7 +59,7 @@ auto.ces <- function(y, models=c("none","simple","full"),
initial=c("backcasting","optimal"), ic=c("AICc","AIC","BIC","BICc"),
loss=c("MSE","MAE","HAM","MSEh","TMSE","GTMSE","MSCE"),
h=10, holdout=FALSE, cumulative=FALSE,
interval=c("none","parametric","semiparametric","nonparametric"), level=0.95,
interval=c("none","parametric","likelihood","semiparametric","nonparametric"), level=0.95,
occurrence=c("none","auto","fixed","general","odds-ratio","inverse-odds-ratio","direct"),
oesmodel="MNN",
bounds=c("admissible","none"),
Expand Down
3 changes: 2 additions & 1 deletion R/autogum.R
Expand Up @@ -18,6 +18,7 @@ utils::globalVariables(c("silentText","silentGraph","silentLegend","initialType"
#'
#' @template ssBasicParam
#' @template ssAdvancedParam
#' @template ssIntervals
#' @template ssInitialParam
#' @template ssAuthor
#' @template ssKeywords
Expand Down Expand Up @@ -59,7 +60,7 @@ auto.gum <- function(y, orders=3, lags=frequency(y), type=c("additive","multipli
initial=c("backcasting","optimal"), ic=c("AICc","AIC","BIC","BICc"),
loss=c("MSE","MAE","HAM","MSEh","TMSE","GTMSE","MSCE"),
h=10, holdout=FALSE, cumulative=FALSE,
interval=c("none","parametric","semiparametric","nonparametric"), level=0.95,
interval=c("none","parametric","likelihood","semiparametric","nonparametric"), level=0.95,
occurrence=c("none","auto","fixed","general","odds-ratio","inverse-odds-ratio","direct"),
oesmodel="MNN",
bounds=c("restricted","admissible","none"),
Expand Down
3 changes: 2 additions & 1 deletion R/automsarima.R
Expand Up @@ -22,6 +22,7 @@ utils::globalVariables(c("silentText","silentGraph","silentLegend","initialType"
#'
#' @template ssBasicParam
#' @template ssAdvancedParam
#' @template ssIntervals
#' @template ssInitialParam
#' @template ssAuthor
#' @template ssKeywords
Expand Down Expand Up @@ -84,7 +85,7 @@ auto.msarima <- function(y, orders=list(ar=c(3,3),i=c(2,1),ma=c(3,3)), lags=c(1,
initial=c("backcasting","optimal"), ic=c("AICc","AIC","BIC","BICc"),
loss=c("MSE","MAE","HAM","MSEh","TMSE","GTMSE","MSCE"),
h=10, holdout=FALSE, cumulative=FALSE,
interval=c("none","parametric","semiparametric","nonparametric"), level=0.95,
interval=c("none","parametric","likelihood","semiparametric","nonparametric"), level=0.95,
occurrence=c("none","auto","fixed","general","odds-ratio","inverse-odds-ratio","direct"),
oesmodel="MNN",
bounds=c("admissible","none"),
Expand Down
3 changes: 2 additions & 1 deletion R/autossarima.R
Expand Up @@ -22,6 +22,7 @@ utils::globalVariables(c("silentText","silentGraph","silentLegend","initialType"
#'
#' @template ssBasicParam
#' @template ssAdvancedParam
#' @template ssIntervals
#' @template ssInitialParam
#' @template ssAuthor
#' @template ssKeywords
Expand Down Expand Up @@ -84,7 +85,7 @@ auto.ssarima <- function(y, orders=list(ar=c(3,3),i=c(2,1),ma=c(3,3)), lags=c(1,
initial=c("backcasting","optimal"), ic=c("AICc","AIC","BIC","BICc"),
loss=c("MSE","MAE","HAM","MSEh","TMSE","GTMSE","MSCE"),
h=10, holdout=FALSE, cumulative=FALSE,
interval=c("none","parametric","semiparametric","nonparametric"), level=0.95,
interval=c("none","parametric","likelihood","semiparametric","nonparametric"), level=0.95,
occurrence=c("none","auto","fixed","general","odds-ratio","inverse-odds-ratio","direct"),
oesmodel="MNN",
bounds=c("admissible","none"),
Expand Down
3 changes: 2 additions & 1 deletion R/ces.R
Expand Up @@ -15,6 +15,7 @@ utils::globalVariables(c("silentText","silentGraph","silentLegend","initialType"
#'
#' @template ssBasicParam
#' @template ssAdvancedParam
#' @template ssIntervals
#' @template ssInitialParam
#' @template ssAuthor
#' @template ssKeywords
Expand Down Expand Up @@ -148,7 +149,7 @@ ces <- function(y, seasonality=c("none","simple","partial","full"),
initial=c("backcasting","optimal"), A=NULL, B=NULL, ic=c("AICc","AIC","BIC","BICc"),
loss=c("MSE","MAE","HAM","MSEh","TMSE","GTMSE","MSCE"),
h=10, holdout=FALSE, cumulative=FALSE,
interval=c("none","parametric","semiparametric","nonparametric"), level=0.95,
interval=c("none","parametric","likelihood","semiparametric","nonparametric"), level=0.95,
occurrence=c("none","auto","fixed","general","odds-ratio","inverse-odds-ratio","direct"),
oesmodel="MNN",
bounds=c("admissible","none"),
Expand Down
38 changes: 22 additions & 16 deletions R/es.R
Expand Up @@ -43,6 +43,7 @@ utils::globalVariables(c("vecg","nComponents","lagsModel","phiEstimate","yInSamp
#'
#' @template ssBasicParam
#' @template ssAdvancedParam
#' @template ssIntervals
#' @template ssPersistenceParam
#' @template ssAuthor
#' @template ssKeywords
Expand Down Expand Up @@ -255,7 +256,7 @@ es <- function(y, model="ZZZ", persistence=NULL, phi=NULL,
initial=c("optimal","backcasting"), initialSeason=NULL, ic=c("AICc","AIC","BIC","BICc"),
loss=c("MSE","MAE","HAM","MSEh","TMSE","GTMSE","MSCE"),
h=10, holdout=FALSE, cumulative=FALSE,
interval=c("none","parametric","semiparametric","nonparametric"), level=0.95,
interval=c("none","parametric","likelihood","semiparametric","nonparametric"), level=0.95,
occurrence=c("none","auto","fixed","general","odds-ratio","inverse-odds-ratio","direct"),
oesmodel="MNN",
bounds=c("usual","admissible","none"),
Expand Down Expand Up @@ -724,6 +725,8 @@ EstimatorES <- function(...){
}

# Parameters are chosen to speed up the optimisation process and have decent accuracy
# res <- optimx::hjn(C, CF, CLower, CUpper);
# C[] <- res$par;
res <- nloptr(C, CF, lb=CLower, ub=CUpper,
opts=list("algorithm"="NLOPT_LN_BOBYQA", "xtol_rel"=xtol_rel, "maxeval"=maxeval, print_level=0));
C[] <- res$solution;
Expand All @@ -732,19 +735,19 @@ EstimatorES <- function(...){
if(any(res$objective==c(1e+100,1e+300))){
# Reset the smoothing parameters
j <- 1;
C[j] <- max(0.1,CLower[j]);
C[j] <- max(0,CLower[j]);
if(Ttype!="N"){
j <- j+1;
C[j] <- max(0.05,CLower[j]);
C[j] <- max(0,CLower[j]);
if(Stype!="N"){
j <- j+1;
C[j] <- max(0.1,CLower[j]);
C[j] <- max(0,CLower[j]);
}
}
else{
if(Stype!="N"){
j <- j+1;
C[j] <- max(0.05,CLower[j]);
C[j] <- max(0,CLower[j]);
}
}

Expand All @@ -767,7 +770,7 @@ EstimatorES <- function(...){
C[] <- res$solution;
}
# Change C if it is out of the bounds
if(any((C>=CUpper),(C<=CLower))){
if(any((C>CUpper),(C<CLower))){
CUpper[C>=CUpper & C<0] <- C[C>=CUpper & C<0] * 0.999 + 0.001;
CUpper[C>=CUpper & C>=0] <- C[C>=CUpper & C>=0] * 1.001 + 0.001;
CLower[C<=CLower & C<0] <- C[C<=CLower & C<0] * 1.001 - 0.001;
Expand Down Expand Up @@ -803,6 +806,15 @@ EstimatorES <- function(...){
# Parameters estimated + variance
nParam <- length(C) + 1*(!rounded);

# Write down Fisher Information if needed
if(FI){
boundOriginal <- bounds;
bounds[] <- "n";
environment(likelihoodFunction) <- environment();
FI <- -numDeriv::hessian(likelihoodFunction,C);
bounds <- boundOriginal;
}

# Check if smoothing parameters and phi reached the boundary conditions
if(bounds=="u"){
CNamesAvailable <- c("alpha","beta","gamma","phi")[c("alpha","beta","gamma","phi") %in% names(C)];
Expand Down Expand Up @@ -1043,7 +1055,7 @@ PoolPreparerES <- function(...){

listToReturn <- list(Etype=Etype,Ttype=Ttype,Stype=Stype,damped=damped,phi=phi,
cfObjective=res$objective,C=res$C,ICs=res$ICs,icBest=NULL,
nParam=res$nParam,logLik=res$logLik,xreg=xreg,
nParam=res$nParam,logLik=res$logLik,xreg=xreg,FI=res$FI,
xregNames=xregNames,matFX=matFX,vecgX=vecgX,nExovars=nExovars);

if(xregDo!="u"){
Expand Down Expand Up @@ -1201,7 +1213,7 @@ PoolEstimatorES <- function(silent=FALSE,...){

listToReturn <- list(Etype=Etype,Ttype=Ttype,Stype=Stype,damped=damped,phi=phi,
cfObjective=res$objective,C=res$C,ICs=res$ICs,icBest=NULL,
nParam=res$nParam,logLik=res$logLik,xreg=xreg,
nParam=res$nParam,logLik=res$logLik,xreg=xreg, FI=res$FI,
xregNames=xregNames,matFX=matFX,vecgX=vecgX,nExovars=nExovars);
if(xregDo!="u"){
listToReturn <- XregSelector(listToReturn=listToReturn);
Expand Down Expand Up @@ -1260,7 +1272,7 @@ CreatorES <- function(silent=FALSE,...){
res <- EstimatorES(ParentEnvironment=environment());
listToReturn <- list(Etype=Etype,Ttype=Ttype,Stype=Stype,damped=damped,phi=phi,
cfObjective=res$objective,C=res$C,ICs=res$ICs,icBest=res$ICs,
nParam=res$nParam,FI=FI,logLik=res$logLik,xreg=xreg,
nParam=res$nParam,FI=res$FI,logLik=res$logLik,xreg=xreg,
xregNames=xregNames,matFX=matFX,vecgX=vecgX,nExovars=nExovars);

if(xregDo!="u"){
Expand Down Expand Up @@ -1676,7 +1688,7 @@ CreatorES <- function(silent=FALSE,...){
}
else{
if(!any(loss==c("MSE","MAE","HAM","MSEh","MAEh","HAMh","MSCE","MACE","CHAM",
"TFL","aTFL","Rounded","TSB","LogisticD","LogisticL"))){
"GPL","aGPL","Rounded","TSB","LogisticD","LogisticL"))){
if(modelDo=="combine"){
warning(paste0("'",loss,"' is used as loss function instead of 'MSE'.",
"The produced combination weights may be wrong."),call.=FALSE);
Expand Down Expand Up @@ -1910,12 +1922,6 @@ CreatorES <- function(silent=FALSE,...){
model <- paste0(Etype,Ttype,Stype);
}

# Write down Fisher Information if needed
if(FI){
environment(likelihoodFunction) <- environment();
FI <- -numDeriv::hessian(likelihoodFunction,C);
}

ssFitter(ParentEnvironment=environment());
# If this was rounded values, extract the variance
if(rounded){
Expand Down

0 comments on commit 390e01c

Please sign in to comment.