View source: R/activity_code.r
lincircKern | R Documentation |
Fits a Von Mises kernel distribution describing a linear variable as a function of a circular predictor.
lincircKern(x, circdat, lindat)
x |
Numeric vector of radian values at which to evaluate the distribution. |
circdat |
Numeric vector of radian data matched with |
lindat |
Numeric vector of linear data matched with |
A numeric vector of fitted lindat
values matched with x
.
Xu, H., Nichols, K. & Schoenberg, F.P. (2011) Directional kernel regression for wind and fire data. Forest Science, 57, 343-352.
data(BCIspeed)
i <- BCIspeed$species=="ocelot"
log_speed <- log(BCIspeed$speed[i])
time <- BCIspeed$time[i]*2*pi
circseq <- seq(0,2*pi,pi/256)
trend <- lincircKern(circseq, time, log_speed)
plot(time, log_speed, xlim=c(0, 2*pi))
lines(circseq, trend)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.