Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

metric.ldata

Distance Matrix Computation for ldata and mfdata class object


Description

This function computes the distances between the list elements

Usage

metric.ldata(
  ldata1,
  ldata2 = NULL,
  include = "all",
  exclude = "none",
  metric,
  par.metric = NULL,
  w,
  method = "none"
)

Arguments

ldata1

List with of fdata objects and a data.frame object calle 'df'.

ldata2

List with of fdata objects and a data.frame object calle 'df'.

include

vector with the name of variables to use

exclude

vector with the name of variables to not use

metric

Type of metric to combine, if 'none', the function no combine and return a list o distances for each variable included

par.metric

List of metric parameters for each variable included

w,

weights to combine the metric (if metric is not 'none')

method

The distance measure to be used. This must be one of "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski".

Details

This function returns a distance matrix by using metric.lp function for fdata objects and metric.dist function for vector and matric objects.

Author(s)

Manuel Febrero-Bande, Manuel Oviedo de la Fuente manul.oviedo@usc.es

See Also

See also dist for multivariate date case and metric.lp for functional data case

Examples

## Not run: 
data(tecator)
names(tecator)[2]<-"df"
# Example 1 (list of distances)
ldist <- metric.ldata(tecator,method="none")
lapply(ldist,names)
# Example 2 (combined metric)
mdist <- metric.ldata(tecator,method="euclidean")
dim(mdist) 

## End(Not run)

fda.usc

Functional Data Analysis and Utilities for Statistical Computing

v2.0.2
GPL-2
Authors
Manuel Febrero Bande [aut], Manuel Oviedo de la Fuente [aut, cre], Pedro Galeano [ctb], Alicia Nieto [ctb], Eduardo Garcia-Portugues [ctb]
Initial release
2020-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.