Skip to content

Commit

Permalink
Example
Browse files Browse the repository at this point in the history
  • Loading branch information
calbertsen committed Sep 17, 2018
1 parent 9845bdb commit 104211e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions argosTrack/inst/examples/ou.R
Expand Up @@ -7,10 +7,12 @@ library(argosTrack)

nObs <- 500
dates <- Sys.time() + (0:(nObs-1)) * 60 * 60 * 24
m0 <- argosTrack:::OUL(dates,timeunit="day")
m0 <- OUL(dates,
pars = c(0.1,0,0,0.1,10,10),
timeunit="days")

set.seed(1)
X <- m0$simulate()
X <- m0$simulate(x0 = c(0,0))
Y <- X + rnorm(nObs*2,0,0.5)

plot(t(Y)); lines(t(X))
Expand All @@ -19,7 +21,7 @@ an <- Animal(Observation(lon = Y[1,],
lat = Y[2,],
dates = dates,
locationclass = rep("GPS",nObs)),
argosTrack:::OUL(dates,timeunit="day"),
argosTrack:::OUL(dates,timeunit="days"),
Measurement(model="n"))

plot(an)
Expand Down

0 comments on commit 104211e

Please sign in to comment.