summary.ism {optmatch}R Documentation

Summarize a distance matrix

Description

Given a distance matrix, return information above it, including dimension, sparsity information, unmatchable members, summary of finite distances, and, in the case of BlockedInfinitySparseMatrix, block structure.

Usage

## S3 method for class 'InfinitySparseMatrix'
summary(object, ..., distanceSummary = TRUE)

## S3 method for class 'BlockedInfinitySparseMatrix'
summary(
  object,
  ...,
  distanceSummary = TRUE,
  printAllBlocks = FALSE,
  blockStructure = TRUE
)

## S3 method for class 'DenseMatrix'
summary(object, ..., distanceSummary = TRUE)

Arguments

object

A InfinitySparseMatrix, BlockedInfinitySparseMatrix or DenseMatrix.

...

Ignored.

distanceSummary

Default TRUE. Should a summary of minimum distance per treatment member be calculated? May be slow on larger data sets.

printAllBlocks

If object is a BlockedInfinitySparseMatrix, should summaries of all blocks be printed alongside the overall summary? Default FALSE.

blockStructure

If object is a BlockedInfinitySparseMatrix and printAllBlocks is false, print a quick summary of each individual block. Default TRUE. If the number of blocks is high, consider suppressing this.

Details

The output consists of several pieces.

Value

A named list. The summary for an InfinitySparseMatrix or DenseMatrix contains the following:

total:

Contains the total number of treatment and control members, as well as eligible and ineligible matches.

matchable:

The names of all treatment and control members with at least one eligible match.

unmatchable:

The names of all treatment and control members with no eligible matches.

distances:

The summary of minimum matchable distances, if distanceSummary is TRUE.

For BlockedInfinitySparseMatrix, the named list instead of contains one entry per block, named after each block (i.e. the value of the blocking variable) as well as a block named 'overall' which contains the summary ignoring blocks. Each of these entries contains a list with entries 'total', 'matchable', 'unmatchable' and 'distances', as described above.


[Package optmatch version 0.10.7 Index]