sim_subject_attributes function

Simulate Subject Latent Attribute Profiles αc\mathbf{\alpha}_c

Simulate Subject Latent Attribute Profiles αc\mathbf{\alpha}_c

Generate a sample from the αc=(αc1,,αcK)\mathbf{\alpha}_c = (\alpha_{c1}, \ldots, \alpha_{cK})'

attribute profile matrix for members of class cc such that αck\alpha_{ck} ' is 1 if members of class cc possess skill kk

and zero otherwise.

sim_subject_attributes(N, K, probs = NULL)

Arguments

  • N: Number of Observations
  • K: Number of Skills
  • probs: A vector of probabilities that sum to 1.

Returns

A NN by KK matrix of latent classes corresponding to entry cc of pipi based upon mastery and nonmastery of the KK skills.

Examples

# Define number of subjects and attributes N = 100 K = 3 # Generate a sample from the Latent Attribute Profile (Alpha) Matrix # By default, we sample from a uniform distribution weighting of classes. alphas_builtin = sim_subject_attributes(N, K) # Generate a sample using custom probabilities from the # Latent Attribute Profile (Alpha) Matrix probs = rep(1 / (2 ^ K), 2 ^ K) alphas_custom = sim_subject_attributes(N, K, probs)

See Also

attribute_classes() and attribute_inv_bijection()

Author(s)

James Joseph Balamuta and Steven Andrew Culpepper

  • Maintainer: James Joseph Balamuta
  • License: GPL (>= 2)
  • Last published: 2023-11-29