Susana Barbosa
2002-Jan-09 07:57 UTC
[R] How to obtain the series of residuals from fracdiff
Hi I'm using fracdiff package to estimate the parameters of a fractionally-differenced ARIMA (p,d,q) model, and it works fine, but I wanted to have also the filtered series and the series of residuals. I understand these are calculated in the subroutine fdfilt, in the program fdcore.f, but I can't manage to get them out. Any suggestion would be much appreciated Thanks Susana Barbosa -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Adrian Trapletti
2002-Jan-10 09:36 UTC
[R] How to obtain the series of residuals from fracdiff
> Date: Wed, 9 Jan 2002 07:57:31 +0000 > From: Susana Barbosa <susanabarbosa at novalis.fc.up.pt> > Subject: [R] How to obtain the series of residuals from fracdiff > > Hi > > I'm using fracdiff package to estimate the parameters of a > fractionally-differenced ARIMA (p,d,q) model, and it works fine, but I wanted > to have also the filtered series and the series of residuals. > I understand these are calculated in the subroutine fdfilt, in the program > fdcore.f, but I can't manage to get them out. > > Any suggestion would be much appreciated > > Thanks > > Susana BarbosaHi Susana For fractional differencing you can use, e.g., something like fracdiff <- function (x, d, N = 100) { n <- 0:N w <- gamma(-d+n)/(gamma(-d)*gamma(n+1)) y <- filter(x, w, sides=1) return (y) } Adrian -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Susana Barbosa
2002-Jan-13 17:14 UTC
[R] How to obtain the series of residuals from fracdiff
Dear Adrian Thank you very much for your help. It worked! Thanks Susana> > Hi Susana > > For fractional differencing you can use, e.g., something like > > fracdiff <- function (x, d, N = 100) > { > n <- 0:N > w <- gamma(-d+n)/(gamma(-d)*gamma(n+1)) > y <- filter(x, w, sides=1) > return (y) > } > > Adrian-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._