condtour {condvis}R Documentation

Conditional tour; a tour through sections in data space

Description

Whereas ceplot allows the user to interactively choose sections to visualise, condtour allows the user to pre-select all sections to visualise, order them, and cycle through them one by one. ']' key advances the tour, and '[' key goes back. Can adjust threshold for the current section visualisation with ',' and '.' keys.

Usage

condtour(data, model, path, response = NULL, sectionvars = NULL,
  conditionvars = NULL, threshold = NULL, lambda = NULL,
  distance = c("euclidean", "maxnorm"), view3d = FALSE,
  Corder = "default", conf = FALSE, col = "black", pch = NULL,
  xsplotpar = NULL, modelpar = NULL, xcplotpar = NULL)

Arguments

data

A dataframe.

model

A fitted model object, or a list of such objects.

path

A dataframe, describing the sections to take. Basically a dataframe with its colnames being conditionvars.

response

Character name of response variable in data.

sectionvars

Character name(s) of variables in data on which to take sections.

conditionvars

Character name(s) of variables in data on which to condition.

threshold

Threshold distance. Observed data which are a distance greater than threshold from the current section are not visible. Passed to similarityweight.

lambda

A constant to multiply by number of factor mismatches in constructing a general dissimilarity measure. If left NULL, behaves as though lambda is set greater than threshold, and so only observations whose factor levels match the current section are visible. Passed to similarityweight.

distance

The type of distance measure to use, either "euclidean" (default) or "maxnorm".

view3d

Logical; if TRUE, plots a three-dimensional regression surface when possible.

Corder

Character name for method of ordering conditioning variables. See arrangeC.

conf

Logical; if TRUE, plots confidence bounds or equivalent when possible.

col

Colour for observed data points.

pch

Plot symbols for observed data points.

xsplotpar

Plotting parameters for section visualisation as a list, passed to plotxs. Not used.

modelpar

Plotting parameters for models as a list, passed to plotxs. Not used.

xcplotpar

Plotting parameters for condition selector plots as a list, passed to plotxc. Can specify cex.axis, cex.lab , tck, col for highlighting current section, cex.

Value

Produces a set of interactive plots. One device displays the current section. A second device shows the the current section in the space of the conditioning predictors given by conditionvars. A third device shows some simple diagnostic plots; one to show approximately how much data are visible on each section, and another to show what proportion of data are visited by the tour.

See Also

ceplot, similarityweight

Examples

## Not run: 

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

data(wine)
wine$Class <- as.factor(wine$Class)
library(e1071)
model5 <- list(svm(Class ~ ., data = wine))
conditionvars1 <- setdiff(colnames(wine), c("Class", "Hue", "Flavanoids"))
path <- makepath(wine[, conditionvars1], 50)
condtour(data = wine, model = model5, path = path$path, sectionvars = c("Hue"
  , "Flavanoids"), threshold = 3)


## End(Not run)

[Package condvis version 0.5-1 Index]