R/biv.bern.R

Defines functions biv.bern

Documented in biv.bern

biv.bern <- function(p11,p10,p01,p00,y1,y2){
  if(sum(p11,p10,p01,p00) != 1) stop("Joint probs. must sum to one")
  f.1.2 <- p11^(y1*y2)*p10^(y1*(1-y2))*p01^((1-y1)*y2)*p00^((1-y1)*(1-y2))
  f.1.2
}

Try the streamDAG package in your browser

Any scripts or data that you put into this service are public.

streamDAG documentation built on Oct. 7, 2023, 1:08 a.m.