mtscr_score {mtscr}R Documentation

Score creativity with MTS

Description

Score creativity with MTS

Usage

mtscr_score(
  df,
  id_column,
  item_column = NULL,
  score_column,
  top = 1,
  format = c("minimal", "full"),
  ties_method = c("random", "average"),
  normalise = TRUE,
  self_ranking = NULL
)

Arguments

df

Data frame in long format.

id_column

Name of the column containing participants' id.

item_column

Optional, name of the column containing distinct trials (e.g. names of items in AUT).

score_column

Name of the column containing divergent thinking scores (e.g. semantic distance).

top

Integer or vector of integers (see examples), number of top answers to prepare indicators for. Default is 1, i.e. only the top answer.

format

Character, controls the format of the output data frame. Accepts:

"minimal"

default, returns only the creativity scores and id columns.

"full"

returns the original data frame with creativity scores columns added.

ties_method

Character string specifying how ties are treated when ordering. Can be "average" (better for continuous scores like semantic distance) or "random" (default, better for ratings). See rank() for details.

normalise

Logical, should the creativity score be normalised? Default is TRUE and it's recommended to leave it as such.

self_ranking

Name of the column containing answers' self-ranking. Provide if model should be based on top answers self-chosen by the participant. Every item should have its own ranks. The top answers should have a value of 1, and the other answers should have a value of 0. In that case, the top argument doesn't change anything and should be left as top = 1. ties_method is not used if self_ranking was provided. See mtscr_self_rank for example.

Value

A tibble with creativity scores. If format = "full", the original data frame is returned with scores columns added. Otherwise, only the scores and id columns are returned. number of creativity scores columns (e.g. creativity_score_top2) depends on the top argument.

See Also

tidyr::pivot_wider() for converting the output to wide format by yourself.

Examples

data("mtscr_creativity", package = "mtscr")
mtscr_score(mtscr_creativity, id, item, SemDis_MEAN, top = 1:2)

# add scores to the original data frame
mtscr_score(mtscr_creativity, id, item, SemDis_MEAN, format = "full")

# use self-chosen best answers
data("mtscr_self_rank", package = "mtscr")
mtscr_score(mtscr_self_rank, subject, task, avr, self_ranking = top_two)

[Package mtscr version 1.0.1 Index]