Description Usage Arguments Details Value See Also Examples

This method computes the sample median of a multivariate functional dataset based on a definition of depth for multivariate functional data.

1 | ```
median_mfData(mfData, type = "multiMBD", ...)
``` |

`mfData` |
the multivariate functional dataset whose
median is required, in form of |

`type` |
a string specifying the name of the function defining the depth
for multivariate data to be used. It must be a valid name of a function
defined in the current environment, default is |

`...` |
additional parameters to be used in the function specified by
argument |

Provided a definition of functional depth for multivariate data,
the corresponding median (i.e. the deepest element of the sample) is returned
as the desired median.
This method does **not** coincide with the computation of the
cross-sectional median of the sample of the point-by-point measurements on
the grid. Hence, the sample median is a member of the dataset provided.

The function returns a `mfData`

object containing the desired
sample median.

`mfData`

, `mean.mfData`

,
`median_fData`

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 26 27 28 29 30 31 32 33 | ```
N = 1e2
L = 3
P = 1e2
grid = seq( 0, 1, length.out = P )
# Generating a gaussian functional sample with desired mean
# Being the distribution symmetric, the sample mean and median are coincident
target_median = sin( 2 * pi * grid )
C = exp_cov_function( grid, alpha = 0.2, beta = 0.2 )
# Strongly dependent components
correlations = c( 0.9, 0.9, 0.9 )
mfD = mfData( grid,
generate_gauss_mfdata( N, L,
correlations = correlations,
centerline = matrix( target_median,
nrow = 3,
ncol = P,
byrow = TRUE ),
listCov = list( C, C, C ) )
)
med_mfD = median_mfData( mfD, type = 'multiMBD', weights = 'uniform' )
# Graphical representation of the mean
par( mfrow = c( 1, 3 ) )
for( iL in 1 : L )
{
plot( mfD$fDList[[ 1 ]] )
plot( med_mfD$fDList[[ 1 ]], col = 'black',
lwd = 2, lty = 2, add = TRUE )
}
``` |

roahd documentation built on May 20, 2017, 3:53 a.m.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

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

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.