create_q_matrix {secsse} | R Documentation |
Helper function to neatly setup a Q matrix, without transitions to concealed states (only observed transitions shown)
Description
Helper function to neatly setup a Q matrix, without transitions to concealed states (only observed transitions shown)
Usage
create_q_matrix(
state_names,
num_concealed_states,
shift_matrix,
diff.conceal = FALSE
)
Arguments
state_names |
vector of names of all observed states. |
num_concealed_states |
number of concealed states, generally equivalent to the number of examined states in the dataset. |
shift_matrix |
matrix of shifts, indicating in order:
|
diff.conceal |
Boolean stating if the concealed states should be
different. E.g. that the transition rates for the concealed
states are different from the transition rates for the examined states.
Normally it should be |
Value
transition matrix
Examples
shift_matrix <- c(0, 1, 5)
shift_matrix <- rbind(shift_matrix, c(1, 0, 6))
q_matrix <- secsse::create_q_matrix(state_names = c(0, 1),
num_concealed_states = 2,
shift_matrix = shift_matrix,
diff.conceal = TRUE)
[Package secsse version 3.1.0 Index]