surrogate_arsimulate: Simulated VAR(1) tracks

Description Usage Arguments Details Value

View source: R/availability.R


Simulate track from fitted vector autoregressive model


surrogate_arsimulate(arfit, n, startlonlat, fixed = NULL, endlonlat = NULL, = TRUE, random.rotation = c(-pi, pi), verbose = 0,
  return.all.points = FALSE, intermediate.tries = 10, original = FALSE)

surrogate_arsimulate0(arfit, n, startlonlat, fixed = NULL, endlonlat = NULL, = TRUE, random.rotation = c(-pi, pi), verbose = 0,
  return.all.points = FALSE, intermediate.tries = 10)



fitted object of class "ar" as returned by surrogate_arfit


number of points to simulate


2-element vector of starting longitude and latitude


a dataframe or matrix in which the first column is the index (from 1:n) of each fixed point, and the second and third columns give the associated longitude and latitude


a 2-element vector with ending longitude and latitude. If NULL, no end constraint is imposed except for land masking (if land masking is used). This is a simple way of imposing a return-to-starting-location constraint; for more complex constraints use the fixed argument

a logical or function. If TRUE, use the included land mask to avoid land. Alternatively, a function can be passed that returns TRUE (point is okay, not on land) or FALSE (point is on land) for a given lon,lat. Note that land masking is ignored for fixed points. Note also that it is possible to create a sitation where tracks are difficult or impossible to simulate, because a fixed point is sufficiently far onto land that the track cannot reach it.


a 2-element vector giving the range of the rotation to apply to the randomized track (values in radians). use random.rotation=NULL for no such rotation. The angle can be restricted using random.rotation=c(min.angle,max.angle) - this may speed up computation by avoiding impossible angles (e.g. tracks over a land mass)


an integer 0-3, if >0 spit out extra information which may be helpful if things don't work as expected. Larger numbers mean more output


if TRUE, return points that were proposed but rejected due to land masking (may be helpful for debugging). If TRUE, the returned data.frame will have an extra column named "valid"


when land-masking, try how many times to find a valid point at each step before giving up and starting again? Higher values may improve overall run-time, but too-high values may yield tracks that aren't a good representation of the fitted model


if TRUE, use the original algorithm.


Note that land masking uses a built-in land mask image, and it only covers the southern hemisphere. A future version will do something about this.


2 or 3 column dataframe with the longitude and latitude of simulated track points (and point validity, if return.all.points is TRUE)

AustralianAntarcticDataCentre/availability documentation built on May 28, 2017, 5:57 p.m.