addTobca: Add some elements of 0 mass to an existing basic chance...

View source: R/addTobca.R

addTobcaR Documentation

Add some elements of 0 mass to an existing basic chance assignment.

Description

Given a previously defined basic chance assignment (bca), the user may want to add some elements of the set of possible values or some subsets, even if they have zero mass value. This feature is useful, for example, to examine the measure of plausibility of these elements or subsets of zero mass value.

Usage

addTobca(x, tt, f)

Arguments

x

A basic chance assignment (see bca).

tt

A matrix constructed in a boolean style (0,1) or a boolean matrix. The number of columns of the matrix tt must match the number of columns of the tt matrix of x (see bca). Each row of the matrix identify a subset of the set of possible values.

f

Deprecated. Old name for tt matrix.

Value

x The original basic chance assignment x augmented with the added subsets defined by tt.

Author(s)

Claude Boivin

Examples

 
y <- bca(tt = matrix(c(1,0,0,1,1,1),nrow=2, byrow = TRUE), 
m = c(0.6, 0.4),  cnames = c("a", "b", "c"), idvar = 1)
addTobca(y, matrix(c(0,1,0,0,0,1, 0,1,1), nrow = 3, byrow = TRUE))
x <- bca(tt = 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"), idvar = 1)
xy <- dsrwon(x,y)
xy1 <- addTobca(nzdsr(xy), matrix(c(0,1,0,0,0,1), nrow = 2, byrow = TRUE))
xy1
addTobca(x, tt = diag(1,  ncol(x$tt) ) ) # add all singletons


dst documentation built on Nov. 16, 2023, 5:08 p.m.