Run-time error with tsoutliers package in R
I can't attach a simple minimal reproducible example because it is too complicated and unwieldy; however, I don't believe needing the data here is necessary. I'm using the forecast
and tsoutliers
package for this question.
When I run the auto.arima
command on my data I get the following:
auto.arima(Site7Oxy, stepwise = FALSE)
Series: Site7Oxy
ARIMA(3,1,2)
Coefficients:
ar1 ar2 ar3 ma1 ma2
0.2988 0.2439 0.1431 -0.4348 -0.5259
s.e. 0.0947 0.0686 0.0316 0.0948 0.0772
sigma^2 estimated as 0.5999: log likelihood=-4145.53
AIC=8303.06 AICc=8303.09 BIC=8340.15
Now, when I try to use the tso
command using this code, it doesn't take into account the order:
tso(Site7OxyTS, types = c("AO"), maxit.iloop = 1, maxit.oloop = 1,
tsmethod = c("arima"), args.tsmethod = list(order =c(3,1,2)))
And I get this output:
list(method = NULL)
Coefficients:
ar1 ar2 ar3 ma1 ma2 AO538 AO570 AO592 AO606 AO740 AO1238 AO1369 AO1449
0.2624 0.3053 0.0935 -0.2252 -0.7173 -1.7943 -2.8697 2.9046 2.7591 -2.2921 -2.4718 2.2024 -5.4045
s.e. 0.0532 0.0416 0.0327 0.0509 0.0339 0.4178 0.4195 0.4173 0.4175 0.4171 0.4176 0.4178 0.4192
AO1499 AO1536 AO1547 AO1592 AO1597 AO1792 AO1867 AO1997 AO2070 AO2128 AO2260 AO2501 AO2554
-2.0959 1.8000 2.1307 -1.8213 -1.8363 -2.6152 2.2791 2.0062 1.6994 1.8223 2.2976 3.8949 1.8795
s.e. 0.4182 0.4177 0.4180 0.4276 0.4268 0.4242 0.4177 0.4181 0.4175 0.4182 0.4172 0.4185 0.4189
AO2732 AO2756 AO2764 AO2909 AO2920 AO2962 AO3071 AO3140 AO3171 AO3523
1.8856 1.7988 3.3109 2.5915 2.3102 4.9518 3.9999 1.9603 -1.9116 1.7217
s.e. 0.4173 0.4205 0.4227 0.4174 0.4187 0.4175 0.4173 0.4173 0.4192 0.4202
sigma^2 estimated as 0.4661: log likelihood = -3691.25, aic = 7456.51
Even the plot shows no data being transformed from the model at all:
This can further be seen in the ACF and PACF graphs here:
When checking the residuals I get this:
I'm not using the stepwise = FALSE
argument with a tsmethod = c("auto.arima)
since it crashes RStudio because it takes too long. Parallel computing doesn't make it run faster.
Any help with my tso code will be greatly appreciated!
r time-series runtime-error outliers arima
add a comment |
I can't attach a simple minimal reproducible example because it is too complicated and unwieldy; however, I don't believe needing the data here is necessary. I'm using the forecast
and tsoutliers
package for this question.
When I run the auto.arima
command on my data I get the following:
auto.arima(Site7Oxy, stepwise = FALSE)
Series: Site7Oxy
ARIMA(3,1,2)
Coefficients:
ar1 ar2 ar3 ma1 ma2
0.2988 0.2439 0.1431 -0.4348 -0.5259
s.e. 0.0947 0.0686 0.0316 0.0948 0.0772
sigma^2 estimated as 0.5999: log likelihood=-4145.53
AIC=8303.06 AICc=8303.09 BIC=8340.15
Now, when I try to use the tso
command using this code, it doesn't take into account the order:
tso(Site7OxyTS, types = c("AO"), maxit.iloop = 1, maxit.oloop = 1,
tsmethod = c("arima"), args.tsmethod = list(order =c(3,1,2)))
And I get this output:
list(method = NULL)
Coefficients:
ar1 ar2 ar3 ma1 ma2 AO538 AO570 AO592 AO606 AO740 AO1238 AO1369 AO1449
0.2624 0.3053 0.0935 -0.2252 -0.7173 -1.7943 -2.8697 2.9046 2.7591 -2.2921 -2.4718 2.2024 -5.4045
s.e. 0.0532 0.0416 0.0327 0.0509 0.0339 0.4178 0.4195 0.4173 0.4175 0.4171 0.4176 0.4178 0.4192
AO1499 AO1536 AO1547 AO1592 AO1597 AO1792 AO1867 AO1997 AO2070 AO2128 AO2260 AO2501 AO2554
-2.0959 1.8000 2.1307 -1.8213 -1.8363 -2.6152 2.2791 2.0062 1.6994 1.8223 2.2976 3.8949 1.8795
s.e. 0.4182 0.4177 0.4180 0.4276 0.4268 0.4242 0.4177 0.4181 0.4175 0.4182 0.4172 0.4185 0.4189
AO2732 AO2756 AO2764 AO2909 AO2920 AO2962 AO3071 AO3140 AO3171 AO3523
1.8856 1.7988 3.3109 2.5915 2.3102 4.9518 3.9999 1.9603 -1.9116 1.7217
s.e. 0.4173 0.4205 0.4227 0.4174 0.4187 0.4175 0.4173 0.4173 0.4192 0.4202
sigma^2 estimated as 0.4661: log likelihood = -3691.25, aic = 7456.51
Even the plot shows no data being transformed from the model at all:
This can further be seen in the ACF and PACF graphs here:
When checking the residuals I get this:
I'm not using the stepwise = FALSE
argument with a tsmethod = c("auto.arima)
since it crashes RStudio because it takes too long. Parallel computing doesn't make it run faster.
Any help with my tso code will be greatly appreciated!
r time-series runtime-error outliers arima
2
I'd say that an example would have been really helpful as now it's not completely clear what's going on. As I understand, you claim thatorder = c(3, 1, 2)
has no effect intso
, right? But the coefficients seem to say otherwise. Then I don't know how you obtain all those plots, but my guess would be thattso
estimates ARIMA to detect outliers, removes them from the original series, and returns this altered original series. It would seem like the red dots in the first plot shows those detected outliers.
– Julius Vainora
Nov 20 at 14:30
add a comment |
I can't attach a simple minimal reproducible example because it is too complicated and unwieldy; however, I don't believe needing the data here is necessary. I'm using the forecast
and tsoutliers
package for this question.
When I run the auto.arima
command on my data I get the following:
auto.arima(Site7Oxy, stepwise = FALSE)
Series: Site7Oxy
ARIMA(3,1,2)
Coefficients:
ar1 ar2 ar3 ma1 ma2
0.2988 0.2439 0.1431 -0.4348 -0.5259
s.e. 0.0947 0.0686 0.0316 0.0948 0.0772
sigma^2 estimated as 0.5999: log likelihood=-4145.53
AIC=8303.06 AICc=8303.09 BIC=8340.15
Now, when I try to use the tso
command using this code, it doesn't take into account the order:
tso(Site7OxyTS, types = c("AO"), maxit.iloop = 1, maxit.oloop = 1,
tsmethod = c("arima"), args.tsmethod = list(order =c(3,1,2)))
And I get this output:
list(method = NULL)
Coefficients:
ar1 ar2 ar3 ma1 ma2 AO538 AO570 AO592 AO606 AO740 AO1238 AO1369 AO1449
0.2624 0.3053 0.0935 -0.2252 -0.7173 -1.7943 -2.8697 2.9046 2.7591 -2.2921 -2.4718 2.2024 -5.4045
s.e. 0.0532 0.0416 0.0327 0.0509 0.0339 0.4178 0.4195 0.4173 0.4175 0.4171 0.4176 0.4178 0.4192
AO1499 AO1536 AO1547 AO1592 AO1597 AO1792 AO1867 AO1997 AO2070 AO2128 AO2260 AO2501 AO2554
-2.0959 1.8000 2.1307 -1.8213 -1.8363 -2.6152 2.2791 2.0062 1.6994 1.8223 2.2976 3.8949 1.8795
s.e. 0.4182 0.4177 0.4180 0.4276 0.4268 0.4242 0.4177 0.4181 0.4175 0.4182 0.4172 0.4185 0.4189
AO2732 AO2756 AO2764 AO2909 AO2920 AO2962 AO3071 AO3140 AO3171 AO3523
1.8856 1.7988 3.3109 2.5915 2.3102 4.9518 3.9999 1.9603 -1.9116 1.7217
s.e. 0.4173 0.4205 0.4227 0.4174 0.4187 0.4175 0.4173 0.4173 0.4192 0.4202
sigma^2 estimated as 0.4661: log likelihood = -3691.25, aic = 7456.51
Even the plot shows no data being transformed from the model at all:
This can further be seen in the ACF and PACF graphs here:
When checking the residuals I get this:
I'm not using the stepwise = FALSE
argument with a tsmethod = c("auto.arima)
since it crashes RStudio because it takes too long. Parallel computing doesn't make it run faster.
Any help with my tso code will be greatly appreciated!
r time-series runtime-error outliers arima
I can't attach a simple minimal reproducible example because it is too complicated and unwieldy; however, I don't believe needing the data here is necessary. I'm using the forecast
and tsoutliers
package for this question.
When I run the auto.arima
command on my data I get the following:
auto.arima(Site7Oxy, stepwise = FALSE)
Series: Site7Oxy
ARIMA(3,1,2)
Coefficients:
ar1 ar2 ar3 ma1 ma2
0.2988 0.2439 0.1431 -0.4348 -0.5259
s.e. 0.0947 0.0686 0.0316 0.0948 0.0772
sigma^2 estimated as 0.5999: log likelihood=-4145.53
AIC=8303.06 AICc=8303.09 BIC=8340.15
Now, when I try to use the tso
command using this code, it doesn't take into account the order:
tso(Site7OxyTS, types = c("AO"), maxit.iloop = 1, maxit.oloop = 1,
tsmethod = c("arima"), args.tsmethod = list(order =c(3,1,2)))
And I get this output:
list(method = NULL)
Coefficients:
ar1 ar2 ar3 ma1 ma2 AO538 AO570 AO592 AO606 AO740 AO1238 AO1369 AO1449
0.2624 0.3053 0.0935 -0.2252 -0.7173 -1.7943 -2.8697 2.9046 2.7591 -2.2921 -2.4718 2.2024 -5.4045
s.e. 0.0532 0.0416 0.0327 0.0509 0.0339 0.4178 0.4195 0.4173 0.4175 0.4171 0.4176 0.4178 0.4192
AO1499 AO1536 AO1547 AO1592 AO1597 AO1792 AO1867 AO1997 AO2070 AO2128 AO2260 AO2501 AO2554
-2.0959 1.8000 2.1307 -1.8213 -1.8363 -2.6152 2.2791 2.0062 1.6994 1.8223 2.2976 3.8949 1.8795
s.e. 0.4182 0.4177 0.4180 0.4276 0.4268 0.4242 0.4177 0.4181 0.4175 0.4182 0.4172 0.4185 0.4189
AO2732 AO2756 AO2764 AO2909 AO2920 AO2962 AO3071 AO3140 AO3171 AO3523
1.8856 1.7988 3.3109 2.5915 2.3102 4.9518 3.9999 1.9603 -1.9116 1.7217
s.e. 0.4173 0.4205 0.4227 0.4174 0.4187 0.4175 0.4173 0.4173 0.4192 0.4202
sigma^2 estimated as 0.4661: log likelihood = -3691.25, aic = 7456.51
Even the plot shows no data being transformed from the model at all:
This can further be seen in the ACF and PACF graphs here:
When checking the residuals I get this:
I'm not using the stepwise = FALSE
argument with a tsmethod = c("auto.arima)
since it crashes RStudio because it takes too long. Parallel computing doesn't make it run faster.
Any help with my tso code will be greatly appreciated!
r time-series runtime-error outliers arima
r time-series runtime-error outliers arima
asked Nov 20 at 14:14
SecretBeach
416
416
2
I'd say that an example would have been really helpful as now it's not completely clear what's going on. As I understand, you claim thatorder = c(3, 1, 2)
has no effect intso
, right? But the coefficients seem to say otherwise. Then I don't know how you obtain all those plots, but my guess would be thattso
estimates ARIMA to detect outliers, removes them from the original series, and returns this altered original series. It would seem like the red dots in the first plot shows those detected outliers.
– Julius Vainora
Nov 20 at 14:30
add a comment |
2
I'd say that an example would have been really helpful as now it's not completely clear what's going on. As I understand, you claim thatorder = c(3, 1, 2)
has no effect intso
, right? But the coefficients seem to say otherwise. Then I don't know how you obtain all those plots, but my guess would be thattso
estimates ARIMA to detect outliers, removes them from the original series, and returns this altered original series. It would seem like the red dots in the first plot shows those detected outliers.
– Julius Vainora
Nov 20 at 14:30
2
2
I'd say that an example would have been really helpful as now it's not completely clear what's going on. As I understand, you claim that
order = c(3, 1, 2)
has no effect in tso
, right? But the coefficients seem to say otherwise. Then I don't know how you obtain all those plots, but my guess would be that tso
estimates ARIMA to detect outliers, removes them from the original series, and returns this altered original series. It would seem like the red dots in the first plot shows those detected outliers.– Julius Vainora
Nov 20 at 14:30
I'd say that an example would have been really helpful as now it's not completely clear what's going on. As I understand, you claim that
order = c(3, 1, 2)
has no effect in tso
, right? But the coefficients seem to say otherwise. Then I don't know how you obtain all those plots, but my guess would be that tso
estimates ARIMA to detect outliers, removes them from the original series, and returns this altered original series. It would seem like the red dots in the first plot shows those detected outliers.– Julius Vainora
Nov 20 at 14:30
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53394955%2frun-time-error-with-tsoutliers-package-in-r%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53394955%2frun-time-error-with-tsoutliers-package-in-r%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
I'd say that an example would have been really helpful as now it's not completely clear what's going on. As I understand, you claim that
order = c(3, 1, 2)
has no effect intso
, right? But the coefficients seem to say otherwise. Then I don't know how you obtain all those plots, but my guess would be thattso
estimates ARIMA to detect outliers, removes them from the original series, and returns this altered original series. It would seem like the red dots in the first plot shows those detected outliers.– Julius Vainora
Nov 20 at 14:30