seq_gen: Action sequence generator

Description Usage Arguments Details Value See Also

View source: R/seq_generator.R

Description

seq_gen generates action sequences of an imaginary simulation-based item.

Usage

1
2
3
4
5
6
seq_gen(n, action_set1 = c("OPT1_1", "OPT1_2", "OPT1_3"),
  action_set2 = c("OPT2_1", "OPT2_2"), answer_set = c("CHECK_A",
  "CHECK_B", "CHECK_C", "CHECK_D"), p1 = rep(1, length(action_set1)),
  p2 = rep(1, length(action_set2)), p_answer = rep(1,
  length(answer_set)), p_continue = 0.5, p_choose = 0.5,
  include_time = FALSE, time_intv_dist = list("exp", 1))

Arguments

n

An integer. The number of action sequences to be generated.

action_set1, action_set2

Character vectors giving the choices for the first and the second conditions.

answer_set

A character vector giving the choices for the answer.

p1, p2

Nonnegative numeric vectors. They are the weights for sampling from action_set1 and action_set2.

p_answer

A nonnegative numeric vector giving the weights for sampling from answer_set.

p_continue

Probability of running an/another experiment.

p_choose

Probability of choosing an answer.

include_time

logical. Indicate if timestamp sequences should be generated. Default is FALSE.

time_intv_dist

A list specifying the distribution of the inter-arrival time.

Details

The format of the generated sequences resembles that of the response processes of simulation-based items. In these items, participants are asked to answer a question by running simulated experiments in which two conditions can be controlled. A simulated experiment can be run by setting the two conditions at one of the given choices and click "Run" button.

The possible actions are "Start", "End", "Run", and the elements in action_set1, action_set2, and answer_set. The generated sequences begin with "Start" and continue with groups of three actions. Each group of three actions, representing one experiment, consists of an action chosen from action_set1 according to p1, an action chosen from action_set2 according to p2, and "Run". The probability of performing an experiment after "Start" or one experiment is p_continue. After the experiment process, with probability p_choose, an answer will be chosen. The chosen answer is randomly sampled from answer_set according to p_answer. All generated sequences end with "End".

Value

An object of class "proc" with time_seqs = NULL.

See Also

Other sequence generators: seq_gen2, seq_gen3


ProcData documentation built on April 1, 2021, 5:07 p.m.