rp.ancova: Interactive analysis of covariance

View source: R/rp_ancova.R

rp.ancovaR Documentation

Interactive analysis of covariance

Description

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.

The function is superseded by rp.lm which is strongly recommended as it has a more flexible interface and improved plotting, using ggplot.

Usage

  rp.ancova(x, y, group, panel = TRUE, panel.plot = TRUE, model = NA,
            xlab, ylab, glab, hscale = NA, vscale = hscale, style = 'ggplot')

Arguments

x

a vector of covariate values.

y

a vector of response values.

group

a vector of group indicators. If this is not already a factor it will be converted into one.

panel

a logical variable which determines whether a panel is created to allow interactive control of the fitted models.

panel.plot

a logical parameter which determines whether the plot is placed inside the panel (TRUE) or the standard graphics window (FALSE)

model

a character variable which determines the model to be fitted. Valid values are 'None', 'Single line', 'Parallel lines', 'Different lines'.

xlab

a character variable used for the covariate axis label.

ylab

a character variable used for the response axis label.

glab

a character variable used for the group variable label.

hscale, vscale

scaling parameters for the size of the plot when panel.plot is set to TRUE. The default values are 1.

style

a character variable used to determine whether the style of the plot. When this is set to 'ggplot' the rp.lm function is called. For any other setting, a simpler display using standard graphics is created.

Details

The rp.lm function provides an alternative means of creating the display, based on model formulae.

The 'ggplot' style is strongly recommended as in this case the rp.lm function is called. The older style of display has very limited functionality.

Static plots, for printing or other purposes can be created by setting the panel argument to FALSE and specifying the model of interest.

Value

Nothing is returned.

References

rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.

Examples

## Not run: 
   with(gullweight, {
     rp.ancova(hab, weight, month)
   })

## End(Not run)

rpanel documentation built on March 12, 2026, 9:07 a.m.

Related to rp.ancova in rpanel...