plotConditional {MoTBFs} | R Documentation |
Plot Conditional Functions
Description
Plot conditional MoTBF densities.
Usage
plotConditional(
conditionalFunction,
data,
nameChild = NULL,
points = FALSE,
color = NULL,
...
)
Arguments
conditionalFunction |
the output of function conditionalMethod. A list containing the the interval of the parent and the final conditional density (MTE or MOP). |
data |
An object of class |
nameChild |
A |
points |
A logical value. If |
color |
If not specified, a default palette is used. |
... |
Additional graphical parameters passed to filled.contour(). |
Details
If the number of parents is greater than one, then the error message "It is not possible to plot the conditional function." is reported.
Value
A plot of the conditional density function.
See Also
Examples
## Data
X <- rnorm(1000)
Y <- rnorm(1000, mean=X)
data <- data.frame(X=X,Y=Y)
cov(data)
## Conditional Learning
parent <- "X"
child <- "Y"
intervals <- 5
potential <- "MTE"
P <- conditionalMethod(data, nameParents=parent, nameChild=child,
numIntervals=intervals, POTENTIAL_TYPE=potential)
plotConditional(conditionalFunction=P, data=data)
plotConditional(conditionalFunction=P, data=data, points=TRUE)
[Package MoTBFs version 1.4.1 Index]