validDistanceSpecification: (Internal) Validate that objects are valid distance...

View source: R/zzzDistanceSpecification.R

validDistanceSpecificationR Documentation

(Internal) Validate that objects are valid distance specifications.

Description

The functions fullmatch and pairmatch create optimal matches of treated and control units given a matrix (or similar representation) of distances between treated and control units. These distance specifications must implement certain generic functions. This function checks that all necessary methods exist and the object can be used to specify distances in a way that the matching functions can use.

Usage

validDistanceSpecification(distance, stopOnProblem = TRUE)

Arguments

distance

The object to test.

stopOnProblem

If TRUE (default) the function will raise an error for invalid objects. Otherwise, it returns a logical.

Value

logical


jgellar/GroupMatch documentation built on Nov. 8, 2022, 10:48 p.m.