Comments (2)
Yes, you are totally correct. It uses the default search parameters of auto.arima() from forecast.
So just run the following on your series:
(tsAirgap is just an example time series with NAs)
library("forecast")
auto.arima(tsAirgap)
Series: tsAirgap
ARIMA(0,1,1)(0,1,0)[12]Coefficients:
ma1
-0.3745
s.e. 0.0918sigma^2 estimated as 145.2: log likelihood=-466.04
AIC=936.09 AICc=936.18 BIC=941.84
This are then the ARIMA parameters for model='auto.arima'.
If you think there is a model that fits the time series better, you can also supply a ARIMA model you created:
# Example 5: Perform imputation with KalmanSmooth and user created model
usermodel <- arima(tsAirgap, order = c(1, 0, 1))$model
na_kalman(tsAirgap, model = usermodel)
Thanks for your question 👍
Maybe it a good idea to think about providing more information with the output itself.
(to avoid this kind of workarounds) I'll keep this in mind for future versions.
from imputets.
Just as an addition:
Parameters from auto.arima will also be forwarded, if you supply them to na_kalman.
So you could also call:
na_kalman(tsAirgap, model ="auto.arima", seasonal = F)
You would get a different model then before.
seasonal
is a parameter from forecast::auto.arima
- which restricts to non-seasonal models when set false.
auto.arima(tsAirgap, seasonal = F)
ARIMA(0,1,4)
Coefficients:
ma1 ma2 ma3 ma4
0.3683 -0.1873 -0.2327 -0.5088
s.e. 0.0901 0.0992 0.0726 0.1025sigma^2 estimated as 785.4: log likelihood=-625.33
AIC=1260.65 AICc=1261.09 BIC=1275.47
As you can see at the results, this now finds a different (in this case way worse model).
from imputets.
Related Issues (20)
- na_replace doesn't allow replacement full NA vector HOT 3
- na_kalman is slow for long time series HOT 8
- Feature: Allow bounded time series interpolation HOT 1
- plotNA.imputation etc. not working with par()/layout() HOT 1
- Faceting HOT 2
- Able to install but not load HOT 6
- Suggestion: Applying the na_mean function considering only values from the same periods. HOT 1
- Documentation needs updating HOT 5
- How to choose the best algorithm ? HOT 2
- Support imputing around a circle (e.g. wind direction) HOT 5
- Getting Error on part of my time series HOT 3
- Return fitting statistics and/or residuals HOT 2
- model0 or model In file na_kalman.R? HOT 1
- multiple imputations
- na_kalman: possible convergence problem: 'optim' gave code = 52 and message 'ERROR: ABNORMAL_TERMINATION_IN_LNSRCH'
- possible convergence problem: 'optim' gave code = 1 and message 'NEW_X'
- 'libRblas.so: No such file or directory' during package installation HOT 3
- Converting from ee.Image data to Numeric Vector (vector) or Time Series (ts) object HOT 2
- Error in `optim()`: ! L-BFGS-B needs finite values of 'fn' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imputets.