rug(x, ticksize, side=1, lwd)
a frequency plot of
x
is added to the appropriate side of the box, represented by a
rugof bars.
The function
jitter
is useful for breaking ties.
gamob <- gam(Kyphosis ~ s(Age) + s(Number), data=kyphosis, family=binomial) plot(kyphosis$Age, fitted(gamob)) # plot the fitted values against age rug(jitter(kyphosis$Age)) # add a frequency plot of age at the base