NA
values.By default, the objects created with the algebra()
function represent a mathematical
algebra capable to work on the \([0,1]\) interval. If NA
appears as a value instead,
it is propagated to the result. That is, any operation with NA
results in NA
, by default.
This scheme of handling missing values is also known as Bochvar's. To change this default
behavior, the following functions may be applied.
sobocinski(algebra)kleene(algebra)
dragonfly(algebra)
nelson(algebra)
lowerEst(algebra)
the underlying algebra object to be modified -- see the algebra()
function
A list of function of the same structure as is the list returned from the algebra()
function
The sobocinski()
, kleene()
, nelson()
, lowerEst()
and dragonfly()
functions modify the algebra to
handle the NA
in a different way than is the default. Sobocinski's algebra simply ignores NA
values
whereas Kleene's algebra treats NA
as "unknown value". Dragonfly approach is a combination
of Sobocinski's and Bochvar's approach, which preserves the ordering 0 <= NA <= 1
to obtain from compositions (see compose()
)
the lower-estimate in the presence of missing values.
In detail, the behaviour of the algebra modifiers is defined as follows:
Sobocinski's negation for n
being the underlying algebra:
a | n(a) |
Sobocinski's operation for op
being one of t
, pt
, c
, pc
, i
, pi
, s
, ps
from the underlying algebra:
b | NA | |
a | op(a, b) | a |
Sobocinski's operation for r
from the underlying algebra:
b | NA | |
a | r(a, b) | n(a) |
Kleene's negation is identical to n
from the underlying algebra.
Kleene's operation for op
being one of t
, pt
, i
, pi
from the underlying algebra:
b | NA | 0 | |
a | op(a, b) | NA | 0 |
NA | NA | NA | 0 |
Kleene's operation for op
being one of c
, pc
, s
, ps
from the underlying algebra:
b | NA | 1 | |
a | op(a, b) | NA | 1 |
NA | NA | NA | 1 |
Kleene's operation for r
from the underlying algebra:
b | NA | 1 | |
a | r(a, b) | NA | 1 |
NA | NA | NA | 1 |
Dragonfly negation is identical to n
from the underlying algebra.
Dragonfly operation for op
being one of t
, pt
, i
, pi
from the underlying algebra:
b | NA | 0 | 1 | |
a | op(a, b) | NA | 0 | a |
NA | NA | NA | 0 | NA |
0 | 0 | 0 | 0 | 0 |
Dragonfly operation for op
being one of c
, pc
, s
, ps
from the underlying algebra:
b | NA | 0 | 1 | |
a | op(a, b) | a | a | 1 |
NA | b | NA | NA | 1 |
0 | b | NA | 0 | 1 |
Dragonfly operation for r
from the underlying algebra:
b | NA | 0 | 1 | |
a | r(a, b) | NA | n(a) | 1 |
NA | b | 1 | NA | 1 |
0 | 1 | 1 | 1 | 1 |
# NOT RUN {
a <- algebra('lukas')
b <- sobocinski(a)
a$t(0.3, NA) # NA
b$t(0.3, NA) # 0.3
# }
Run the code above in your browser using DataLab