Print

Print


On 12/29/2014 03:05 PM, Roel Straetemans wrote:
[log in to unmask]" type="cite">

Dear all,

 

I apologize for the basic question.

 

When trying to compile the model below I receive the error message: “expected right square bracket” on position before i in the code below (2nd for block, 2nd line).

 

I’ve went a couple of times through my code but fail to see an unclosed right square bracket.

 

Any feedback would be highly appreciated.

 

Kr,

 

roel

 

 

Oops: you're using ncenter in two ways:

for(i in 1:ncenter){


and

yobs.hat[i] <- l.E0[ncenter[i]] + l.EMAX[ncenter[i]]*(dose[i]/(l.ED50[ncenter[i]] + dose[i]))

Easy to fix. BTW, you might want to using separate indices for each loop, just to make the code a bit easier to follow.


Bob

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