Code Monkey home page Code Monkey logo

Comments (2)

SteffenMoritz avatar SteffenMoritz commented on June 5, 2024

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.0918

sigma^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.

SteffenMoritz avatar SteffenMoritz commented on June 5, 2024

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.1025

sigma^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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.