Learn R Programming

gRain (version 0.8.3)

andtable: Conditional probability tables based on logical dependcies

Description

Generate conditional probability tables based on the logical expressions AND and OR.

Usage

andtable(v, pa = NULL, pa1 = c(TRUE, FALSE), pa2 = c(TRUE, FALSE), levels)
ortable(v, pa = NULL, pa1 = c(TRUE, FALSE), pa2 = c(TRUE, FALSE), levels)

Arguments

v
A vertex
pa
The parents of vertex v
pa1,pa2
The coding of the logical parents
levels
The levels (or rather labels) of v, see 'examples' below

Value

  • A cptable.

See Also

cptable

Examples

Run this code
ortable(c("v","A","B"), levels=c("yes","no"))

Run the code above in your browser using DataLab