Learn R Programming

mkde (version 0.1)

initializeMovementData: Initialize a movement data list

Description

This function sets up the movement data for use in other functions in the package.

Usage

initializeMovementData(t.obs, x.obs, y.obs, z.obs=NULL, sig2obs=0.0, sig2obs.z=NA, t.max=max(diff(t.obs), na.rm=TRUE))

Arguments

t.obs
A vector of times at which the animal locations were observed
x.obs
A vector of x-coordinates at which the animal locations were observed
y.obs
A vector of y-coordinates at which the animal locations were observed
z.obs
A vector of z-coordinates at which the animal locations were observed
sig2obs
Location error variance in the xy-dimensions
sig2obs.z
Location error variance in the z-dimension
t.max
The maximum time allowed between locations if the movement step is to be used in computing the density

Value

A move data object, in the form of a list, is returned.
dimension
The spatial dimension of the movement data. If z-coordinates are passed, the dimension will be 3; otherwise, the dimension will be 2.
t.obs
Times of the animal locations.
x.obs
x-coordinates of the animal locations.
y.obs
y-coordinates of the animal locations.
z.obs
z-coordinates of the animal locations.
a.obs
Altitude of the animal; that is, its z-coordinate minus the lower bound on the z-coordinate at the corresponding xy-coordinates of the animal location.
use.obs
A logical array that indicates whether each location should be used in the MKDE calculations. By default these values are set to TRUE.
t.max
The maximum time allowed between locations if the movement step is to be used in computing the density
sig2xy
A vector of movemenet variance paramters for the xy-dimensions, with NAs as placeholders. The functions estVarMKDE is provided to estimate these parameters, or they can be set manually to allow for different movement variances for each move step.
sig2z
A vector of movemenet variance paramters for the z-dimension, with NAs as placeholders. The functions estVarMKDE is provided to estimate these parameters, or they can be set manually to allow for different movement variances for each move step.
sig2obs
A vector of variances for the location observation error in the xy-dimensions. If only one value is provided for the variance parameters, the value is repeated to form a vector with one element for each location. Otherwise, a vector of location error variances can be passed to allow for different errors for each observed location.
sig2obs.z
A vector of variances for the location observation error in the z-dimension. If only one value is provided for the variance parameters, the value is repeated to form a vector with one element for each location. Otherwise, a vector of location error variances can be passed to allow for different errors for each observed location.

Details

If only 2D or 2.5D MKDEs are to be calculated, then z.obs and sig2obs.z do not have to be provided.

Examples

Run this code
data(condor)
mv.dat <- initializeMovementData(condor$time, condor$x,
condor$y, z.obs=condor$z, 65.0, 25.0, sig2obs.z=81.0)

Run the code above in your browser using DataLab