trnnick / tstools Goto Github PK
View Code? Open in Web Editor NEWR tools for time series
R tools for time series
They are not normalised now which may be a root of several problems of restricted models.
Hello, thanks for the wonderful package. In the new version when we have straigh tline time series, theta method trows an error, this possible could how the theta method tests seasonality? Below is a reproducible example.
tsa <- ts(rep(10,20),frequency = 4)
theta(tsa)
Error in if (season.exist == TRUE) { :
missing value where TRUE/FALSE needed
When running seasonal models there is this:
if (Stype != "N" & (obs/datafreq) < 2) {
message("Not enough observations for the seasonal model. Only non-seasonal models are available.")
Stype <- "N"
}
If initial.season and initial are provided is this necessary? I cannot see why
It needs to be faster so it can be used for intervals construction in ets2.
Please see below, when I run the following code I get an error. I'm using ubuntu xenial R version 3.4.4 (2018-03-15).
Please see below a reproducible example.
library("Mcomp")
m3.monthly <- subset(M3,"monthly")
m3.history = lapply(m3.monthly, [[
, 'x')
forecast(theta(m3.history$N1402),h=12)
Error in if (diff(range(colSums(ynt))) <= .Machine$double.eps^0.5) { :
missing value where TRUE/FALSE needed
I have the following issue when i try to install the library
devtools::install_github("trnnick/TStools")
Downloading GitHub repo trnnick/TStools@master
checking for file 'C:\Users\g.nebot.troyano\AppData\Local\Temp\Rtmps7vNDA\remotes5bc838c81319\trnnick-TStools-4912b2e/DESCRIPTION' ...
Installing package into ‘C:/Users/g.nebot.troyano/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
How can i fix it?
Thanks in advance!
See Kolassa, 2011 (Combining exponential smoothing forecasts using Akaike weights) for the details.
The literature specifies that
|Rank1 - Rank2| > CD
for Rank1 to be significantly better than Rank2
However the whiskers in the plots extend both sides making the equation
|Rank1 - Rank2| > 2CD
Can we include another plot option with 1 sided whisker?
Hi,
Looks like there might be a bug in create.inputs(). In the Exogenous section this: 'if (length(xreg.lags[[i]]>0)){' should be 'if (length(xreg.lags[[i]])>0){' for the code to function correctly.
Thanks for a great package,
Gavin.
Can you add the initial' and
initial.season' in the output list of the es function?
For now the options are: nloptr::cobyla and alabama::auglag. The former one gives suboptimal estimates in cases with small ammount of parameters to estimate. The later (with "BFGS", "Nelder-Mead" and "nlminb") has problems with estimating seasonal models.
Hi,
I have tried several times to install the TStools package using the below command:
devtools::install_github("trnnick/TStools")
But have encountered below error:
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -I"C:/R/R-331.1/include" -DNDEBUG -I"C:/R/R-3.3.1/library/Rcpp/include" -I"C:/R/R-3.3.1/library/RcppArmadillo/include" -I"d:/Compiler/gcc-4.9.3/local330/include" -O2 -Wall -mtune=core2 -c RcppExports.cpp -o RcppExports.o1.1/etc/i386/Makeconf" -f "C:/R/R-33~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="TStools.dll" OBJECTS="RcppExports.o ssgeneralfun.o"' had status 2
c:/Rtools/mingw_32/bin/g++: not found
make: *** [RcppExports.o] Error 127
Warning: running command 'make -f "Makevars.win" -f "C:/R/R-33
ERROR: compilation failed for package 'TStools'
Is there any known issues here? Thanks!
There must be a way to further enhance performance. I will just put here some ideas that we could try:
I think we need to update the photo. The MSc students were not sure if it was I! :p
Hey, can you discover what is the error?
> if (!require("devtools")){install.packages("devtools")}
>
> devtools::install_github("trnnick/TStools")
Downloading github repo trnnick/TStools@master
Installing TStools
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore CMD \
INSTALL '/tmp/RtmpvXkzpf/devtools292f439b5469/trnnick-TStools-79f883b' \
--library='/home/bruno/R/x86_64-pc-linux-gnu-library/3.2' --install-tests
* installing *source* package ‘TStools’ ...
** libs
g++ -I/usr/share/R/include -DNDEBUG -I"/home/bruno/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -I"/home/bruno/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include" `Rscript -e "Rcpp:::CxxFlags()"` -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/bruno/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -I"/home/bruno/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include" `Rscript -e "Rcpp:::CxxFlags()"` -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c ets2fun.cpp -o ets2fun.o
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o TStools.so RcppExports.o ets2fun.o -L/usr/lib/R/lib -lR
installing to /home/bruno/R/x86_64-pc-linux-gnu-library/3.2/TStools/libs
** R
** data
*** moving datasets to lazyload DB
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/bruno/R/x86_64-pc-linux-gnu-library/3.2/TStools/libs/TStools.so':
/home/bruno/R/x86_64-pc-linux-gnu-library/3.2/TStools/libs/TStools.so: undefined symbol: dgetrf_
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/bruno/R/x86_64-pc-linux-gnu-library/3.2/TStools’
Error: Command failed (1)
>
I'm using ubuntu 14.04 LTS and R version 3.2.2
Thanks!
A couple of suggestions on the model input.
Should we replace X with C (to better connect with combination) and use X to restrict Z to only additive options?
Have you had the time to compared this with ets? Speed/accuracy?
I think it might be helpful to add manual bounds for the smoothing parameters of es.
Currently there are bounds=c("usual","admissible")
One may still want to restrict the search space further. Perhaps add one-two new inputs for manual min max bounds. These could be -inf +inf (or whatever) by default, but could then be restricted by the user to the desirable values. If that is a vector then in the cost function these can be passed as additional restrictions on top of the usual/admissible bounds.
I am in particularly interested in restricting phi further, but I can think of scenarios that this might be helpful for the other parameters.
One alternative would be to pass these directly as the limits for the usual bounds, though this may not be as intuitive for the user. I am not in favour of this option.
Also these is a typo on the bounds input at the es.Rd
For now the model selection for trace is done not 100% properly. See the example code:
x <- sim.ets("AAN",obs=100)
test <- ets2(x$data,h=10,trace=TRUE)
Usually multiplicative error model is chosen.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.