compareK: Determine "best" level of k

Description Usage Arguments Details Author(s) See Also Examples

View source: R/compareK.R

Description

Calculate the correlation between the "correct" answer as determined by a human and participants' average similarity score

Usage

1
2
3
4
5
6
7
compareK(
  dataframe,
  similarity_measures,
  correct_vec,
  k_range = 1:10,
  plot_path = NULL
)

Arguments

dataframe

Dataframe from which you will select the similarity measures from.

similarity_measures

Vector(s) from dataframe that contains the similarity measures to be used as weights.

correct_vec

Character indicating vector in dataframe that indicates whether a respondent answered "correctly" as determined by a human coder. Default is NULL, so if a user doesn't include anything function will automatically set a threshold of "correctness" based on a respondent's average similarity (i.e. those respondents that score below say 0.1 will not be included in the "list-wise deletion" sample.

k_range

The range of penalties that you want plotted. Remember, lower levels of k down-weight low attention participants more severely.

plot_path

If user wants to save figure, please provide a character vector for the file path in which the plot should be download. User must decide extension (pdf, jpg, png) in file path.

Details

Determine what value of k is best suited to reduce the impact of inattentive participants on the overall results, while still maintaining that our measure of attention is correlated with some indicator of correctness (even if it is subjective).

Author(s)

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

See Also

similarityMeasures

Examples

1
2
3
4
compareK(dataframe=kaneData, 
  similarity_measures =c("jaccardSimilarity", "cosineSimilarity"), 
  correct_vec = "correct", 
  k_range=1:10)

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