Re-run GSLCCA with different amounts of smoothing at the subject level prior to analysis.

1 | ```
varySmooth(x, subject.smooth = 1:10, ...)
``` |

`x` |
a |

`subject.smooth` |
a vector of integers specifying the number of SVD roots use when smoothing the data |

`...` |
currently ignored |

This function can be used to investigate the effect of smoothing on GSLCCA.

When the `subject.smooth`

argument of `gslcca`

is an
integer, the data matrix for each subject is approximated using the
corresponding number of SVD roots.

An object of class `"varySmooth"`

which is a list of
`"gslcca"`

objects obtained by re-running the original GSLCCA
given by `x`

with each value of `subject.smooth`

Heather Turner

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.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.