Print

Print


Dear Bugs users,

 

   I am trying to fix a population dynamics models by applying theta-logistic population growth model:

  log(Nt+1/Nt)=r=rm[1-(Nt/K)^theta ]+error

 

 Nt is the population size at time t, r is population growth rate, rm is the maximal intrinsic population growth rate, K is the carrying capacity.

 

Theta permits a nonlinear relationship between rate of increase and abundance. In our model, rm, K and theta are unknown.

 

 When I run this model, it comes out a trap winder which shows TRAP 20  (precondition violated). Is there any bugs user can help me to solve this problem? I really appreciate any response. The model and data are shown below:

 

Many thanks again

 

Julia

 

 

 

model

 

{

 

    for(t in 1:T){

 

   r[t] ~ dnorm(mu[t],tau)

 

   q[t]<-N[t]/K

 

   mu[t] <-rm*(1+pow(q[t],theta))+e[t]

 

   e[t]~dnorm(0,tau1)

 

}

 

rm~dnorm(0,0.01)

 

K~dnorm(10,0.01)

 

tau1~dgamma(1,1)

 

tau~dgamma(1,1)

 

theta~dnorm(0,0.001)

 

sigma<-1/tau

 

sigma1<-1/tau1

 

}

 

list(T=192, r=c(-0.352242264644413,-1.06051244243584,0.300944866330192,-0.224503170830249,-0.271933715483642,0.780158557549575,0.128410128230669,-0.636634970296603,0.0312525435041050,3.01910081453011,0.295974813382127,-0.811716789925927,-1.49877549896647,-1.30776959800758,0.491407537908889,-1.18455471846883,0.405465108108164,0.387765531008764,0.616230781284496,-0.207664895498084,-0.273809753265995,-0.659722785042664,2.45397084949948,0.509886215524057,-0.337549371546733,-0.525218410612602,-0.249714928652714,-1.08112997620777,0.173763242542226,-0.0302777095334704,0.956109556721264,1.4533206636348,-0.232537934372791,-0.00835572611056877,-1.01152011828733,0.471897247349388,-1.44894532608156,0.0927692622127591,-0.437088296538678,0.196279909044662,-1.05977245535185,-0.0363676441708733,0.269982495352379,2.15383646245578,1.01317447612591,2.18484719489437,-0.0789523879430185,-0.281061982919806,-3.17101172611351,0.83714512662016,-0.0135221273115232,-0.344812054602263,0.0776085134940233,-2.0383471531103,-0.559615787935425,0.238411023445,2.00903790108987,0.848777573611038,2.27342714581349,-1.39372275887676,-1.9577365834563,-0.622330489490296,-0.0224728558520594,-0.465930303858099,-0.270141921418880,0.80506509676393,0.699704581106103,-0.679901953809924,1.14606188838110,0.500525070881337,-0.261047030468027,-1.30743834110922,-0.589311752890258,0.529147865891737,0.464548964760857,-0.148649252500129,0.583013386149464,-0.0724265039053862,1.61596778883294,-0.696803491763052,-0.548040879539348,-1.15583827709046,0.0338166223792697,0.142324144572503,-0.590587787181834,-0.839184883873928,0.0109690313705744,0,-0.446287102628419,0,0.381367556529104,1.81188087242747,0.796214231583817,0.390430967699314,0.876234744861822,-1.73039972879328,-0.20230946441137,-1.29105627676998,-0.472747115191487,0.451985123743057,0.400103164966780,-0.36757997326122,0.161632822735398,1.55057127524856,1.31707795366893,1.43805252586314,-1.10564318426218,-2.00424149498206,-1.18233372519911,-0.81377516834856,0.872940291000541,0.102876420187641,1.50976721597078,-0.621134724562627,-1.15188393617929,-0.38232357954647,1.57170533876362,0.91678285260344,0.705176657416958,-1.32544815186945,-1.08513994772734,-1.46471632289569,0.405465108108166,-0.118605742407848,-0.146770572529635,0.211309093667206,1.01160091167848,0.592886495595763,-0.0398476377400396,1.60431481695863,-0.828847054175696,-0.382649910837049,-1.697946425995,-0.105360515657827,-0.113328685307003,-0.089612158689686,0.048790164169431,-1.09861228866811,0,1.01160091167848,0.582332814219655,1.75262307791641,0.997248618039136,-1.02074624450067,-1.16889408947724,-0.295266315810088,0.334043143478534,-0.564635518805736,0.30160341097039,-0.150126529527533,-0.96885306196501,0.980829253011726,1.71444122144409,0.96600936805972,1.40087094350280,0.210133676210129,-0.879332874290412,-1.49246413684709,-1.49089752736754,1.05467083144104,-0.514694294906031,1.41070249295224,-2.29391752676077,0.0356222099209253,0.754838625026974,1.92641490853857,0.771287476787839,0.110631197220332,-0.76962183789642,-2.95470008765008,-0.918845011679252,0.693147180559945,0.371063681390832,-0.146603474191876,0.117228865511972,0.812847978663193,0.223156528973168,-0.810515020030167,2.49131603497318,-0.65027728442239,0.331921204785794,-1.98324570067157,-0.234279235464105,0.396089698761508,-0.59630476886999,-0.165589431915683,-0.339130634287824,1.15655682192639,2.2764949287955,0.358031066571687,0.511348875789182,-0.328616603888825), N=c(19,13,4,6,4,3,8,9,4,4,110,148,65,14,3,6,1,2,3,7,6,4,2,29,50,35,20,16,5,6,6,16,72,57,56,20,32,7,8,5,6,1,1,2,24,69,621,574,433,17,41,40,28,31,3,1,2,21,51,507,125,17,9,8,5,3,9,19,9,31,52,40,10, 5,9,16,13,25,23,118,58,33,10,10,12,6,2,2,2,1,1,2,17,39,58,140,24,19,5,2,4,7,5,6,30,117,494,163,21,6,2,6,7,35,18,5,3,19,49,101,26,8,1,2,2,1,2,7,14,13,70,30,20,3,2,2,2,2,0,0,2,4,27,76,27,8,5,8,4,6,5,1,5,32,87,354,437,181,40,8,25,15,64,6,6,13,98,213,238,110, 5,1,4,6,5,5,14,17,7,97,50,70,9,7,11,5,4,3,11,118,169,282))

 

 

 

Prior

 

list(tau=1,tau1=1,rm=0,K=100,theta=1)

 

 

------------------------------------------------------------------- This list is for discussion of modelling issues and the BUGS software. For help with crashes and error messages, first mail [log in to unmask] To mail the BUGS list, mail to [log in to unmask] Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html Please do not mail attachments to the list. To leave the BUGS list, send LEAVE BUGS to [log in to unmask] If this fails, mail [log in to unmask], NOT the whole list