Skip to contents

similar_factor is an S3 class for categorical/factor similarity comparisons.

Usage

similar_factor(scores, summary, methods, list_names, levels, digits = 3)

Arguments

scores

List of similarity scores per method and comparison

summary

Summary statistics by method and comparison

methods

Character vector of methods used for comparison

list_names

Character vector of names for the compared lists

levels

Character vector of factor levels

digits

Number of digits to round results (default: 3)

Value

An object of class "similar_factor" (which inherits from "similar") containing:

  • scores: List of factor similarity scores per method and comparison

  • summary: Summary statistics by method and comparison

  • methods: Character vector of factor comparison methods used (exact, order)

  • list_names: Character vector of names for the compared factor lists

  • digits: Number of digits to round results in output

  • levels: Character vector of factor levels used in the comparison

The factor similarity scores are normalized values between 0 and 1, where 1 indicates identical factors and 0 indicates completely different factors based on the specific method used.

Details

This class extends the similar class and implements categorical data-specific similarity comparison methods.