powered by
Retrieve (conditional) probabilities from binary time series
getProb(ts)
Binary time series vector
List of three elements
p1 the prevalence p(X(t)=1) and
p1
p1|1 and p1|0 the two auto-conditional probabilities p(X(t)=1|X(t-1)=1) & p(X(t)=1|X(t-1)=0)
p1|1
p1|0
# NOT RUN { getProb(c(1,0,1,0,1,0,1,1,1,1,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0)) # }
Run the code above in your browser using DataLab