Learn R Programming

dst (version 1.3.0)

tabresul: Prepare a table of results

Description

This utility function is a more detailed version of the belplau function. Different tables of measures of belief, plausibility and of the plausibility ratio can be obtained, namely by removing subsets with zero mass if present, or by asking for singletons only.

Usage

tabresul(x, singletonsOnly = FALSE, removeZeroes = FALSE)

Arguments

x

A bca mass function

singletonsOnly

= TRUE reduces the table of results to elementary events (singletons).

removeZeroes

= TRUE removes subsets with 0 mass.

Value

A list of two elements:

  • mbp: The table of focal elements with the addition of their associated mass, degree of belief, plausibility and the plausibility ratio.

  • con The measure of conflict between subsets.

Examples

Run this code
# NOT RUN {
 
x <- bca(f=matrix(c(0,1,1,1,1,0,1,1,1),nrow=3, 
byrow = TRUE), m=c(0.2,0.5, 0.3), 
cnames =c("a", "b", "c"), 
infovarnames = "x", varnb = 1)
y <- bca(f=matrix(c(1,0,0,1,1,1),nrow=2, 
byrow = TRUE), m=c(0.6, 0.4),  
cnames = c("a", "b", "c"), infovarnames = "y", varnb = 1)
xy <- dsrwon(x,y)
xyNorm <- nzdsr(xy)
tabresul(xyNorm) 
## print("Show all elementary events")
xy1 <- addTobca(nzdsr(dsrwon(x,y)), 
matrix(c(0,1,0,0,0,1), 
nrow=2, byrow = TRUE))
tabresul(xy1)
## print("Remove focal elements with 0 mass")
tabresul(xy1, removeZeroes = TRUE)
print("Retain singletons only")
tabresul(xy1, singletonsOnly = TRUE)
# }

Run the code above in your browser using DataLab