regspmplot {fsdaR} | R Documentation |
Interactive scatterplot matrix for regression
Description
Produces an interactive scatterplot of the responce y
against each variable of the predictor matrix X
.
Usage
regspmplot(
y,
X,
group,
plot,
namey,
nameX,
col,
cex,
pch,
labeladd,
legend,
xlim,
ylim,
tag,
datatooltip,
databrush,
subsize,
selstep,
selunit,
trace = FALSE,
...
)
Arguments
y |
responce variable or an object containing the responce, the predictors and possibly other variable resulting from monitoring of regression. If |
X |
Predictor variables. Data matrix of explanatory variables (also called 'regressors') of
dimension |
group |
grouping variable. Vector with |
plot |
This option controls the names which are displayed in the margins
of the scatterplot matrix as well as the labels of the legend.
If
|
namey |
a character string with the name of the responce variable |
nameX |
a vector of character strings with the names of the explanatory variables |
col |
color specification for the data point. Can be different for each group. By default, the order of the colors is blue, red, black, magenta, green, cyan and yelow. |
cex |
the size of the symbols used for plotting. By default |
pch |
specification of the symbols to use. For example, if
there are three groups, and |
labeladd |
logical, controls wheather the elements belonging to the last group
in the scatterplot matrix are labelled with their unit row index
or their rowname. The rowname is taken from the parameter |
legend |
logical, controls where a legend is shown or not. |
xlim |
x limits. A vector with two elements controlling minimum and maximum on the x axis. By defaul automatic scale is used. |
ylim |
y limits. A vector with two elements controlling minimum and maximum on the y axis. By defaul automatic scale is used. |
tag |
Plot handle. String which identifies the handle of the plot which is about to be created.
The default is |
datatooltip |
If datatooltip is not empty the user can use the mouse in order to have
information about the unit selected, the step in which the unit enters the search and
the associated label. If datatooltip is a list, it is possible to control the aspect
of the data cursor (see MATLAB function |
databrush |
Interactive mouse brushing. If databrush is missing or empty (default), no brushing is done. The activation of this option (databrush is TRUE or a list) enables the user to select a set of trajectories in the current plot and to see them highlighted in the scatterplot matrix. If the scatterplot matrix does not exist it is automatically created. In addition, brushed units can be highlighted in the monitoring MD plot. Note that the window style of the other figures is set equal to that which contains the monitoring residual plot. In other words, if the monitoring residual plot is docked all the other figures will be docked too. If Note that the window style of the other figures is set equal to that which contains the monitoring residual plot. In other words, if the monitoring residual plot is docked all the other figures will be docked too If If
|
subsize |
x axis control, a numeric vector containing the subset size
with length equal to the number of columns of matrix residuals. If it is
not specified it will be set equal to |
selstep |
Text shown in selected steps, a numeric vector which specifies
for which steps of the forward search textlabels are added in the monitoring
residual plot after a brushing action in the yXplot. The default is to
write the labels at the initial and final step. The default is
|
selunit |
Unit labelling. A vector of strings, a string, or a numeric
vector for labelling units. If out is an object the threshold is associated
with the trajectories of the residuals monitored along the search else it
refers to the values of the response variable. If it is a vector of strings,
only the lines associated with the units that in at least one step of the
search had a residual smaller than |
trace |
Whether to print intermediate results. Default is |
... |
potential further arguments passed to lower level functions. |
Value
none
Author(s)
FSDA team, valentin.todorov@chello.at
See Also
Examples
## Not run:
## Example of the use of function regspmplot with all the default options
## regsmplot() with first argument vector y and no option.
## In the first example as input there are two matrices: y and X respectively
## A simple plot is created
n <- 100
p <- 3
X <- matrix(data=rnorm(n*p), nrow=n, ncol=p)
y <- matrix(data=rnorm(n*1), nrow=n, ncol=1)
regspmplot(y, X)
## Example of the use of function regspmplot with first argument
## vector y and third argument group.
## Different groups are shown in the yXplot
group <- rep(0, n)
group[1:(n/2)] <- rep(1, n/2)
regspmplot(y, X, group)
## Example of the use of function regspmplot with first argument
## vector y, third argument group and fourth argument plot
## (Ex1) plot=TRUE
regspmplot(y, X, group, plot=TRUE)
## (Ex1) Set the scale for the x axes, the y axis and control symbol type
regspmplot(y, X, group, xlim=c(-1,2), ylim=c(0,2), pch=c(10,11), trace=TRUE)
## When the first input argument is an object.
## In the following example the input is an object which also contains
## information about the forward search.
(out <- fsreg(y~X, method="LMS", control=LXS_control(nsamp=1000)))
(out <- fsreg(y~X, bsb=out$bs, monitoring=TRUE))
regspmplot(out, plot=0)
## End(Not run)