View source: R/SMM_functions.R
comb2matrices | R Documentation |
Combining two matrices. The parametric schem of matrice is defined by nattural numbers; different numbers = different rate parameters
comb2matrices(M1, M2, dependent.state = NULL, name.sep = "", diag.as = "")
M1 |
matrix; if dependency true thenM1 controls M2 |
M2 |
matrix; if dependency true then: M2 depends on those states of M1 specified in dependent.state |
dependent.state |
state(s) of M1 that switches on matrix M2 |
name.sep |
separator for state names |
diag.as |
hpopulate main diagonal with |
Matrix
M1<-matrix(c(-1,1, 2,-2),2,2,byrow=TRUE) rownames(M1)<-colnames(M1)<-c("0","1") M2<-matrix(c(-3,3, 4,-4),2,2,byrow=TRUE) rownames(M2)<-colnames(M2)<-c("0","1") comb2matrices(M1, M2, dependent.state=NULL) comb2matrices(M1, M2, dependent.state=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.