rp.regression2 {rpanel} | R Documentation |
This function plots a response variable against two covariates and allows the creation of a panel which controls the model which is fitted to the data and displayed on the plot. The plot is constructed with the aid of the rgl package for three-dimensional display.
rp.regression2(y, x1, x2, ylab = NA, x1lab = NA, x2lab = NA, panel = TRUE, model = "None", residuals.showing = FALSE, size = 3, col = "red")
y |
a vector of response values. |
x1 |
a vector of covariate values. |
x2 |
a vector of covariate values. |
ylab |
a character variable used for the response axis label. |
x1lab |
a character variable used for the first covariate axis label. |
x2lab |
a character variable used for the second covariate axis label. |
panel |
a logical variable which determines whether a panel is created to allow interactive control of the fitted models. |
model |
a character variable defining the model to be fitted, if panel is set to FALSE. The valid values are "None", the name of the first and second covariates and the combination of these names with an "&". |
residuals.showing |
a logical value determining whether the residuals are shown on the plot. |
size |
the size of the plotted points. |
col |
the colour of the plotted points. |
Static plots, for printing or other purposes can be created by setting the panel argument to FALSE and specifying the model of interest.
If panel is TRUE, the name of the R panel object is returned. If panel is FALSE, nothing is returned.
rpanel: Simple interactive controls for R functions using the tcltk library (http://www.stats.gla.ac.uk/~adrian/rpanel/)
data(CofE) attach(CofE) rp.regression2(Giving, Employ, Attend)