Hi everyone,

I am trying to run the example of  multistate occupancy model from the book
Bayesian Population Analysis using WinBUGS (Marc Kéry and Michael Schaub):
This example is available on
http://www.vogelwarte.ch/code-for-running-bpa-using-jags.html

When I try to run the first line of this section of the model :

                        # Initial values
                             zst <- apply(y, 1, max, na.rm = TRUE)
                             zst[zst == "-Inf"] <- 1
                              inits <- function(){list(z = zst)}

I receive this warning message from R:

1: In FUN(newX[, i], ...) :
  no non-missing argument to max; returning -Inf

(Original message in Portuguese: Mensagens de aviso perdidas:
1: In FUN(newX[, i], ...) :
  nenhum argumento não faltante para max; retornando -Inf
)

Does someone know what is happening? I couldn't find anything related to
this model and error.
Thanks

Francisco

	[[alternative HTML version deleted]]

