Print

Print


On 12/11/14 15:01, Sekineh Z.m wrote:
> Hello bugs
> I am Graduate student in Applied Statistics.
> I run the below code for estimate the parameters in
> survival model but BUGS shows this
> error: update error for node <u[1]> algorithm Slice updater error can 
> not sample node too many iterations
The following should be more stable:

log(mu[i])<- lu[cluster[i]] + 
beta0+beta1*w.other[i]+beta2*w.arab[i]+beta3*w.lor[i]

lu[i]~dnorm(0.0,0.0001)
u[i] <- exp(lu[i])

Bob

> model
> {
> for(i in 1:N) {
> t[i]~dweib(alpha,mu[i])I(t.cen[i],)
> mu[i]<-u[cluster[i]]* 
> exp(beta0+beta1*w.other[i]+beta2*w.arab[i]+beta3*w.lor[i])
> }
> beta0~dnorm(0.0,0.0001)
> beta1~dnorm(0.0,0.0001)
> beta2~dnorm(0.0,0.0001)
> beta3~dnorm(0.0,0.0001)
> alpha~dexp(0.001)
> for(i in 1:13){
> u[i]~dlnorm(0.0,0.0001)
> }
>  
> }
> list(beta0=0,beta1=0.2,beta2=0.03,beta3=0.4,alpha=1)
> list(N=477,
> t=c(23,16,10,19,24,16,12,25,31,28,9,12,10,16,10,14,9,10,9,24,26,29,33,38,48,20,17,17,12,12,12,20,20,16,21,25,25,26,9,26,12,10,17,16,10,10,23,20,26,21,8,26,14,15,12,34,18,22,11,9,7,12,18,13,9,15,13,11,21,9,15,39,59,34,12,13,46,11,23,15,13,26,30,44,25,45,40,10,28,8,22,15,13,28,14,43,20,54,144,11,12,64,12,12,11,12,43,17,47,51,24,64,27,12,41,9,59,27,9,28,12,10,24,12,12,55,29,25,23,16,12,11,21,22,16,15,17,72,10,54,12,27,30,48,14,26,10,12,29,27,24,96,13,61,67,16,36,22,28,12,12,10,11,24,42,91,15,9,36,24,17,7,36,14,12,11,11,9,19,13,11,11,12,46,18,21,16,56,15,8,23,14,23,12,15,8,10,8,9,24,13,9,20,10,13,57,17,12,22,20,11,12,12,17,33,29,24,12,36,8,43,13,8,16,11,27,66,19,16,17,24,24,112,20,30,10,11,69,54,21,49,16,12,13,19,12,9,10,44,12,11,12,44,8,26,17,13,23,19,11,10,14,39,63,14,58,12,12,12,9,16,20,16,13,20,26,19,18,10,31,27,12,21,14,9,12,25,32,9,21,18,13,13,13,24,9,12,13,24,10,72,19,12,26,13,10,13,57,12,13,16,28,34,10,39,32,10,10,37,8,44,17,9,130,21,10,39,20, 
> 45,28,11,17,24,12,12,48,29,15,21,26,30,61,45,14,10,24,23,22,10,16,26,23,9,10,16,37,28,12,10,51,39,16,11,39,18,15,40,15,35,14,15,19,8,11,16,20,66,18,22,34,30,24,19,84,14,23,15,21,10,17,25,9,11,11,10,12,13,9,20,23,50,11,36,36,13,15,9,43,11,8,20,21,15,46,12,41,34,7,20,16,15,12,36,17,27,19,21,34,12,10,16,38,19,46,7,16,14,12,46,15,9,43,23,22,33,59,57,24,20,19,29,19,12,12,12,47,35,9,15,31,11,46,11,9,9,60,15,22,30,12,11,12,13,14,60,12,18
> ),
> t.cen=c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1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,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1 
> 2,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13
> ),
> w.other=c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,1,1,0,0,0,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,1,0,1,0,0,1,0,0,1,0,0,0,0,1,1,1, 
> 0,0,0
> ))
>  
>
>
>
>
>
>
> ------------------------------------------------------------------- 
> 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] <mailto:[log in to unmask]> To mail the 
> BUGS list, mail to [log in to unmask] <mailto:[log in to unmask]> 
> Before mailing, please check the archive at 
> www.jiscmail.ac.uk/lists/bugs.html 
> <http://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] <mailto:[log in to unmask]> If this 
> fails, mail [log in to unmask] 
> <mailto:[log in to unmask]>, NOT the whole list 


-- 

Bob O'Hara

Biodiversity and Climate Research Centre
Senckenberganlage 25
D-60325 Frankfurt am Main,
Germany

Tel: +49 69 7542 1863
Mobile: +49 1515 888 5440
WWW:   http://www.bik-f.de/root/index.php?page_id=219
Blog: http://blogs.nature.com/boboh
Journal of Negative Results - EEB: www.jnr-eeb.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