[R] ACF plot - setting parameters
Chuck Cleland
ccleland at optonline.net
Thu May 18 15:07:14 CEST 2006
Roger Schürch wrote:
> Dear R-help list
>
> I have problems setting parameters for the autocorrelation function plot. I
> would like to Sweave a document with an ACF plot. Firstly the plot does not
> show in my document (the eps file seems to be corrupted), and secondly I
> would like to have it strictly black and white (like in Pinheiro & Bates, p.
> 242).
>
> I tried the following:
>
>> plot( ACF(myModel), alpha = 0.05, bg = "white", ci.col = "black",
> col="black")
>
> R does not complain, but does not set the parameters either. Any idea what I
> am doing wrong?
You need to print the plot - something like this:
<<echo=FALSE,results=hide>>=
library(nlme)
fm1 <- lme(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary)
trellis.device(color=FALSE)
@
\begin{figure}
\centering
<<fig=TRUE,width=11,height=5>>=
print(plot(ACF(fm1, maxLag = 10), alpha = 0.01))
@
\end{figure}
\begin{center}
\end{center}
> Cheers
> Roger
>
> ______________________________________________
> 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
>
--
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894
More information about the R-help
mailing list