procedure plotting the characteristic roots for ARIMA models
Re: procedure plotting the characteristic roots for ARIMA mo
So about half of what are theoretically "unit" roots aren't classified as such. That's because
set arpatchz = %if((%cabs(arroots(t)).eq.1.0),1,0)
set arpatchz = %if((%cabs(arroots(t)).gt.1.0),2,arpatchz)
is comparing the %CABS(...) to EXACTLY 1 in both of those. (GT.1.0 includes 1+tiny number). That's what you have to round to fix.
set modulus 1 %sizeof(arroots) = %round(%cabs(arroots(t)),5)
should be 1 if and only if arroots should be on a unit circle. (There's effectively no way for an estimated root to be that close to 1).
set arpatchz = %if((%cabs(arroots(t)).eq.1.0),1,0)
set arpatchz = %if((%cabs(arroots(t)).gt.1.0),2,arpatchz)
is comparing the %CABS(...) to EXACTLY 1 in both of those. (GT.1.0 includes 1+tiny number). That's what you have to round to fix.
set modulus 1 %sizeof(arroots) = %round(%cabs(arroots(t)),5)
should be 1 if and only if arroots should be on a unit circle. (There's effectively no way for an estimated root to be that close to 1).
Re: procedure plotting the characteristic roots for ARIMA mo
Attached is acbjICRS.src.
The procedure:
Calculates roots and inverse roots of the characteristic polynomial for nonseasonal and
seasonal ARIMA models.
Produces plots of the inverse roots relative to the complex unit circle.
Further, includes a table of the inverted roots of the lag polynomial,
showing the modulus and (for complex roots) the period, as in lagpolyroots.src.
I think it's correct. I have included footnotes for explanation. Please check, and for any improvements.
I have tested on the following:
A couple of questions:
(a) Is 5 decimal places sufficient, all scenarios, for any data series?
(b) The reason I wanted to plot the inverse roots in the first place was:
The procedure:
Calculates roots and inverse roots of the characteristic polynomial for nonseasonal and
seasonal ARIMA models.
Produces plots of the inverse roots relative to the complex unit circle.
Further, includes a table of the inverted roots of the lag polynomial,
showing the modulus and (for complex roots) the period, as in lagpolyroots.src.
I think it's correct. I have included footnotes for explanation. Please check, and for any improvements.
I have tested on the following:
Code: Select all
boxjenk(const,diffs=0,sdiffs=0,ar=0,sar=0,maxl,define=deq) writing
@acbjICRS(fPlot=1) deq writing
boxjenk(const,diffs=0,sdiffs=0,ar=1,sar=0,maxl,define=deq) writing
@acbjICRS(TITLE="") deq writing
boxjenk(noconst,diffs=0,sdiffs=0,ma=5,sma=0,maxl,define=deq) writing
@acbjICRS deq writing
boxjenk(noconst,ar=5,diffs=1,ma=1,sar=1,sdiffs=1,sma=1,maxl,define=deq) writing
@acbjICRS deq writing
boxjenk(noconst,ar=2,diffs=1,ma=1,sar=1,sdiffs=1,sma=1,maxl,define=deq) writing
@acbjICRS deq writing
boxjenk(noconst,ar=0,diffs=1,ma=2,sar=0,sdiffs=1,sma=2,maxl,define=deq) writing
@acbjICRS(fplot=1) deq writing
boxjenk(const,diffs=1,sdiffs=0,ma=4,sma=1,NOMAXL,define=deq) writing
@acbjICRS deq writing
boxjenk(noconst,diffs=1,sdiffs=0,ar=14,sar=0,NOMAXL,define=deq) writing
@acbjICRS deq writing
(a) Is 5 decimal places sufficient, all scenarios, for any data series?
(b) The reason I wanted to plot the inverse roots in the first place was:
ac_1 wrote: Also. am I right in thinking the coefficients of ARIMA models are not necessarily restricted to be between 1 and +1, implying a nonexplosive model; it's the inverse roots which should be inside the complex unit circle: i.e. if AR roots lie inside the complex unit circle ARIMA model is stationary, and if MA roots lie inside the complex unit circle ARIMA model is invertible?
Thus, it does not matter whether the MA inverse roots are inside or outside for an invertible ARIMA model; but inside, on or outside AR inverse root's do for stationarity? What about AR and MA inverse roots which are very close to the complex unit circle? Also in laymans terms "overall stability" and "properties" of the ARIMA model from the relationship between estimated numerical ARMA coefficients and inverse roots?TomDoan wrote: I'm baffled about what you're trying to do. You *know* how many differences/seasonal differences you've done so you will know exactly how many unit roots you have. The AR parts are forced to be stationary by maximum likelihood. (There is no unconditional likelihood for a nonstationary model).
The MA's are also going to be forced inside or on the unit circle. An MA with a bad root has an equivalent model with the root flipped inside. (That has nothing to do with maximum likelihood). An MA with a unit root is permitted, but in practice would never be estimated since it's a boundary value, and is usually a sign of an overdifferenced model: for instance, if x is white noise, then x=u, so (1L)x=(1L)u so first differencing x induces a unit root MA process.
 Attachments

 acbjICRS.src
 (16.52 KiB) Downloaded 248 times
Re: procedure plotting the characteristic roots for ARIMA mo
No, that is not correct, and not what I am saying.
x(t)=u(t)+2*u(t1), u white noise
is a welldefined covariance stationary stochastic process. It just isn't useful in practice because u (the underlying white noise process) cannot be computed using current and past x (this is not an invertible representation). Being able to compute u from current and past x is what is needed to use the model for forecasting. If you generate an x using that formula and fit an MA(1) model to it, you will get an MA coefficient around .5. That's because there is an alternative model
x(t)=e(t)+.5*e(t1), e white noise with four times higher variance than u
which has exactly the same set of covariances (and thus the same full sample likelihood), but *is* invertible. BOXJENK with MAXL gives you the second representation because it forces the proper behavior of the roots and BOXJENK without it (conditional MAXL) gives you the second representation because it computes residuals from current and past data so won't ever look at noninvertible models. Any moving average process with a root on the wrong side of the unit circle has an equivalent (identical likelihood) model with the root on the correct side. The software (not just RATS, but probably any software that intends ARMA models to be used for forecasting) will find the correct representation.
Obviously, somewhere you have gotten the idea that this is important. It is important for someone programming a BoxJenkins estimation algorithm. It is *not* important for someone using properly written BoxJenkins software.
x(t)=u(t)+2*u(t1), u white noise
is a welldefined covariance stationary stochastic process. It just isn't useful in practice because u (the underlying white noise process) cannot be computed using current and past x (this is not an invertible representation). Being able to compute u from current and past x is what is needed to use the model for forecasting. If you generate an x using that formula and fit an MA(1) model to it, you will get an MA coefficient around .5. That's because there is an alternative model
x(t)=e(t)+.5*e(t1), e white noise with four times higher variance than u
which has exactly the same set of covariances (and thus the same full sample likelihood), but *is* invertible. BOXJENK with MAXL gives you the second representation because it forces the proper behavior of the roots and BOXJENK without it (conditional MAXL) gives you the second representation because it computes residuals from current and past data so won't ever look at noninvertible models. Any moving average process with a root on the wrong side of the unit circle has an equivalent (identical likelihood) model with the root on the correct side. The software (not just RATS, but probably any software that intends ARMA models to be used for forecasting) will find the correct representation.
Obviously, somewhere you have gotten the idea that this is important. It is important for someone programming a BoxJenkins estimation algorithm. It is *not* important for someone using properly written BoxJenkins software.
Re: procedure plotting the characteristic roots for ARIMA mo
Is acbjICRS.src procedure not correct? If so exactly where are the errors?TomDoan wrote:No, that is not correct,
Also I asked:
My quote regarding the coefficients not being restricted to be between +/1, I meant for higher order ARMA models e.g. p=4, q=4, (and it should read inverse roots rather than just roots). Obviously, for stationary data, I accept for an AR(1) the constraints on the parameter: 1 < phi1 < +1, and likewise for an MA(1) the constraints on the parameter: 1 < theta1 < +1.ac_1 wrote:(a) Is 5 decimal places sufficient, all scenarios, for any data series?
Further, I can convince myself of the MA(1) simulation example, generating data as in viewtopic.php?t=3090, and both BOXJENK estimations MAXL and NOMAXL.
For a good and "stable" ARMA forecasting model, my present understanding is that the coefficients, including higher order models, should always be between +/1 and the inverse roots should always be in (green), or on (black), but never outside (red), the unit circle, both sides: AR and MA. Correct?
The natural question is under what circumstances (e.g. misspecification, overparameterization) would the estimated ARMA coefficients lead to values being outside the +/1 range with the inverse roots being outside the complex unit circle? Specifically, what is the relationship between the estimated ARMA coefficients and inverse roots?
Re: procedure plotting the characteristic roots for ARIMA mo
Seems to be. What was incorrect was your descriptions of what things meant.ac_1 wrote: Is acbjICRS.src procedure not correct? If so exactly where are the errors?
I would think.ac_1 wrote:(a) Is 5 decimal places sufficient, all scenarios, for any data series?
Re: procedure plotting the characteristic roots for ARIMA mo
1. The coefficients (as you indicated above) don't have to be in the unit interval when you have more than one in a polynomial.ac_1 wrote: For a good and "stable" ARMA forecasting model, my present understanding is that the coefficients, including higher order models, should always be between +/1 and the inverse roots should always be in (green), or on (black), but never outside (red), the unit circle, both sides: AR and MA. Correct?
2. "Stable" means that the model doesn't change over time, which is completely different from "stationary". The roots say nothing about stability. If you are looking at sequential estimates of a model (particularly if you are doing automatic model selection), it is quite possible that the form of the model will change from one interval to another (and, of course, that means that the roots will be radically different since the models are). There is nothing wrong with thatall the models are approximations. An AR(2) and an ARMA(1,1) can have very similar dynamics (and have similar log likelihoods and produce similar forecasts) despite having "root" patterns which are (by construction) completely different.
The roots tell you nothing about misspecification. (Misspecification is usually detected when there is significant autocorrelation left in the residuals). The roots tell you nothing about overparameterization. (Overparameterization is detected when an information criterion gives you a worse value than a smaller model).ac_1 wrote: The natural question is under what circumstances (e.g. misspecification, overparameterization) would the estimated ARMA coefficients lead to values being outside the +/1 range with the inverse roots being outside the complex unit circle? Specifically, what is the relationship between the estimated ARMA coefficients and inverse roots?
Re: procedure plotting the characteristic roots for ARIMA mo
MWH(1997) p.340p.342, constraints on parameters:TomDoan wrote: 1. The coefficients (as you indicated above) don't have to be in the unit interval when you have more than one in a polynomial.
restrictions for AR parameters
For p = 1, −1 < phi1 < 1.
For p = 2, the following three conditions must all be met: −1 < phi2 < 1, phi2 + phi1 < 1, phi2 − phi1 < 1. But what is the constraint on phi1?
What are the restrictions for p ≥ 3?
for MA parameters
For q = 1, −1 < theta1 < 1.
For q = 2, the following three conditions must all be met: −1 < theta2 < 1, theta2 + theta1 < 1, theta2 − theta1 < 1. What is the constraint on theta1?
Similarly, what are the conditions for q ≥ 3?
And are the restrictions the same if estimated jointly as an ARMA(p,q) model?
Yes, I am looking at sequential estimation from automated model selection using GMAUTOFIT, and for some series the form of the model does change. The point I am making here is that acbjICRS is useful for depicting the form from the inverse roots. On that note, previously:TomDoan wrote: 2. "Stable" means that the model doesn't change over time, which is completely different from "stationary". The roots say nothing about stability. If you are looking at sequential estimates of a model (particularly if you are doing automatic model selection), it is quite possible that the form of the model will change from one interval to another (and, of course, that means that the roots will be radically different since the models are). There is nothing wrong with thatall the models are approximations. An AR(2) and an ARMA(1,1) can have very similar dynamics (and have similar log likelihoods and produce similar forecasts) despite having "root" patterns which are (by construction) completely different.
What does adequate mean? How to handle nonconvergence in a sequential scheme from either @BJAUTOFIT or @GMAUTOFIT? And further how to modify these procedures to take into account MAXL?TomDoan wrote: 3. If BOXJENK with MAXL fails to estimate successfully, you should probably ignore the model. @BJAUTOFIT will put in the last log likelihood whether the model converges or not, which, if the model has a major issue, will generally be much worse than the better behaved models. Remember that if an ARMA(p,q) model is adequate, an ARMA(p+1,q+1) is unindentified, and unlikely to estimate properly, but it also is clearly dominated by smaller model.
The roots exist according to The fundamental theorem of algebra.TomDoan wrote: The roots tell you nothing about misspecification. (Misspecification is usually detected when there is significant autocorrelation left in the residuals). The roots tell you nothing about overparameterization. (Overparameterization is detected when an information criterion gives you a worse value than a smaller model).
Back to the question: What is the relationship and interpretation regarding the estimated ARMA coefficients (parameter values) and inverse roots (being inside, on, outside) relative to the complex unit circle?
Re: procedure plotting the characteristic roots for ARIMA mo
Isn't that an implicit constraint on phi1? There's a region of stationary values for (phi1,phi2) so what phi1 can be depends upon phi2, and what phi2 can be depends upon phi1. phi1 itself can be anywhere in (2,2) though there are very few permissible phi2's for the extreme values.ac_1 wrote:MWH(1997) p.340p.342, constraints on parameters:TomDoan wrote: 1. The coefficients (as you indicated above) don't have to be in the unit interval when you have more than one in a polynomial.
restrictions for AR parameters
For p = 1, −1 < phi1 < 1.
For p = 2, the following three conditions must all be met: −1 < phi2 < 1, phi2 + phi1 < 1, phi2 − phi1 < 1. But what is the constraint on phi1?
What are the restrictions for p ≥ 3?
And you're missing the pointin an AR(2), there is no reason that phi1 can't be bigger than 1. You don't need to know the precise shape of the valid region, just that phi1=1.4 is no big deal. The stationary region for p=3 is a colossal mess and again, beside the point.
Same as above.ac_1 wrote: for MA parameters
For q = 1, −1 < theta1 < 1.
For q = 2, the following three conditions must all be met: −1 < theta2 < 1, theta2 + theta1 < 1, theta2 − theta1 < 1. What is the constraint on theta1?
Similarly, what are the conditions for q ≥ 3?
Yes.ac_1 wrote: And are the restrictions the same if estimated jointly as an ARMA(p,q) model?
I disagree that that information is valuable, but you've decided otherwise.ac_1 wrote:Yes, I am looking at sequential estimation from automated model selection using GMAUTOFIT, and for some series the form of the model does change. The point I am making here is that acbjICRS is useful for depicting the form from the inverse roots. On that note, previously:TomDoan wrote: 2. "Stable" means that the model doesn't change over time, which is completely different from "stationary". The roots say nothing about stability. If you are looking at sequential estimates of a model (particularly if you are doing automatic model selection), it is quite possible that the form of the model will change from one interval to another (and, of course, that means that the roots will be radically different since the models are). There is nothing wrong with thatall the models are approximations. An AR(2) and an ARMA(1,1) can have very similar dynamics (and have similar log likelihoods and produce similar forecasts) despite having "root" patterns which are (by construction) completely different.
Adequate means that it fits the dynamics reasonably well.ac_1 wrote:What does adequate mean? How to handle nonconvergence in a sequential scheme from either @BJAUTOFIT or @GMAUTOFIT? And further how to modify these procedures to take into account MAXL?TomDoan wrote: 3. If BOXJENK with MAXL fails to estimate successfully, you should probably ignore the model. @BJAUTOFIT will put in the last log likelihood whether the model converges or not, which, if the model has a major issue, will generally be much worse than the better behaved models. Remember that if an ARMA(p,q) model is adequate, an ARMA(p+1,q+1) is unindentified, and unlikely to estimate properly, but it also is clearly dominated by smaller model.
You don't have to "handle" nonconvergenceif it doesn't converge, it will be rejected as an inferior model by the information criteria.
@BJAUTOFIT and @GMAUTOFIT use MAXLyou already asked about that.
The fact that they exist says nothing about their usefulness for any particular purpose.ac_1 wrote:The roots exist according to The fundamental theorem of algebra.TomDoan wrote: The roots tell you nothing about misspecification. (Misspecification is usually detected when there is significant autocorrelation left in the residuals). The roots tell you nothing about overparameterization. (Overparameterization is detected when an information criterion gives you a worse value than a smaller model).
Beyond the single parameter forms, complicated and of little (actually no) value. While the roots are of very minor interest, the raw coefficients tell you even less.ac_1 wrote: Back to the question: What is the relationship and interpretation regarding the estimated ARMA coefficients (parameter values) and inverse roots (being inside, on, outside) relative to the complex unit circle?