lincircKern: Linear-circular kernel fit

Description Usage Arguments Value References Examples

View source: R/activity_code_1_1.r

Description

Fits a Von Mises kernel distribution describing a linear variable as a function of a circular predictor.

Usage

1
lincircKern(x, circdat, lindat)

Arguments

x

Numeric vector of radian values at which to evaluate the distribution.

circdat

Numeric vector of radian data matched with lindat.

lindat

Numeric vector of linear data matched with circdat.

Value

A numeric vector of fitted lindat values matched with x.

References

Xu, H., Nichols, K. & Schoenberg, F.P. (2011) Directional kernel regression for wind and fire data. Forest Science, 57, 343-352.

Examples

1
2
3
4
5
6
7
data(BCIspeed)
i <- BCIspeed$species=="ocelot"
sp <- log(BCIspeed$speed[i])
tm <- BCIspeed$time[i]*2*pi
circseq <- seq(0,2*pi,pi/256)
trend <- lincircKern(circseq, tm, sp)
plot(circseq, trend, type="l")

activity documentation built on May 30, 2017, 8:18 a.m.