getProbRR {brm} | R Documentation |
Calculate risks from log RR and log OP (vectorised)
Description
Calculate risks from log RR and log OP (vectorised)
Usage
getProbRR(logrr, logop = NA)
Arguments
logrr |
log of relative risk |
logop |
log of odds product |
Details
The log OP
is defined as log OP = log[(P(y=1|x=0)/P(y=0|x=0))*(P(y=1|x=1)/P(y=0|x=1))]
.
Value
a matrix (P(y=1|x=0),P(y=1|x=1))
with two columns
Examples
getProbRR(0,0)
set.seed(0)
logrr = rnorm(10,0,1)
logop = rnorm(10,0,1)
probs = getProbRR(logrr, logop)
colnames(probs) = c("P(y=1|x=0)","P(y=1|x=1)")
probs
[Package brm version 1.1.1 Index]