Plots a conditionPlot, showing one, two or many predictors. The predictor setting in varVal is drawn in magenta.

conditionPlot(
  CVdata,
  var,
  varVal,
  pointColor = "steelblue",
  sim = NULL,
  resetpar = TRUE,
  plotrows = NULL
)

Arguments

CVdata

the dataset used for the fit

var

one more condition vars. Draws a parallel coordinate plot for more than two.

varVal

the current setting of the conditionvars, shown in magenta.

pointColor

a color, vector of colors,or the name of variable to be used for coloring

sim

If non-NULL should be a vector of similarity weights.

resetpar

For use withing shiny app.

plotrows

If non-NULL should be a vector of case indices

Examples

conditionPlot(mtcars, c("wt","hp"), c("wt"=3, "hp"=200), pointColor="am")

#> NULL

conditionPlot(mtcars, c("wt","hp"), mtcars[1,], pointColor="am")

#> NULL

#Calculate similarity using wt, hp observations from first case
sim <- similarityweight(mtcars[1, c("wt","hp")], mtcars[, c("wt","hp")], threshold=1)

# Marks points with black border with positive sim values. These are points within 1 (threshold) sd
#of pink cross.
conditionPlot(mtcars, c("wt","hp"), mtcars[1,], pointColor="am", sim=sim)

#> NULL

sim <- similarityweight(mtcars[1, ], mtcars, threshold=2)
conditionPlot(mtcars, names(mtcars), mtcars[1,], sim=sim)

#> NULL