curveModel | R Documentation |
Light Curve Model Structures for Stella and Estelle
curveModel( time, light, segment, calibration, alpha, beta, logp.x = function(x) rep.int(0L, nrow(x)), logp.z = function(z) rep.int(0L, nrow(z)), x0 = NULL, z0 = NULL, fixedx = FALSE, dt = NULL ) curveModel0( time, light, segment, calibration, alpha, logp.x = function(x) rep.int(0L, nrow(x)), logp.z = function(z) rep.int(0L, nrow(z)), fixedx = FALSE )
time |
vector of sample times as POSIXct. |
light |
vector of observed (log) light levels. |
segment |
vector of integers that assign observations to twilight segments. |
calibration |
function that maps zenith angles to expected light levels. |
alpha |
parameters of the twilight model. |
beta |
parameters of the behavioural model. |
logp.x |
function to evaluate any additional contribution to the log posterior from the twilight locations. |
logp.z |
function to evaluate any additional contribution to the log posterior from the intermediate locations. |
x0 |
suggested starting points for twilight locations. |
z0 |
suggested starting points for intermediate locations. |
fixedx |
logical vector indicating which twilight locations to hold fixed. |
dt |
time intervals for speed calculation in hours. |
Stella and Estelle require a model structure that describes the model being fitted. These function generate basic model structures for curve fitting methods that should provide a suitable starting point for most analyses.
The curveModel
function constructs a model structure
assuming that each twilight profile is associated with a single
location. The errors in observed log light level are assumed to
be Normally distributed about their expected value.
The initialization locations x0
and z0
must be
consistent with any other constraints imposed by the data.
Both Estelle and Stella variants of the model assume that the
average speed of travel between successive locations is Gamma
distributed, and for Estelle models, the change in bearing
(degrees) along the dog-leg path segments can be assumed Normally
distributed with mean zero. By default, the speed of travel is
calculated based on the time intervals between the twilights (in
hours), but the intervals of time actually available for travel
can be specified directly with the dt
argument.
If beta
is a vector, then beta[1]
and beta[2]
specify the shape and rate of the Gamma distribution of speeds.
If beta
has three elements, then beta[3]
specifies
the standard deviation of the change in bearing (in degrees) along
dog leg paths.
The curveModel0
function constructs only the non-movement
elements of the model, and can be used as a basis for those
wishing to experiment with alternative movement models.
a list with components
|
function to evaluate the contributions to the log posterior from the twilight model |
|
function to evaluate the contributions to the log posterior from the prior for the z locations |
|
function to evaluate contribution to the log posterior from the behavioural model for estelle. |
|
function to evaluate contribution to the log posterior from the behavioural model for stella. |
|
function to evaluate the fitted values for a given set of locations. |
|
a logical vector indicating which locations should remain fixed. |
|
an array of initial twilight locations. |
|
an array of initial intermediate locations. |
|
the sample times. |
|
the recorded light levels. |
|
vector of integers that assign observations to twilight segments. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.