impestcond {impimp}R Documentation

Conditional Imprecise Estimation

Description

Estimate conditional probability of some events based on data obtained by imprecise imputation

Usage

impestcond(data, event, condition, constraints = NULL)

Arguments

data

a data.frame obtained as result from an imprecise imputation e.g. by a call to impimp.

event

a list of objects of class "impimp_event", specifiying the event of interest. See 'Details'.

condition

a list of objects of class "impimp_event", specifiying the event to condition on. See 'Details'.

constraints

a list of so-called logical constraints or fixed zeros. Each element must be an object of class "impimp_event". See 'Details' .

Details

event and condition should each be a list of objects of class "impmp_event", where within each list the set union of impimp_events is the actual event of interest or conditioning event, respectively.

By specifying constraints one can exlude combinations of imputed values which are deemed impossible, so called ‘logical constraints’ or ‘fixed zeros’. constraints should be a list of objects of class "impimp_event".

An object of class "impimp_event" is obtained as a result of a call to impimp_event.

For event, condition and constraints holds that overlapping in the resulting events generated by the individual impimp_events does not have any side effects, besides a potential decrease in performance.

Value

A numeric vector of length 2, where the first component contains the lower and the second component the upper conditional probability of the event of interest.

References

Dubois, D. and Prade, H. (1992), Evidence, knowledge, and belief functions, International Journal of Approximate Reasoning 6(3), 295–319.

See Also

impimp, impimp_event for sepcifying constraints and events; impest for the estimation of unconditional probabilities

Examples

A <- data.frame(x1 = c(1,0), x2 = c(0,0),
                y1 = c(1,0), y2 = c(2,2))
B <- data.frame(x1 = c(1,1,0), x2 = c(0,0,0),
                z1 = c(0,1,1), z2 = c(0,1,2))
AimpB <- impimp(A, B, method = "domain")
BimpA <- impimp(B, A, method = "domain")
AB <- rbindimpimp(AimpB, BimpA)

myevent <- list(impimp_event(z1 = 1,z2 = 0),
                impimp_event(z1 = c(0,1), z2 = 1))
cond <- list(impimp_event(x1 = 1))

impestcond(AB, event = myevent, condition = cond)

constr <- list(impimp_event(y1 = 0, z1 = 0))
impestcond(AB, event = myevent, condition = cond,
           constraints = constr)


[Package impimp version 0.3.1 Index]