seq_gen2: Markov action sequence generator

Description Usage Arguments Details Value See Also

View source: R/seq_generator.R

Description

seq_gen2 generates action sequences according to a given probability transition matrix.

Usage

1
2
3
seq_gen2(n, Pmat = NULL, events = letters, start_index = 1,
  end_index = length(events), max_len = 200, include_time = FALSE,
  time_intv_dist = list("exp", 1))

Arguments

n

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

Pmat

An N by N probability transition matrix.

events

A character vector specifying the set of N possible actions. Default is letters.

start_index

Index of the action indicating the start of an item in events.

end_index

Index of the action indicating the end of an item in events.

max_len

Maximum length of generated sequences.

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

This function generates n action sequences according Pmat. The set of possible actions is events. All generated sequences start with events[start_index] and end with events[end_index]. If Pmat is not supplied, actions is uniformly drawn from events[-start_index] until events[end_index] appears.

Value

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

See Also

Other sequence generators: seq_gen3, seq_gen


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