## generate data for a directional sequence
y <- sim.GRW(ns=30, ms=1, vs=1)
plot(y)
m.rw<- opt.GRW(y)
m.rwu<- opt.URW(y)
m.sta<- opt.Stasis(y)
## print log-likelihoods; easier to use function fit3models()
cat(m.rw$value, m.rwu$value, m.sta$value, "")
Run the code above in your browser using DataLab