I would approach something like this using predict(fit41$gam,...) (see ?predict.gam) to produce the data needed for the plots.

Another possibility is to use s(Time,trt,bs="fs") (but see ?factor.smooth.interaction first).

Note that gamm4 does not have a correlation argument, because lme4 does not provide correlation structures, so corARH1() is just ignored (there is no error or warning produced because gamm4 does have a '...' argument!).

best,
Simon

On 27/11/12 00:07, MurphFL wrote:
My problem is relatively straight forward, but I cannot seem to find a way to
make it work.

I have a RCBD with repeated measurements over time. I have created a fit
using the gamm4 package. My model is:

fit4a <- gamm4(Rate ~ s(Time,by=trt,bs="cr")+trt,data=qual.11.dat,
               random=~(1|block),correlation=corARH1())

What I would like to create is plots with the X-axis being time, the Y-axis
being the fitted Rates for each individual treatment with the smoothed
curves overlayed on the plot.

Every idea I have had to do this has resulted in some errors, and I have
reached my wits end. Can anyone steer me in the right direction?



--
View this message in context: 
http://r.789695.n4.nabble.com/Help-with-graphics-in-gamm4-library-tp4650908.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org 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.



--
Simon Wood, Mathematical Science, University of Bath BA2 7AY UK
+44 (0)1225 386603               http://people.bath.ac.uk/sw283

______________________________________________
R-help@r-project.org 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