extractWaves: Individual contribution to the fitted values of each FMM wave

Description Usage Arguments Value Examples

View source: R/extractWaves.R

Description

extractWaves extracts individual contribution to the fitted values of each FMM wave.

Usage

1
extractWaves(objFMM)

Arguments

objFMM

Object of class 'FMM'.

Value

Individual contribution to the fitted values of each FMM wave. It is a list object with as many elements as FMM components have been fitted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Generate example data:
fmm2.data <- generateFMM(M = 0, A = rep(1, 2),
                         alpha = c(1.5, 3.4), beta = c(0.2, 2.3), omega = c(0.1, 0.2),
                         plot = FALSE, outvalues = TRUE,
                         sigmaNoise = 0.5) # add a gaussian noise with sigma = 0.5

## Fit the FMM model with nback = 2 components
## fit is an object of S4 class 'FMM'
fit <- fitFMM(fmm2.data$y,timePoints = fmm2.data$t,nback = 2,
              lengthAlphaGrid = 24,lengthOmegaGrid = 10)
## extracts individual contribution of each FMM wave
extractWaves(fit)

FMM documentation built on Dec. 17, 2021, 5:06 p.m.