Learn R Programming

RepeatedHighDim (version 2.3.0)

sequence_probs: Calculation of probabilities for binary sequences

Description

Calculation of proabilities for binary sequences based on the final matrix generated by the genetic algorithm

Usage

sequence_probs(Xt)

Value

A vector of probabilities for the binary sequences

Arguments

Xt

Representative matrix generated by the genetic algorithm with iter_matrix

Author

Jochen Kruppa, Klaus Jung

Details

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.

References

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. tools:::Rd_expr_doi("10.1016/j.compbiomed.2017.10.023")

See Also

For more information, please refer to the package's documentation and the tutorial: https://software.klausjung-lab.de/.

Examples

Run this code
### 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)

Run the code above in your browser using DataLab