# NOT RUN {
#Example 1
data("Ross76")
tin <- Ross76[,1]
data <- Ross76[,3]
dev.new()
out1 <- gPoMo(data, tin=tin, dMax = 2, nS=c(3), show = 1,
IstepMax = 1000, nPmin = 9, nPmax = 11)
visuEq(3, 2, out1$models$model1, approx = 4)
# }
# NOT RUN {
#Example 2
data("Ross76")
tin <- Ross76[,1]
data <- Ross76[,2:4]
dev.new()
out2 <- gPoMo(data, tin=tin, dMax = 2, nS=c(1,1,1), show = 1,
IstepMin = 10, IstepMax = 3000, nPmin = 7, nPmax = 8)
# the simplest model able to reproduce the observed dynamics is model #5
visuEq(3, 2, out2$models$model5, approx = 4) # the original Rossler system is thus retrieved
# }
# NOT RUN {
# }
# NOT RUN {
#Example 3
data("Ross76")
tin <- Ross76[,1]
data <- Ross76[,2:3]
# model template:
EqS <- matrix(1, ncol = 3, nrow = 10)
EqS[,1] <- c(0,0,0,1,0,0,0,0,0,0)
EqS[,2] <- c(1,1,0,1,0,1,1,1,1,1)
EqS[,3] <- c(0,1,0,0,0,0,1,1,0,0)
visuEq(3, 2, EqS, substit = c('X','Y','Z'))
dev.new()
out3 <- gPoMo(data, tin=tin, dMax = 2, nS=c(2,1), show = 1,
EqS = EqS, IstepMin = 10, IstepMax = 2000,
nPmin = 9, nPmax = 11)
# }
# NOT RUN {
# }
# NOT RUN {
#Example 4
data(sprottK)
data(rossler)
data <- cbind(rossler,sprottK)[1:400,]
dev.new()
out4 <- gPoMo(data, dt=1/20, dMax = 2, nS=c(1,1,1,1,1,1),
show = 1, method = 'rk4',
IstepMin = 2, IstepMax = 3, nPmin = 13, nPmax = 13)
# the original Rossler (variables x, y and z) and Sprott (variables X, Y and Z)
# systems are retrieved:
visuEq(6, 2, out4$models$model347, approx = 4,
substit = c('x', 'y', 'z', 'X', 'Y', 'Z'))
# to check the robustness of the model, the integration duration
# should be chosen longer (at least IstepMax = 4000)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab