## show difference in parameterizations
### example 1, sequence with a strong trend ###
# two parameterizations usually yield similar Akaike weights under these conditions
x1<- sim.GRW(ns=10, ms=1, vs=0.5)
plot(x1, nse=2)
res1<- fit3models(x1, silent=TRUE)
res1a<- fit3models.joint(x1, silent=TRUE)
res1.tab<- rbind(res1$ak.wts, res1a$ak.wts)
row.names(res1.tab)<- c("fit3models", "fit3models.joint")
cat ("-- Akaike Weights from different parameterizations --
")
print (res1.tab)
## example 2, longer & noisy random walk
## joint parameterization often is better at correctly favoring URW under these conditions
x2<- sim.GRW(ns=20, ms=0, vs=0.1) # step variance relatively low compared to sampling error == Noisy
plot(x2, nse=2)
res2<- fit3models(x2, silent=TRUE)
res2a<- fit3models.joint(x2, silent=TRUE)
res2.tab<- rbind(res2$ak.wts, res2a$ak.wts)
row.names(res2.tab)<- c("fit3models", "fit3models.joint")
cat ("-- Akaike Weights from different parameterizations --
")
print (res2.tab)
Run the code above in your browser using DataLab