randomClickstreams {clickstream} | R Documentation |
Generates a List of Clickstreams
Description
Generates a list of clickstreams by randomly walking through a given transition matrix.
Usage
randomClickstreams(
states,
startProbabilities,
transitionMatrix,
meanLength,
n = 100
)
Arguments
states |
Names of all possible states. |
startProbabilities |
Start probabilities for all states. |
transitionMatrix |
Matrix of transition probabilities. |
meanLength |
Average length of the click streams. |
n |
Number of click streams to be generated. |
Value
Returns a list of clickstreams.
Author(s)
Michael Scholz michael.scholz@th-deg.de
See Also
fitMarkovChain
, readClickstreams
,
print.Clickstreams
Examples
# generate a simple list of click streams
states <- c("a", "b", "c")
startProbabilities <- c(0.2, 0.5, 0.3)
transitionMatrix <- matrix(c(0, 0.4, 0.6, 0.3, 0.1, 0.6, 0.2, 0.8, 0), nrow = 3)
cls <- randomClickstreams(states, startProbabilities, transitionMatrix, meanLength = 5, n = 10)
print(cls)
[Package clickstream version 1.3.3 Index]