[R] Multilevel

martanair marta.nairuscone at unicatt.it
Sat Jan 29 15:06:50 CET 2011


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)

plot (radon.bugs.1)    # to get a plot similar to 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)

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


Anybody can help me?
Thanks
Marta
-- 
View this message in context: http://r.789695.n4.nabble.com/Multilevel-tp3246190p3246190.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list