simlarityMeasures: Calculate Similarity Measures

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculate individual or multiple measures of similarity between prompt and response in open-ended manipulation check.

Usage

1
2
3
4
5
6
7
similarityMeasures(
  dataframe,
  prompt,
  response,
  n_gram_measures_to_calculate = c("jaccard"),
  ngrams = 3
)

Arguments

dataframe

Dataframe that contains the prompt and response of the open-ended manipulation check.

prompt

Vector/column within 'dataframe' that contains the prompt.

response

Vector/column within 'dataframe' that contains the open-ended response.

n_gram_measures_to_calculate

Vector of n-gram similarity measures to calculate. Possible values for measure_type = c("osa", "lv", "dl", "hamming", "lcs", "qgram", "cosine", "jaccard", "jw", "soundex"). Default is "jaccard".

ngrams

The number of grams/segments words should be broken into. Default n=3.

Value

Original dataframe plus columns with similarity measures (same length as input dataframe)

Author(s)

Jeffrey Ziegler (<jeffrey.ziegler[at]emory.edu>)

See Also

plotSimilarity plotSimilarityCorr

Examples

1
replication_complete.cases <- simlarityMeasures(replication_complete.cases, prompt="textViewed", response="validityCheck", ngrams=3)

zieglerjef/openEnded documentation built on Nov. 30, 2020, 2:03 p.m.