Re: [R] fracdiff

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Sun 23 Jul 2006 - 05:40:08 EST

          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)
#

   if(missing(parm))
     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
   CI
}

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 values?
> Thanks,
> Melissa
>
> ______________________________________________
> R-help@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.



R-help@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. Received on Sun Jul 23 05:43:44 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 25 Jul 2006 - 10:21:30 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.