# Vary the Level of Smoothing used Prior to GSLCCA

### Description

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

### Usage

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

### Arguments

`x` |
a |

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

`...` |
currently ignored |

### Details

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.

### Value

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`

### Author(s)

Heather Turner

### See Also

`gslcca`

, `plot.varySmooth`

### Examples

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")
``` |