[R] fracdiff

Spencer Graves spencer.graves at pdf.com
Sat Jul 22 21:40:08 CEST 2006

	  Confidence intervals for the fracdiff parameter estimates shouldn't 
be too difficult:  the ?fracdiff help file says it returns a list with 
components including 'd', 'ar' 'ma', and 'stderror.dpq'.  From these one 
should easily get the coeffecients, standard errors and naive, Wald 
confidence intervals;  for your convenience, I've embedded these in the 
functions 'coef.fracdiff' and 'confint.fracdiff' given below.

	  By 'sigma2', I assume you mean the estimated variance of the whitened 
residuals.  That is not so obvious.  For that, I might try 
'arima(fitdiff(...))$sigma2', operating on a 'fracdiff' fit.

	  Hope this helps.
	  Spencer Graves
##### coef and confint functions for output of fracdiff:
coef.fracdiff <- function(object){
   unlist(object[c("d", "ar", "ma")])

confint.fracdiff <- function(object, parm, level=0.95, ...){
   b <- coef.fracdiff(object)
   se <- object$stderror.dpq
   names(se) <- names(b)
     parm <- 1:length(b)
   b. <- b[parm]
   se. <- se[parm]
   conf.c <- (1-level)/2
   conf2 <- c(conf.c, 1-conf.c)
   confNames <- paste(100*conf2, "%")
   k. <- length(b.)
   CI <- b+outer(se., qnorm(conf2))
   dimnames(CI)[[2]] <- confNames

Melissa Ann Haltuch wrote:
> Hi, I'm using the function fracdiff and can not 
figure out how to get the estimated values for
sigma2 or confidence intervals for the parameter
estimates. Does anyone know how to obtain these
> Thanks,
> Melissa
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list