generateItem: Generate paired comparison data for one or more items given...

View source: R/generate.R

generateItemR Documentation

Generate paired comparison data for one or more items given absolute latent scores

Description

To add a single item, theta should be a vector of latent scores. To add multiple items at a time, theta should be a matrix with one item in each column. Item names can be given as the colnames of theta.

The interpretation of theta depends on the context where the data were generated. For example, in chess, theta represents unobserved chess skill that is partially revealed by match outcomes.

The graph can be regarded as undirected, but data are generated relative to the order of vertices within each row. Vertices do not commute. For example, a -1 for vertices ‘a’ and ‘b’ is the same as 1 for vertices ‘b’ and ‘a’.

Usage

generateItem(df, theta, th = 0.5, name, ..., scale = 1, alpha = 1)

Arguments

df

a data frame with pairs of vertices given in columns pa1 and pa2, and item response data in other columns

theta

a vector or matrix of absolute latent scores. See details below.

th

a vector of thresholds

name

a vector of item names

...

Not used. Forces remaining arguments to be specified by name.

scale

a vector of scaling constants

alpha

a vector of item discriminations

Value

The given data.frame df with additional columns for each item.

Response model

See cmp_probs for details.

See Also

Other item generators: generateCovItems(), generateFactorItems(), generateSingleFactorItems()

Examples

df <- roundRobinGraph(letters[1:5], 40)
df <- generateItem(df)

pcFactorStan documentation built on Sept. 14, 2023, 1:09 a.m.