
Simulate Data from a Group Transition Network Analysis Model
Source:R/simulate.R
simulate.group_tna.RdSimulate Data from a Group Transition Network Analysis Model
Arguments
- object
A
group_tnaobject. The edge weights must be transition probabilities or frequencies, i.e., the model must havetype = "relative"ortype = "frequency".- nsim
An
integervector giving the number of sequences to simulate per group. If a single integer is provided, the same number of sequences is generated per each group. The default is 1.- seed
an object specifying if and how the random number generator should be initialized (‘seeded’).
For the"lm"method, eitherNULLor an integer that will be used in a call toset.seedbefore simulating the response vectors. If set, the value is saved as the"seed"attribute of the returned value. The default,NULLwill not change the random generator state, and return.Random.seedas the"seed"attribute, see ‘Value’.- max_len
An
integervector giving the maximum length of the simulated sequences per group. When no missing values are generated, this is the length of all simulated sequences. If a single integer is provided, the maximum length is the same for each group.- na_range
An
integervector of length 2 giving the minimum and maximum number of missing values to generate for each sequence. The number of missing values is drawn uniformly from this range. If both values are zero (the default), no missing values are generated.- zero_row
A
characterstring describing how to process zero rows in the weight matrix. The option"self"(the default) assigns probability 1 to the corresponding state (self loop) and option"uniform"assigns a uniform distribution.- format
A
characterstring indicating whether the data should be returned inwideorlongformat.- ...
Ignored.
See also
Other data:
import_data(),
import_onehot(),
prepare_data(),
print.tna_data(),
simulate.tna()