P {pim} | R Documentation |
Probability function
Description
This functions transform a comparison or otherwise logical value to a numeric value for use in a pim.
Usage
P(x)
PO(x, y = NULL)
Arguments
x |
for |
y |
a numeric value or |
Details
These functions are constructed purely for notation.
P
is completely equivalent
to as.numeric
, apart from an extra control
to check whether it actually makes sense to do so.
The function PO
is just short for P(x < y) + 0.5*P(x == y)
Value
A numeric value of 0, 0.5 or 1. 1 if x < y, 0.5 if x == y and 0 if x > y
See Also
pim
and pim.formula
for more information
on how this is used inside a pim context.
Examples
# Check in pim