Simulates observed location data subject to temporal irregularity and/or location measurement error
simObsData(data, lambda, errorEllipse, ...)# S3 method for momentuHMMData
simObsData(data, lambda, errorEllipse, ...)
# S3 method for momentuHierHMMData
simObsData(data, lambda, errorEllipse, coordLevel, ...)
A dataframe of:
Numeric time of each observed (and missing) observation
The ID(s) of the observed animal(s)
Either easting or longitude observed location
Either norting or latitude observed location
Data streams that are not derived from location (if applicable)
Covariates at temporally-regular true (mux
,muy
) locations (if any)
Either easting or longitude true location
Either norting or latitude true location
error ellipse semi-major axis (if applicable)
error ellipse semi-minor axis (if applicable)
error ellipse orientation (if applicable)
log of the square root of the x-variance of bivariate normal error (if applicable; required for error ellipse models in crawlWrap
)
log of the square root of the y-variance of bivariate normal error (if applicable; required for error ellipse models in crawlWrap
)
correlation term of bivariate normal error (if applicable; required for error ellipse models in crawlWrap
)
A momentuHMMData
or momentuHierHMMData
object with necessary fields 'x' (easting/longitudinal coordinates) and 'y' (northing/latitudinal coordinates)
Observation rate for location data. If NULL
, location data are kept at temporally-regular intervals. Otherwise
lambda
is the rate parameter of the exponential distribution for the waiting times between successive location observations, i.e.,
1/lambda
is the expected time between successive location observations. Only the 'step' and 'angle' data streams (or multivariate normal data streams identified by mvnCoords
) are subject to temporal irregularity;
any other data streams are kept at temporally-regular intervals. Ignored unless a valid distribution for the 'step' (or 'mvnCoord') data stream has been specified.
List providing the bounds for the semi-major axis (M
; on scale of x- and y-coordinates), semi-minor axis (m
;
on scale of x- and y-coordinates), and orientation (r
; in degrees) of location error ellipses. If NULL
, no location
measurement error is simulated. If errorEllipse
is specified, then each observed location is subject to bivariate normal errors as described
in McClintock et al. (2015), where the components of the error ellipse for each location are randomly drawn from runif(1,min(errorEllipse$M),max(errorEllipse$M))
,
runif(1,min(errorEllipse$m),max(errorEllipse$m))
, and runif(1,min(errorEllipse$r),max(errorEllipse$r))
. If only a single value is provided for any of the
error ellipse elements, then the corresponding component is fixed to this value for each location. Only the 'step' and 'angle' data streams are subject to location measurement error;
any other data streams are observed without error. Ignored unless a valid distribution for the 'step' data stream is specified.
further arguments passed to or from other methods
Level of the hierarchy in which the location data are obtained
Simulated location data that are temporally-irregular (i.e., lambda>0
) and/or with location measurement error (i.e., errorEllipse!=NULL
) are returned
as a data frame suitable for analysis using crawlWrap
.
McClintock BT, London JM, Cameron MF, Boveng PL. 2015. Modelling animal movement using the Argos satellite telemetry location error ellipse. Methods in Ecology and Evolution 6(3):266-277.
crawlWrap
, prepData
, simData
simHierData
# extract momentuHMMData example
data <- example$m$data
lambda <- 2 # expect 2 observations per time step
errorEllipse <- list(M=c(0,50),m=c(0,50),r=c(0,180))
obsData1 <- simObsData(data,lambda=lambda,errorEllipse=errorEllipse)
errorEllipse <- list(M=50,m=50,r=180)
obsData2 <- simObsData(data,lambda=lambda,errorEllipse=errorEllipse)
Run the code above in your browser using DataLab