# [R] fracdiff

Melissa Ann Haltuch mhaltuch at u.washington.edu
Mon Jul 24 23:31:34 CEST 2006

```Hi Spencer,
Thanks for the direction. Yes, I am after the sigma for the estimated variance of the whitened residuals. I'll give your code a try!
Cheers,
Melissa

On Sun, 23 Jul 2006, Spencer Graves wrote:

> 	  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 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.
>

```