Email discussion lists for the UK Education and Research communities

## BUGS@JISCMAIL.AC.UK

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font
 LISTSERV Archives BUGS Home BUGS 2006

#### Options

Subject:

Problem with state-space modelling

From:

Date:

Wed, 8 Mar 2006 11:26:46 +0100

Content-Type:

text/plain

Parts/Attachments:

 text/plain (79 lines)
 ```Dear BUGS listers & users, I'm trying to fit a time-series model to yearly partridge densities in an area in order to estimate density-dependence in population counts, but I have problems with the WinBUGS script. I have information on the sampling variability of each count, so I want to implement this information within a state-space modeling scheme. The script I wrote is: model{ for (j in 1:(n-1)) { N[j+1] ~ dnorm(NExp[j+1], tau[j+1]) NExp[j+1] <- NExp[j] + (alpha + beta*NExp[j])*t[j] t[j] <- year[j+1]-year[j] } alpha ~ dnorm(0,100) beta ~ dnorm(0,100) NExp[1] ~ dnorm(0, 0.001) I(0,) } list(n=28, N =c(9.0494, 9.2762, 8.3308, 6.1738, 7.5562, 9.4902, 8.9029, 10.1562, 8.6708, 9.4329, 8.9079, 9.6969, 9.5282, 9.0537, 10.3862, 7.4413, 8.4357, 7.3265, 7.6087, 10.1140, 7.9270, 8.3854, 8.1562, 8.4044, 8.5383, 9.4498, 9.0336, 10.9816), tau=c(6.3539, 7.4252, 6.0958, 4.4189, 5.9650, 8.0612, 6.6630, 7.4817, 6.7709, 7.5850, 7.2354, 6.6473, 7.1292, 6.1875, 6.9441, 5.4773, 6.8679, 6.0092, 5.5513, 8.5486, 6.0174, 6.4754, 4.8438, 5.7396, 6.4779, 7.2302, 6.5577, 8.6597), year=c(1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005)) NOTE: The basic process model I have in mind is a nonlinear density-dependent growth model: State process eqn. --> N[t+1]=N[t]+(alpha+beta*N[t]+epsilon) were N(t+1) is population density, beta is the density-dependent parameter to be estimated, and epsilon is process error The observation model is: Obs. process eqn. --> NExp[t+1]=N[t+1]+tau were NExp[t+1] is the expected population density and tau is observation error N in data is population size, tau is sampling error. I tried to specify a flat prior for alpha, and beta, dnorm(0, 100). I have also tried to make NExp[j+1] dependent on NExp[j] and not on N[j]. I guess this is the main step in state-space modelling, is this OK? The model is syntactically correct, but it hangs during the update. How can I introduce further time lags in the model? Thank you very much in advance Pablo -- Pablo Almaraz García Estación Biológica de Doñana (CSIC) Pabellón del Perú, Avda. Mª Luísa s/n E-41013, Sevilla SPAIN E-mail: [log in to unmask] webpage: http://www.almaraz.org ------------------------------------------------------------------- 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 ```