Learn R Programming

condvis (version 0.2-2)

condtour: Conditional tour: a tour through sections in data space

Description

This function produces a tour through sections in data space defined by a path.

Usage

condtour(data, model, path, response = NULL, S = NULL, C = NULL, 
    sigma = NULL, distance = "euclidean", cex.axis = NULL, cex.lab = NULL, 
    tck = NULL, view3d = FALSE, conf = FALSE, select.colour = "blue")

Arguments

data
a data frame
model
a fitted model object, or list of fitted models
path
a path through the predictor space, i.e. a dataframe with same column names as data[, C] describing values to condition on
response
the index of the response variable in data
S
the index of the section predictor(s) in data
C
the index of the condition predictor(s) in data
sigma
parameter to choose how much data to display
distance
type of distance measure for sigma
cex.axis
scaling for axis text
cex.lab
scaling for axis labels
tck
scaling for axis ticks
view3d
if S denotes two continuous variables, should the section be visualised as a 3-D mesh
conf
show approximate confidence bounds for expected values
select.colour
colour for highlighting selected sections/conditions

Value

  • An interactive graphic.

See Also

ceplot

Examples

Run this code
data(powerplant)
library(e1071)
model <- svm(PE ~ ., data = powerplant)
path <- makepath(powerplant[-5], 25)
condtour(data = powerplant, model = model, path = path$path, S = "AT")

##
data(wine)
wine$Class <- as.factor(wine$Class)
library(e1071)
model5 <- list(svm(Class ~ ., data = wine))
path <- makepath(wine[-1], 50)
condtour(data = wine, model = model5, path = path$path, S = c("Hue", 
    "Flavanoids"), sigma = 3)

Run the code above in your browser using DataLab