Skip to content

Commit

Permalink
Changed model specifications
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieBrusa committed Dec 27, 2023
1 parent 5093a22 commit f3d46ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions NegBinomBreedMolt.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ model{
}


tau.eps.year ~ dgamma(1,1) #dunif(0,10) might be better
tau.eps.year ~ dgamma(1,1)
tau.eps.pair ~ dgamma(1,1)
tau.eps.psu ~ dgamma(1,1)
beta.bss.0~dnorm(0, 0.01)
Expand Down Expand Up @@ -44,9 +44,10 @@ beta.chl~dnorm(0, 0.1)
beta.BM~dnorm(0,0.1)
beta.offshore~dnorm(0,0.1)
alpha~dnorm(0,.1)
sigma0~dunif(0,300)
sigma0~dunif(0, 7)
sigma.eps.year <- 1/sqrt(tau.eps.year)
sigma.eps.pair <- 1/sqrt(tau.eps.pair)
sigma.eps.psu <- 1/sqrt(tau.eps.psu)

r.N~dunif(0,100)

Expand Down
9 changes: 5 additions & 4 deletions SS HDS model final.R
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ dataCovs<-list(nG=nG, xg=dist.breaks[-1]-13.5, nsites=nSites, Year = Year, pair
### initial values for N
N.in<-t(seals.sum)+3

initsCovs<-function(){list(N=as.vector(N.in), alpha = runif(1,1, 3), sigma0 = runif(1, 110, 130),
initsCovs<-function(){list(N=as.vector(N.in), alpha = runif(1,1, 3), sigma0 = runif(1, 0, 7),
beta.bss.1=rnorm(1, 0, 0.1),
beta.bss.2=rnorm(1, 0, 0.1),
beta.bss.3=rnorm(1, 0, 0.1),
Expand Down Expand Up @@ -363,10 +363,11 @@ covs.mod<-run.jags(model = modelFileCovs,
monitor = params.Covs,
data = dataCovs,
n.chains = 3,
burnin = 50000,
sample = 100000,
adapt = 2000,
burnin = 10000,
sample = 50000,
inits = initsCovs,
thin = 2)
thin = 1)


#Diagnostics
Expand Down

0 comments on commit f3d46ac

Please sign in to comment.