Description Usage Arguments Details Value References Examples

View source: R/activity_code_1_1.r

Fits a Von Mises kernel distribution describing a linear variable as a function of a circular predictor, and boostraps the null distribution in order to evaluate significance of radial variation in the linear variable.

1 | ```
fitlincirc(circdat, lindat, pCI = 0.95, reps = 1000, res = 512)
``` |

`circdat` |
Numeric vector of radian data matched with |

`lindat` |
Numeric vector of linear data matched with |

`pCI` |
Single numeric value between 0 and 1 defining proportional confidence interval to return. |

`reps` |
Integer number of bootstrap repetitions to perform. |

`res` |
Resolution of fitted distribution and null confidence interval - specifically a single integer number of points on the circular scale at which to record distributions. |

Deviation of `lindat`

from the null expecation is assessed either visually
by the degree to which the fitted distribution departs from the null confidence
interval (use generic plot function), or quantitatively by column `p`

of
slot `fit`

in the resulting `lincircmod-class`

object.

An object of type `lincircmod-class`

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

1 2 3 4 5 6 7 8 9 | ```
#Example with reps limited to increase speed
data(BCIspeed)
i <- BCIspeed$species=="ocelot"
sp <- log(BCIspeed$speed[i])
tm <- BCIspeed$time[i]*2*pi
mod <- fitlincirc(tm, sp, reps=50)
plot(mod, CircScale=24, xaxp=c(0,24,4),
xlab="Time", ylab="log(speed m/s)")
legend(8,-3, c("Fitted speed", "Null CI"), col=1:2, lty=1:2)
``` |

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.