Martin Percossi wrote:

> Hi, I would like to use acf.plot on a correlogram that is computed 
> externally. In other words, I would like to "fake out" the acf object. 
> Is this possible?-- any help would be appreciated.

        (a) Note that it's ``plot.acf'' NOT acf.plot.

        (b) This is R --- ***ANYTHING*** is possible.

        (c) Create an object, say ``y'' of class ``acf'',
        having components with the right names.  You could
        build a dummy acf object by

                > dum <- acf(rnorm(100),plot=FALSE)

        and the examine ``dum'' to see what it should consist of.

        (d) Something like:

                y <- list(acf=array(ecc,dim=c(length(ecc),1,1)),
                          type="correlation",
                          n.used=n.ecc,lag=array(0:(length(ecc)-1),
                                                 dim=c(length(ecc),1,1)),
                          series="ecc",snames=NULL)
                class(y) <- "acf"
                plot(y)

        where ``ecc'' is a vector comprising your ``externally
        created correlogram'' and ``n.ecc'' is the length of the series
        from which ecc was created.  Note that the first entry of ecc
        should be 1; it corresponds to lag 0.

                                        cheers,

                                                Rolf Turner
                                                [EMAIL PROTECTED]

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

Reply via email to