plotpersp: Create a 3D Plot for a CSVY Object

Description Usage Arguments Details Value Author(s) References See Also

View source: R/csurvey.R

Description

This routine is borrowed from the cgam package. Given an object of the csvy class, which has at least two non-parametrically modelled predictors, this routine will make a 3D plot of the estimated domain mean surface with a set of two non-parametrically modelled predictors in the formula being the x and y labs.

This routine is an extension of the generic R graphics routine persp.

Usage

1
plotpersp(object, x1 = NULL, x2 = NULL,...)

Arguments

object

An object of the csvy class with at least two non-parametrically modelled predictors.

x1

A non-parametrically modelled predictor in a csvy fit. If the user omits x1 and x2, then the first two non-parametric predictors in a csvy formula will be used.

x2

A non-parametrically modelled predictor in a csvy fit. If the user omits x1 and x2, then the first two non-parametric predictors in a csvy formula will be used.

...

Arguments to be passed to the S3 method for the csvy class:

  • x1nm: Character name of x1.

  • x2nm: Character name of x2.

  • col: The color(s) of a 3D plot created by plotpersp. If col == NULL, "white" will be used when there is only one surface in the plot. The default is col = NULL.

  • xlim: The xlim argument inherited from the persp routine.

  • ylim: The ylim argument inherited from the persp routine.

  • zlim: The zlim argument inherited from the persp routine.

  • xlab: The xlab argument inherited from the persp routine.

  • ylab: The ylab argument inherited from the persp routine.

  • zlab: The zlab argument inherited from the persp routine.

  • main: The main argument inherited from the persp routine.

  • categ: If there are more than 2 predictors in the csvy fit, then the user can specify the argument categ to be a character representing a third predictor x_3 in the formula, then multiple 3D plots, which represent the domains of x_3 in an ascending order, will be created; otherwise, a 3D plot with only one surface will be created. The default is categ = NULL.

  • th: The theta argument inherited from the persp routine.

  • ltheta: The ltheta argument inherited from the persp routine.

  • main: The main argument inherited from the persp routine.

  • ticktype: The ticktype argument inherited from the persp routine.

Details

The graphic routine "plotpersp" is borrowed from the R package cgam.

See the help page of csvy for examples.

Value

The routine plotpersp returns a 3D plot of an object of the csvy class. The x lab and y lab represent a set of non-parametrically modelled predictors used in a csvy formula, and the z lab represents estimated domain means.

Author(s)

Xiyue Liao

References

The official documentation for the generic R routine persp: http://stat.ethz.ch/R-manual/R-patched/library/graphics/html/persp.html

See Also

plotpersp, csvy


csurvey documentation built on May 17, 2021, 9:07 a.m.

Related to plotpersp in csurvey...