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.

Usage

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

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). If the plot is to be placed inside the panel then the tkrplot library is required.

model, model0

logical vectors of length 4 defining the initial and comparison models to be fitted. The four values determine whether each of the four terms intercept, x, z and x:z appear. This is appropriate only for style = "new".

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 on Unix platforms and 1.4 on Windows platforms.

style

a character variable used to determine whether the style of controls in earlier version of the rpanel package is to be used. The value "new" activates the new style and any other value activates the old one.

Details

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 Feb. 16, 2023, 10:37 p.m.

Related to rp.ancova in rpanel...