simulate_population: Simulate Normal Population Scores for Multiple Items

simulate_populationR Documentation

Simulate Normal Population Scores for Multiple Items

Description

This function allows you to create normal populations for data that would include repeated measures items. Additionally, the data can be rounded and/or truncated to ensure it matches a target scale - for example, a 1-7 type rating scale.

Usage

simulate_population(
  mu = NULL,
  mu_sigma = NULL,
  sigma = NULL,
  sigma_sigma = NULL,
  number_items = NULL,
  number_scores = NULL,
  smallest_sigma = NULL,
  min_score = NULL,
  max_score = NULL,
  digits = NULL
)

Arguments

mu

The population mean for the items.

mu_sigma

The amount of variability for each of the means (i.e., the standard deviation of the item's means)

sigma

The population standard deviation for each item.

sigma_sigma

The standard deviation of the standard deviations for the items (i.e., heterogeneity)

number_items

The number of items to generate

number_scores

The number of scores for each item to generate

smallest_sigma

The smallest possible standard deviation for an item that is acceptable (default is sigma_sigma/10)

min_score

If you want to truncate scores, what is the smallest possible score?

max_score

If you want to truncate scores, what is the largest possible score?

digits

If you want to round scores, how many digits should it be rounded to?

Value

  • "population"The population scores with the number of items and scores specified

Examples

simulate_population(mu = 4, mu_sigma = .2, sigma = 2,
 sigma_sigma = .2, number_items = 30, number_scores = 1000,
 smallest_sigma = .02, min_score = 1, max_score = 7,
 digits = 0)

SemanticPriming/semanticprimeR documentation built on Feb. 26, 2024, 8:30 p.m.