lines.regression.circular: Add a plot for circular regression

View source: R/lines.regression.circular.R

lines.regression.circularR Documentation

Add a plot for circular regression

Description

The lines add a plot for regression.circular objects.

Usage

## S3 method for class 'regression.circular'
lines(x, plot.type=c("circle", "line"), points.plot=FALSE, rp.type="p", type="l",
line.col=1, points.col="grey", points.pch=1, units=NULL, zero=NULL,
clockwise=NULL, radial.lim=NULL, plot.info=NULL, ...)

Arguments

x

An object of class regression.circular.

plot.type

Type of the plot: "line": linear plot, "circle": circular plot.

points.plot

Logical; if TRUE original data are added to the plot.

rp.type, type

Character indicating the type of plotting.

line.col

Color code or name.

points.col

Color code or name for the original data. Used if points.plot=TRUE.

points.pch

Plotting 'character', i.e., symbol to use for the original data. Used if points.plot=TRUE.

units

Units measure used in the plot. If NULL the value is taken from the attribute of object 'x' from the argument 'x', i.e. x$x.

zero

Where to place the starting (zero) point, i.e., the zero of the plot. Ignored if plot.info is provided.

clockwise

Logical, indicating the sense of rotation of the plot: clockwise if TRUE and counterclockwise if FALSE. Ignored if plot.info is provided.

radial.lim

The range of the grid circle. Used if plot.type="circle".

plot.info

An object from plot.regression.circular that contains information on the zero, the clockwise and radial.lim. Used if plot.type="circle".

...

Further arguments to be passed to lines.default (if plot.type="line") or to radial.plot (if plot.type="circle" and x is the output of kern.reg.circ.lin) or to lines3d (if plot.type="circle") and x is the output of kern.reg.circ.circ).

Author(s)

Maria Oliveira, Rosa M. Crujeiras and Alberto Rodriguez–Casal

References

Oliveira, M., Crujeiras R.M. and Rodriguez–Casal, A. (2014) NPCirc: an R package for nonparametric circular methods. Journal of Statistical Software, 61(9), 1–26. https://www.jstatsoft.org/v61/i09/

See Also

kern.reg.circ.lin, kern.reg.circ.circ, kern.reg.lin.circ, plot.regression.circular

Examples

set.seed(1012)
n <- 100
x <- runif(100, 0, 2*pi)
y <- sin(x)+0.5*rnorm(n)
estNW<-kern.reg.circ.lin(circular(x),y,t=NULL,bw=10,method="NW")
estLL<-kern.reg.circ.lin(circular(x),y,t=NULL,bw=10,method="LL")
res<-plot(estNW, plot.type="circle", points.plot=TRUE)
lines(estLL, plot.type="circle",line.col=2, plot.info=res)

NPCirc documentation built on Nov. 10, 2022, 5:48 p.m.