Print

Print


There should be some additional bugs in the sciprt i think:

beta[2]<- exp(theta2) - 1 
beta[3]<- -exp(theta3)
should be theta[2], theta[3]
where is the definition of beta[4]?








At 2013-02-28 21:02:56,"Dr. Pablo E. Verde" <[log in to unmask]> wrote:

The model looks interesting here some hints:

1) There is an error, it should be  tau1[i] <- 1/var[i]
2) You do need neither the tau[k] loop nor the mu[k] loop
3) Be careful in the priors of the regression parameters. You should use more informative priors.
You may get problems with priors like dnorm(0,1.0E-3) unless you expect a regression parameter to be like 1000000.

Hope it helps.

Pablo


El 27.02.2013 21:22, Jorge Vel¨¢squez escribi¨®:

Dear all,


I'm studying how range size estimates (y) relate to sample size (x). Exploratory analyses reveal two things: (1) that range size relates to sample size in an asymptotic fashion (i.e range sizes estimates stabilize after a certain sample size is achieved) and (2) variance is range size estimates seems to be larger at small sample sizes. Thus I think the best model for my data is a logistic grwoth model with a decreasing trend in variance. Further, I believe the variance does not decrease linearly but exponentially with sample size. I wanted to have your feedback regarding whether the following model BUGS is an adequate representation of the aforementioned model...particularly, I'm not really sure if I my specification of the trend in variance is appropriate.


model {
 for (i in 1:w){
y[i]~dnorm(eta[i],tau1[i])
eta[i]<-beta[1]/(1+beta[2]*exp(beta[3]*x[i])) #Logistic growth model
tau1<-1/var1[i]
var1[i]<- exp(tau0+beta[4]*x[i]) #Model for trend in variance
beta[1]<- exp(theta[1])
beta[2]<- exp(theta2) - 1 
beta[3]<- -exp(theta3)
for (j in 1:4){
theta[j]~dnorm(mu[j],tau[j])
}
}
tau0~dnorm(0,1.0E-3)
for (k in 1:4){
mu[k]~dnorm(0,1.0E-4)
tau[k]~dgamma(1.0E-3,1.0E-3)
}
}


Thank you for your feedback,


Jorge Vel¨¢squez
Department of Ecology and Evolution
SUNY @ Stony Brook
------------------------------------------------------------------- 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
------------------------------------------------------------------- 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

-------------------------------------------------------------------
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