lines.regression.circular {NPCirc} | R 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 |
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.pch |
Plotting 'character', i.e., symbol to use for the original data. Used if
|
units |
Units measure used in the plot. If |
zero |
Where to place the starting (zero) point, i.e., the zero of the plot. Ignored if |
clockwise |
Logical, indicating the sense of rotation of the plot: clockwise if |
radial.lim |
The range of the grid circle. Used if |
plot.info |
An object from |
... |
Further arguments to be passed to |
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)