[R] package R2WinBUGS question; was: Multilevel
Uwe Ligges
ligges at statistik.tu-dortmund.de
Sat Jan 29 15:32:42 CET 2011
On 29.01.2011 15:06, martanair wrote:
>
> Why this?
>
>
> I write:
> radon.data<- list ("n", "J", "x", "y", "county")
> radon.inits<- function (){
> list (a=rnorm(J), b=rnorm(1), mu.a=rnorm(1),
> sigma.y=runif(1), sigma.a=runif(1))
> }
> radon.parameters<- c ("a", "b", "mu.a", "sigma.y", "sigma.a")
>
> # with 10 iterations
> radon.1<- bugs (radon.data, radon.inits, radon.parameters, "radon.1.bug",
> n.chains=3, n.iter=10)
1. Let me assume your are talking about R2WinBUGS, right? Please say so
and indicate in your subject line.
2. We do not have radon1.bug. Hence we cannot reproduce anything. Please
read the posting guide.
> plot (radon.bugs.1) # to get a plot similar to Figure 16.1
3. What is Figure 16.1?
> print (radon.bugs.1) # to display the results in the R console
>
> # with 500 iterations
> radon.bugs.1<- bugs (radon.data, radon.inits, radon.parameters,
> "radon.1.bug",
> n.chains=3, n.iter=500)
We still do not have radon1.bug.
> plot (radon.bugs.1) # to get Figure 16.1
> print (radon.bugs.1) # to display the results in the R console
>
> But after this
> # with 10 iterations
> radon.1<- bugs (radon.data, radon.inits, radon.parameters, "radon.1.bug",
> n.chains=3, n.iter=10)
>
> R programe give me an error:
> Errore in FUN(X[[1L]], ...) : oggetto "n" non trovato
This is rather unlikely unless you have changed some of your objects in
the meantime. In any case, we can only help if you send reproducible code.
Best,
Uwe Ligges
>
> Anybody can help me?
> Thanks
> Marta
More information about the R-help
mailing list