View source: R/sequence_probs.R
sequence_probs | R Documentation |
Calculation of proabilities for binary sequences based on the final matrix generated by the genetic algorithm
sequence_probs(Xt)
Xt |
Representative matrix generated by the genetic algorithm
with |
Observation of binary correlated binary data can be expressed as binary sequences. In the case of two binary variables possible observations are (0,0), (0,1), (1,0) and (1,1). In general, 2^m binary sequences are possible, where m is the number of binary variables. Based on the representative matrix generated by the genetic algorithm the probability for each binary sequence is determined.
A vector of probabilities for the binary sequences
Jochen Kruppa, Klaus Jung
Kruppa, J., Lepenies, B., & Jung, K. (2018). A genetic algorithm for simulating correlated binary data from biomedical research. Computers in biology and medicine, 92, 1-8. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.compbiomed.2017.10.023")}
For more information, please refer to the package's documentation and the tutorial: https://software.klausjung-lab.de/.
### Generation of the representive matrix Xt
X0 <- start_matrix(p = c(0.5, 0.6), k = 1000)
Xt <- iter_matrix(X0, R = diag(2), T = 10000, e.min = 0.00001)$Xt
### Calculation of probabilities for binary sequences
sequence_probs(Xt = Xt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.