[R] change the colour line in gamm4 plotting

Maria Lathouri mlathouri at yahoo.gr
Tue Jul 26 15:47:58 CEST 2016


Dear all 

I am stuck probably in a simple plotting question

My model is:model.1<-gamm4(y~s(x1, by=end.group)+Year+K1+k2+k3, data=.., random=~(1|WB_ID/Site_ID))
where y is my dependent variable, x1 is the smooth covariate and I use the by argument for the smooth term based on six different groups, and then the Year, k1, k2, k3 are explanatory fixed variables

I use the plot command to plot the model and I get six different plots:plot(model.1$gam, pages=1, xlab=" ", ylab=" ")
I would like to change the colour of the fitted and the standard error lines, from black which is the default to another colour; I tried to use the col=" " function, at least for the main line, in the plot command but it is not working. 

Any advice/suggestion is welcome.
Many thanks.Maria

	[[alternative HTML version deleted]]



More information about the R-help mailing list