plotRaw3d.fnc: Visualize raw surface averages (3d)

Description Usage Arguments Details Value Author(s) Examples

View source: R/plotRaw3d.fnc.R

Description

For a specified response variable and interacting continuous predictors, visualize in 3d the surface average.

Usage

1
2
3
4
5
plotRaw3d.fnc(data = NULL, response = NULL, pred = NULL, intr = NULL, 
xy = TRUE, color = "topo", zlim = NULL, xlab = NULL, ylab = NULL, 
zlab = NULL, main = NULL, shift = 0, scale = 1, plot.type = "contour", 
theta = 30, phi = 30, ticktype = "detailed", 
contourstepsize = 1, legend.args = NULL, ...)

Arguments

data

A data frame.

response

The quoted name of a continuous response variable.

pred

The quoted name of a continuous predictor.

intr

The quoted name of an interacting continuous predictor.

xy

Whether to the x and y values from the data or to set them to seq(0, 1, len = nrow(z)). Defaults to TRUE.

color

The colour scheme to use. One of "topo", "heat", "cm", "terrain", "gray" or "bw".

zlim

A two element vector specifying the plotting limits for the z-axis.

xlab, ylab, zlab

Titles for the axes. N.B. These must be character strings; expressions are not accepted. Numbers will be coerced to character strings.

main

The main title on top of the plot.

shift

Constant to add to the smooth (on the scale of the linear predictor) before plotting. Defaults to 0.

scale

Constant by which to multiply the smooth before plotting. Defaults to 1.

plot.type

The type of plot to make. Can be any of "contour" or "persp".

theta

Angle defining the viewing direction. theta gives the azimuthal direction.

phi

Angle defining the viewing direction. phi gives the colatitude.

ticktype

Character: "simple" draws just an arrow parallel to the axis to indicate direction of increase; "detailed" draws normal ticks as per 2D plots.

contourstepsize

The size of the steps from contour line to contour line. Defaults to 1. Used only if plot.type = "contour".

legend.args

When plot.type = "image.plot", arguments for a complete specification of the legend label. This is in the form of list and is just passed to the mtext function. (See example in image.plot help page). Defaults to NULL.

...

Further arguments passed to functions image, image.plot, contour or persp.

Details

NAs will be set to 0.

Value

Either a dynamic 3d perspective plot, a perspective plot, or a contour plot. Also invisibly returns the plotting matrix and the color vector.

Author(s)

Antoine Tremblay, Statistics Canada trea26@gmail.com

Examples

1
# see example in LMERConvenienceFunctions help page.

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

LMERConvenienceFunctions documentation built on Oct. 23, 2020, 5:12 p.m.