grouplabel: The information on the group structure of the units. See description of kwaymatching for details on the argument.
components: A list specifying the components of the distance structure. Each element of the list is a character vector of column names of the .data on which 'distance' will be calculated. The element names specify the function to be used to calculate to distance of two groups. Element named 'prop' indicates the propensity distance where the propensity is calculated from the specified variable. Element named 'mahal' or 'Mahalanobis' for rank based Mahalanobis distance.
User can spacify their own distance function. For example, a function myDist should be a function of two arguments: a logical vector of the first group indicator and a data matrix. It should return a numeric matrix of size number of units of first group×number of units of second group. See details for an example.
wgts: A non-negative numeric vector of weights of the components.
Details
This function can be used to get distance structure suitable for creating the distances between the units of the groups.
For an example of the kind of user defined distance function that can be used see smahal below.
Returns
A list describing the distance structure. For detail see the description of the argument distmat in the function kwaymatching.