rp.ancova {rpanel} | R Documentation |
This function plots a response variable against a covariate, with different groups of data identified by colour and symbol. It also creates a panel which controls the model which is fitted to the data and displayed on the plot.
rp.ancova(x, y, group, panel = TRUE, model = "None", xlab = deparse(substitute(x)), ylab = deparse(substitute(y)))
x |
a vector of covariate values. |
y |
a vector of response values. |
group |
a vector of group indicators. |
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", "Single mean", "Single line", "Parallel lines", and "Different lines". |
xlab |
a character variable used for the covariate axis label. |
ylab |
a character variable used for the response axis label. |
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 package (http://www.stats.gla.ac.uk/~adrian/research-reports/rpanel.ps)
x <- runif(50) y <- x + rnorm(50, sd = 0.2) g <- rbinom(50, 1, 0.5) rp.ancova(x, y, g)