Description Usage Arguments Value Examples
The methods for objects of class 'FMM'
are:
coef | coef method for S4 class 'FMM' , |
summary | summary method for S4 class 'FMM' , |
fitted | fitted method for S4 class 'FMM' , |
resid | resid method for S4 class 'FMM' . |
1 2 3 4 5 6 7 8 9 10 11 |
object |
object of class |
... |
additional arguments passed to the method. |
The function coef()
returns a list
with two components:
M | A numeric value. The estimated intercept parameter M. | |
wave | A data.frame with the estimates of each FMM wave parameters.
It is organised as one component per row.
|
The function summary()
displays relevant results of the fitting.
When it is assigned, this function returns a list
with the following components:
coef | The list returns by the function coef() . |
|
peak.time | A data.frame with the estimates of the peak and trough
times of each wave. It is organised as one component per row. |
|
resid | The vector of residuals. |
|
R.squared | A numerical value with the R squared of each wave. The total R square is computed as the sum of the contribution of each component. |
The function fitted()
returns a data.frame
with two columns:
timePoints
and fittedValues
.
The function resid()
returns a numeric vector
with residuals of the model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Generate example data:
fmm2.data <- generateFMM(0, rep(2, 2), c(1.5, 3.4), c(0.2, 2.3), 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 component
## fit is an object of S4 class 'FMM'
fit <- fitFMM(vData = fmm2.data$y,timePoints = fmm2.data$t,nback = 2,
lengthAlphaGrid = 24,lengthOmegaGrid = 10)
## Extract coefficients of the model:
coef(fit)
## Summarize results:
summary(fit)
## Results on a list:
res <- summary(fit)
res$peak.time # fiducial points
## fitted values:
fit.values <- fitted(fit)
## residuals
res <- resid(fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.