simulIVS {IntervalQuestionStat}R Documentation

Simulation of interval-valued responses to a questionnaire

Description

This function allows to generate n interval-valued responses to each of k items of a questionnaire. These interval-valued responses are simulated mimicking the human behavior, considering three different procedures as it is suggested by De la Rosa de Sáa et al. (2015) and Lubiano et al. (2021).

Usage

simulIVS(
  n,
  k,
  w1 = 0.05,
  w2 = 0.35,
  w3 = 0.6,
  p = 2,
  q = 2,
  minimum = 1,
  maximum = 7
)

Arguments

n

A single positive integer indicating the number of different respondents that have answered to the questionnaire stored as a unique numeric object.

k

A single positive integer indicating the number of different items included in the questionnaire stored as a unique numeric object.

w1

A single real number in [0,1] indicating the proportion of observations that are generated in the first procedure stored as a unique numeric object. By default, w1 = 0.05.

w2

A single real number in [0,1] indicating the proportion of observations that are generated in the second procedure saved as a unique numeric object. By default, w2 = 0.35.

w3

A single real number in [0,1] indicating the proportion of observations that are generated in the third procedure stored as a unique numeric object. By default, w3 = 0.60.

p

A single non-negative real number which indicates the first parameter of a beta distribution. By default, p = 2.

q

A single non-negative real number which indicates the second parameter of a beta distribution. By default, q = 2.

minimum

A single real number indicating the lower bound of the interval-valued scale used saved as a unique numeric value. By default, minimum = 1.

maximum

A single real number indicating the upper bound of the interval-valued scale used saved as a unique numeric value. By default, maximum = 7.

Value

This function returns n interval-valued responses to each of k items in a questionnaire contained in a data.frame with n rows and 2k columns with values in the reference interval [\code{minimum}, \code{maximum}]. All interval-valued data's lower bounds appear in the first k columns of the data.frame and then all the corresponding upper bounds appear too.

Author(s)

José García-García garciagarjose@uniovi.es,
with contributions from María Asunción Lubiano lubiano@uniovi.es

References

Examples

## Simulation some interval-valued responses to a questionnaire
## carried out under the following particular conditions
## Number of respondents: n = 100
## Number of items: k = 5
## Procedures proportions: (w1, w2, w3) = (0.10, 0.25, 0.65)
## Beta distribution parameters: (p, q) = (1, 7)
## Reference interval of interval-valued scales: [0, 10]
data <- simulIVS(100, 5, 0.10, 0.25, 0.65, 1, 7, 0, 10)
head(data)

[Package IntervalQuestionStat version 0.2.0 Index]