I did a regression with ARMA errors using arima0 with ari<-arima0(y,order=c(2,0,2),xreg=reg1,delta=-1) or ari<-arima0(y,order=c(2,0,2),xreg=reg1) where reg1 is the matrix of the regressors and when I see diag(ari$var.coef) I get negative terms. Do you know what this mean ? I try to change transform.pars to 0 or 1 but this crash R on Windows. Is it possible to test the significativity of the estimators obtained by arima0 and how ? I use arima0 because I have regressors and it seems it is impossible to uses arma() in tseries with regressors. Does anyone make a routine for regression with ARMA errors with least squares ? Another question : how can I handle missing values in regression with ARMA errors with R ? Thank you very much. Pascal GRANDEAU PS : do you know if there exist companies making formations on R in France ? -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Sun, 16 Dec 2001, Pascal Grandeau wrote:> I did a regression with ARMA errors using arima0 with > ari<-arima0(y,order=c(2,0,2),xreg=reg1,delta=-1) > or > ari<-arima0(y,order=c(2,0,2),xreg=reg1) > where reg1 is the matrix of the regressors and when I see diag(ari$var.coef) > I get negative terms. Do you know what this mean ?The optimizer failed to converge, probably. You did check the convergence value in the fitted object, didn't you?> I try to change transform.pars to 0 or 1 but this crash R on Windows.Well, transform.pars=2 first runs transform.pars=1, so this is strange. But probably your model is inappropriate.> Is it possible to test the significativity of the estimators obtained by > arima0 and how ?Well, first you need to get it to converge. Then you can use Wald tests or (better) likelihood ratio tests. The log-likelihood is in the fitted object.> I use arima0 because I have regressors and it seems it is impossible to uses > arma() in tseries with regressors. > > Does anyone make a routine for regression with ARMA errors with least > squares ?What does that mean? `with least squares' implies independent errors. arma() fits by so-called *conditional* least squares: that leaves out terms in the log-likelihood which can be important, especially near non-stationarity. I've never understood why anyone would want to do that, except as a poor man's computational approximation.> Another question : how can I handle missing values in regression with ARMA > errors with R ?As yet there are very limited possibilties: see e.g. na.contiguous. You might want to investigate the dse bundle. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Prof Brian Ripley <ripley at stats.ox.ac. To: Pascal Grandeau <pgrandeau at free.fr> uk> cc: r-help at stat.math.ethz.ch Sent by: Subject: Re: [R] Arima owner-r-help at stat.ma th.ethz.ch 16/12/01 21:45 On Sun, 16 Dec 2001, Pascal Grandeau wrote:> > Does anyone make a routine for regression with ARMA errors with least > squares ?Prof Brian Ripley replies: What does that mean? `with least squares' implies independent errors. arma() fits by so-called *conditional* least squares: that leaves out terms in the log-likelihood which can be important, especially near non-stationarity. I've never understood why anyone would want to do that, except as a poor man's computational approximation. When considering the MA(1) model Harvey in "Time Series Models p60" says that assuming the initial disturbance to be fixed and equal to zero makes the problem of maximising the likelihood function equivalent to minimising the sum of squares of the errors - the result is then called the conditional sum of squares (CSS) estimate. The calculation of this "conditional likelihood function" is therefore simplified considerably and the resulting equations which are still nonlinear in the parameters are more readily optimised because analytic derivatives are available. Of course the exact likelihood function of any ARMA(p,q) model can be generated from Kalman recursions via the prediction error decomposition. Harvey's main argument for using the CSS estimate relies on the fact that maximising the likelihood is time consuming for large p+q (for myself, I take time consuming to mean that it's often very hard to find a solution to a nonlinear problem!). However, I suspect that with the computing power now available the time issue may be far less relevant. One final point though is that the CSS estimate may provide reasonable starting values for the optimisation of the exact likelihood. Gerard Keogh The information in this email, and any attachments transmitted with it, are confidential and are for the intended recipient only. If you receive this message in error, please notify us via postmaster at cso.ie. To see the latest figures from the CSO go to http://www.cso.ie -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> Date: Mon, 17 Dec 2001 13:42:16 +0000 (GMT) > From: Prof Brian Ripley <ripley at stats.ox.ac.uk> > Subject: Re: [R] Arima > > On Mon, 17 Dec 2001 Gerard.Keogh at cso.ie wrote: > > > On Sun, 16 Dec 2001, Pascal Grandeau wrote: > > > > > > Does anyone make a routine for regression with ARMA errors with least > > > squares ? > > > > Prof Brian Ripley replies: > > > > What does that mean? `with least squares' implies independent errors. > > arma() fits by so-called *conditional* least squares: that leaves out > > terms in the log-likelihood which can be important, especially near > > non-stationarity. I've never understood why anyone would want to do that, > > except as a poor man's computational approximation. > > [End of quote] > > > When considering the MA(1) model Harvey in "Time Series Models p60" says > > that assuming the initial disturbance to be fixed and equal to zero makes > > the problem of maximising the likelihood function equivalent to minimising > > the sum of squares of the errors - the result is then called the > > conditional sum of squares (CSS) estimate. The calculation of this > > "conditional likelihood function" is therefore simplified considerably and > > the resulting equations which are still nonlinear in the parameters are > > more readily optimised because analytic derivatives are available. > > > > Of course the exact likelihood function of any ARMA(p,q) model can be > > generated from Kalman recursions via the prediction error decomposition. > > Harvey's main argument for using the CSS estimate relies on the fact that > > maximising the likelihood is time consuming for large p+q (for myself, I > > take time consuming to mean that it's often very hard to find a solution to > > a nonlinear problem!). However, I suspect that with the computing power now > > available the time issue may be far less relevant. > > Exactly, as I said. > > > One final point though is that the CSS estimate may provide reasonable > > starting values for the optimisation of the exact likelihood. > > Given that arima0() does the exact likelihood, and I've never had to wait > more than a few seconds for it to do so, I still don't see why > anyone would ask for conditional least squares instead, which was the > request.Let me just say a few words why I believe that optimizing the CSS might still be useful in some cases (or at least have the possibility to choose between the CSS and the exact likelihood). As we all know arima models are at best good approximations to "real" data. Therefore, from my point of view a discussion about optimizing exact likelihood or not is rather academic. Except in a simulation setup, both the CSS and the exact likelihood are only approximations to the "real" likelihood. And it is not at all clear which of both provides a better approximation to the "real world". An example: On the intraday level financial price time series may be approximated rather well by the random walk plus noise model. However, the innovations are far from being Gaussian (have much much fatter tails, ARCH effects, structural breaks etc). Hence, an MA(1) model with non-Gaussian (and maybe non iid) innovations is a good candidate model for the return time series. However, explicitely modelling the innovation process is often not a good idea (too complex, still missspecified due to structural breaks, etc). Therefore, just using a Gaussian MA(1) model might be the first choice. The results from a small MC simulation: DGP: MA(1) with a coefficient of -0.5, rt innovations with df = 2, number of Obs. = 100, number of simulated paths = 5000: Model: Gaussian MA(1)> sqrt(mean((ma1+0.5)^2))[1] 0.09509874> sqrt(mean((ma2+0.5)^2))[1] 0.09313703> mean(ma1)[1] -0.5223137> mean(ma2)[1] -0.5196037> sd(ma1)[1] 0.0924531> sd(ma2)[1] 0.09105966 where ma1 is the vector containing the estimated MA(1) coefficients from arima0 (exact likelihood) and ma2 from arma (CSS). Hence, it seems that the CSS provides in this example a marginally better estimator. best Adrian -- Dr. Adrian Trapletti Phone: +41 (0)1 994 56 31 Wildsbergstrasse 31 Fax : +41 (0)1 994 56 33 CH-8610 Uster Email: a.trapletti at bluewin.ch Switzerland WWW : trapletti.homeip.net -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._