| summary.net_markov_order | R Documentation |
Summary Method for net_markov_order
## S3 method for class 'net_markov_order'
summary(object, ...)
object |
A |
... |
Ignored. |
The tidy test_table data.frame, with the selected
optimal_order attached as an attribute.
# First-order Markov data: test should select order 1
set.seed(1)
states <- letters[1:4]
tm <- matrix(runif(16), 4, 4, dimnames = list(states, states))
tm <- tm / rowSums(tm)
seqs <- lapply(1:30, function(.) {
s <- character(50); s[1] <- sample(states, 1)
for (i in 2:50) s[i] <- sample(states, 1, prob = tm[s[i - 1], ])
s
})
res <- markov_order_test(seqs, max_order = 3, n_perm = 300, seed = 1)
res$optimal_order
summary(res)
plot(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.