Plot the optimised value, ‘signatures’ (loadings of the
Y matrix) or (projected) observed and fitted values
(Y and X scores) for a
varySmooth
object.
1 2 3 4 5 
x 
an object of class 
type 
the type of plot: either 
series 
if 
subject 
the subjects to include in the plot, specified by
levels of 
ask 
logical: if 
main 
an overall title for the plot. 
xlab 
a title for the x axis. 
ylab 
a title for the y axis. 
col 
a vector specifying a colour palette to use for the
lines/points. By default the palette is specified by

lty 
a vector of line types, see 
lwd 
a vector of line widths, see 
pch 
a vector of plotting characters, see 
space 
when 
corner 
when 
columns 
when 
... 
further arguments passed to 
For type = "opt"
, the value of the optimisation criterion,
log(1  R^2) is plotted against the number of
roots used in the GSLCCA, trellised by subject.
For type = "signature"
, the loadings of the Y
matrix from the GSLCCA are displayed for each subject,
trellised by the number of roots used in the GSLCCA. The arguments
col
and lty
control the line style and
legend text for each subject.
For type = "fitted"
, the X scores are
displayed, trellised by the number of roots
used in the GSLCCA. If there are multiple X scores
for each time point, then a line is displayed for each times series
specified by series
(usually the treatment factor used in
GSLCCA) and the arguments col
, lty
and pch
control the display for each series. By default, grey or black is used
to display values corresponding to the reference treatment (specified
by x$ref
).
For type = "scores"
the X scores are displayed as
for type = "fitted"
and points are added for the Y
scores, again coloured by series
.
Heather Turner
gslcca
, varySmooth
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  data(clonidine)
### Smoothed data  automatically select number of roots
result < gslcca(spectra, "Critical Exponential",
time = Time, treatment = Treatment, subject.smooth = TRUE,
data = clonidine, subset = Rat == "42")
### Vary number of roots
multiRoots < varySmooth(result, 2:15)
## plot optimised value
plot(multiRoots, "opt")
## plot fitted values
plot(multiRoots, "fitted")
## plot signature
plot(multiRoots, "signature")

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.