Description Usage Arguments Details Value References See Also Examples
This function operates on a univariate functional dataset and transforms its observations unfolding their values and turning them into monotone functions.
1 |
fData |
the univariate functional dataset in form of |
Each function of the fData
object is transformed into a non-monotone
function into a monotone function by “unfolding” it at any of its maxima.
For more details about the definition of the transform, see the reference.
The function returns an fData
object whose observations are
the unfolded version of the corresponding observations in the argument
fData
.
Arribas-Gil, A. and Romo, J. (2012). Robust depth-based estimation in the time warping model, Biostatistics, 13 (3), 398–414.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | P = 1e3
time_grid = seq( 0, 1, length.out = P )
D = matrix( c( sin( 2 * pi * time_grid ),
cos( 2 * pi * time_grid ),
sin( 10 * pi * time_grid ) * time_grid + 2 ),
ncol = P, nrow = 3, byrow = TRUE )
# Functional dataset
fD = fData( time_grid, D )
# Unfolded version
fD_unfold = unfold( fD )
dev.new()
oldpar <- par(mfrow = c(1, 1))
par(mfrow = c(1, 2))
plot(fD, main = 'Original data')
plot(fD_unfold, main = 'Unfolded data')
par(oldpar)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.