walkscoring: Walkscoring Method to Calculate Individual Best-Worst Scores

Description Usage Arguments Details Value References Examples

View source: R/walkscoring.R

Description

Calculate best-worst scores for each respondent-item combination. This uses the walkscoring method described in White (2019).

Usage

1
walkscoring(data, id, block, item, choice, walks = 10000, wide = FALSE)

Arguments

data

A data.frame of the type described in details.

id

A string of the name of the id column.

block

A string of the name of the block column.

item

A string of the name of the item column.

choice

A string of the name of the choice column.

walks

Integer indicating how many random walks to simulate.

wide

Logical of whether or not one wants the data returned in long (each row is an item-respondent combination and all best-worst scores are in the same column) format (FALSE) or in wide format (where each row is a respondent, and the best-worst scores for the items are in their own columns). See the 'indiv' data as an example.

Details

This function requires data to be in a specified format. Each row must represent a respondent-block-label combination. That is, it indicates the person, the block (or trial), the item that was judged, and a column indicating whether it was chosen as best (+1), worst (-1), or wasn't selected as either (0).

Value

A data.frame containing the id and item columns as well as a "walk" column that indicates the best worst score. If 'wide = TRUE', then each item has its own column and the walkscore is filled-in those columns.

References

White, M. H., II. (2019). bwsTools: An R package for case 1 best-worst scaling. Retrieved from https://osf.io/xftvq/

Examples

1
2
3
4
5
6
7
## Not run: 
data(indiv)
head(indiv)
# use more than 100 walks; only using 100 here for speed
walkscoring(indiv, "id", "block", "label", "value", 100)

## End(Not run)

bwsTools documentation built on Aug. 27, 2020, 1:10 a.m.