adherence_markov | R Documentation |
Model adherence as a markov chain model, based on the probability of staying adherent and of becoming adherent once non-adherent. Assumes all patients start adherent.
adherence_markov(n = 100, p11 = 0.9, p01 = 0.7)
n |
number of occasions |
p11 |
probability of staying adherent |
p01 |
probability of going from non-adherent to adherent state |
Returns a vector of length 'n' containing values 0 (non-adherent) or 1 (adherent).
Numeric vector of length n
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.