R/parse.joint.R

Defines functions parse.joint

parse.joint <- function(P, v, cond, var, topo) {
  P.new <- probability()
  P.num <- P
  P.num$sumset <- union(P$sumset, setdiff(var, union(v, cond))) %ts% topo
  if (length(cond) > 0) {
    P.den <- P
    P.den$sumset <- union(P$sumset, setdiff(var, cond)) %ts% topo
    P.new$fraction <- TRUE
    P.new$num <- P.num
    P.new$den <- P.den
  } else P.new <- P.num
  return(P.new)
}

Try the causaleffect package in your browser

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

causaleffect documentation built on July 14, 2022, 5:07 p.m.