Random circular kernel numbers.

Share:

Description

Random numbers drawn from a fitted Von Mises kernel distribution.

Usage

1
rvmkern(n, fit)

Arguments

n

Integer number of numbers to return.

fit

An emprical distribution contained in either a matrix or a fitted actmod object (see Details).

Details

If fit is a matrix, it should have two columns: [,1] precisely seq(0,2*pi,pi/256) sequence of radian values at which pdf evaluated; [,2] corresponding pdf values.

Value

A numeric vector of radian numbers.

Examples

1
2
3
4
5
6
7
8
9
#Matrix input
data(BCItime)
tm <- 2*pi*BCItime$time[BCItime$species=="paca"]
xx <- seq(0,2*pi, pi/256)
rn <- rvmkern(100, cbind(xx, dvmkern(xx, tm)))

#actmod input
fit <- fitact(tm, sample="n")
rvmkern(100,fit)