#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
fit2=MARSS(dat, control=list(MCInit=TRUE, numInits=10, numInitSteps = 10, boundsInits=list(Q=c(1,0.1),R=c(1,0.1))))
fit2
#Show the inits that were used
fit2$start
#ignore the values for Z,B, and V0; those parameters are fixed
Run the code above in your browser using DataLab