# NOT RUN {
#Note doing a Monte-Carlo search takes a long, long time
dat = t(harborSeal)
dat = dat[c(2,nrow(dat)),]
fit1=MARSS(dat, control=list(MCInit=TRUE))
fit1
#Show the inits that were used
fit1$start
#Try fewer initial start locations
#and different mean variance (0.1 instead of 1) for R and Q
cntl.list = list(MCInit=TRUE, numInits=10,
numInitSteps = 10,
boundsInits=list(Q=c(1,0.1),R=c(1,0.1)))
fit2=MARSS(dat, control=cntl.list)
fit2
#Show the inits that were used
fit2$start
#ignore the values for Z,B, and V0; those parameters are fixed
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab