Learn R Programming

dst (version 1.3.0)

nzdsr: Normalization of a bca mass function

Description

It may occur that the result of the combination of two mass functions with Dempater'Rule of combination contains a non-zero mass allocated to the empty set. The function nzdsr normalizes the result of function dsrwon by dividing the mass value of the non-empty subsets by 1 minus the mass of the empty set.

Usage

nzdsr(x)

Arguments

x

A mass function, i.e. a list of class bcaspec..

Value

The normalized bca mass function.

References

Shafer, G., (1976). A Mathematical Theory of Evidence. Princeton University Press, Princeton, New Jersey, pp. 57-61: Dempster's rule of combination.

Examples

Run this code
# NOT RUN {
x1 <- bca(f=matrix(c(1,0,1,1),nrow=2, byrow = TRUE), 
m=c(0.9,0.1), cnames =c("yes", "no"),
infovarnames = "x", varnb = 1)
x2 <- bca(f=matrix(c(0,1,1,1),nrow=2, byrow = TRUE), 
m=c(0.5,0.5), cnames =c("yes", "no"), 
infovarnames = "x", varnb = 1)
print("combination of x1 and x2")
x1x2 <- dsrwon(x1,x2)
nzdsr(x1x2) 

print("normalization of a bca definition.")
y2 <- bca(f=matrix(c(0,0,0,1,0,0,1,1,1),nrow=3, 
byrow = TRUE), m=c(0.2,0.5,0.3), 
cnames =c("a", "b", "c"), varnb = 1)
nzdsr(y2)  
# }

Run the code above in your browser using DataLab