On 8 April 2010 22:58, dcflyer <[email protected]> wrote:

>
> I try to do a test for dirichlet process for Multivariate normal, but
> Winbugs
> always says "expected multivariate node", does that mean I miss something
> at
> initialization? I will really appreciate the help to solve this problem
>
> Here is the R code, and Winbugs code.
>
> This is a BUGS error, not an R error. The problem is that logical nodes can
only be expressed as scalars, so this doesn't work:

mu[i,1:2] <- mu.star[S[i],]

you have to specify these nodes in a loop:

for(d in 1:2) {mu[i,d] <- mu.star[S[i],d]]

There might be other errors too: I always develop my BUGS code in BUGS, and
go to R afterwards.

Bob

-- 
Bob O'Hara

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

Tel: +49 69 798 40216
Mobile: +49 1515 888 5440
WWW:   http://www.bik-f.de/root/index.php?page_id=219
Blog: http://blogs.nature.com/boboh
Google Wave: [email protected]
Journal of Negative Results - EEB: www.jnr-eeb.org

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to