Skip to content
Prev 15852 / 398502 Next

gam plots

Dear R users,

Using the library(mgcv) and running R under MacOSX, I have fitted a 
generalised additive model with binomial errors in order to check the 
linearity of two continuous variables ap2mm and diffdaysm in a glm:
Dweekm:diffdaysm + ap2mm:Dweekm, binomial)

I would like postscript gam plots for the two smoothed terms to be 
produced on separate pages, but am having trouble getting these.  I 
can get the two plots output to a single page using
I don't want this, but when I try replacing pages=1 with pages=2, I 
still get only one page in the postscript file with the second plot 
overlaid on the first one:
Press return for next page....


	I wondered if anyone knows of a way to get each plot on a 
separate page, i.e. two postscript files?

I also noticed that the plot gives tick marks for the values of the 
variable along the horizontal axis, but I would like a rug of *all* 
the values (Splus5 produces a rug using jittering to show the density 
of the observations, but the version of R that I have doesn't do 
this, as far as I can tell).

I would be very grateful if anyone has any suggestions that would 
help sort this out.

Many thanks,
Patty