#Driver routine for sis.seal, written in Splus 6.1 #See sis.seal for details #Assumes: # - pup count data is in pup.regional.data (matrix of 41 yearsx 4 regions) # - distances between regions is in dist.regional.data (4x4 region) #The latest version of these data is available at the Sea Mammal # Research Unit (SMRU) web site http://smub.st-and.ac.uk/, or by writing # to: Sea Mammal Research Unit, Gatty Marine Laboratory, # University of St Andrews, St Andrews, Fife, KY16 8LB, Scotland. #Explanation of the sis object is given in sis.seal this.file <- "sis.driver.txt" sis.file <- "sis.seal.txt" util.file <- "util.txt" source(util.file) source(sis.file) #set number of regions K <- 4 #set up sis object sis <- list() sis$rdir <- "results.region" sis$N.ages <- 7 #Starting with 1984 data sis$obs <- t(pup.regional.data[25:41,]) sis$distances <- dist.regional.data sis$allow.movement <- T sis$N <-250000 sis$N1 <- sis$N sis$max.N <- 250000 sis$min.absolute.unique <- 1 sis$min.N.unique <- 100 sis$min.N1.unique <- 100 sis$state.inflate <- 1.3 sis$discount <- 0.6250 sis$true.states <- NULL sis$init.with.true.states <- F sis$echo <- T sis$pop.process.is.stochastic <- T sis$resid.resamp <- T sis$dens.dep.surv <- T sis$dens.dep.fecund <- F cat("Random seed at beginning is: ",.Random.seed,"\n") # Priors d.p.female <- "fixed" p.female <- c(0.5,0.5) d.Sa <- "beta" Sa <- c(22.05,1.15) #mean 0.95 d.Sj.Max <- "beta" Sj.Max <- c(14.525,6.225) #mean 0.7 d.a <- "beta" a <- c(22.04,1.15) #mean 0.95 d.psi="gamma" psi <- c(4,0.025) #mean 0.10, sd 0.05 d.move <- "gamma" move.1.dd <- c(2.25,1.3333) move.2.dist <- c(2.25,1.3333) move.3.site <- c(2.25,1.3333) d.b <- "gamma" b.ns <- c(4,0.0002072722) #cc~5000; cv 50% b.ih <- c(4,0.0002961174) #cc~3500 b.oh <- c(4,0.000074029) #cc~14000 b.ork <- c(4,0.000057578) #cc~9000 sis$prior.params <- cbind(p.female,Sa,Sj.Max,a,psi, move.1.dd,move.2.dist,move.3.site,b.ns,b.ih,b.oh,b.ork) sis$prior.params.dist<-c(d.p.female,d.Sa,d.Sj.Max,d.a,d.psi, rep(d.move,3),rep(d.b,4)) names(sis$prior.params.dist) <- dimnames(sis$prior.params)[[2]] #run the sis routine date() sis.seal.10.1(useFor=F) date() #copy this driver file, the sis file and the util file to the data dir, so you can easily # run again to recreate the results, and have a record of what parameters were used dos(paste("copy ",this.file," ",sis$rdir,"\\",this.file,sep="")) dos(paste("copy ",sis.file," ",sis$rdir,"\\",sis.file,sep="")) dos(paste("copy ",util.file," ",sis$rdir,"\\",util.file,sep="")) cat("Random seed at end is: ",.Random.seed,"\n")