Dear All I try to use your R package MCMCpack and I have encountered the following problem:
The following code works fine: library(MCMCpack) line <- list(X = c(-2,-1,0,1,2), Y = c(1,3,3,3,5)) posterior1 <- MCMCregress(X~Y, data=line) summary(posterior1) But as long as I try the following lines library(MCMCpack) line <- list(X = c(-2,-1,0,1,2), Y = c(1,3,3,3,5)) posterior2 <- MCMCregress(paste(“X”,”Y”,sep=”~”), data = line) summary(posterior2) I get the following error message: > library(MCMCpack) > line <- list(X = c(-2,-1,0,1,2), Y = c(1,3,3,3,5)) > posterior2 <- MCMCregress(paste("X","Y",sep="~"), data = line) Fehler in x$terms : $ operator is invalid for atomic vectors > summary(posterior2) Fehler in summary(posterior2) : objekt "posterior" nicht gefunden > This is seems to me a bit strange as the following line with the command lm(), which I believe use a similar structure, works fine: X = c(-2,-1,0,1,2) Y = c(1,3,3,3,5) lm(paste("X","Y", sep="~")) lm(X~Y) Thank you Borissssssssssssssssssssss -- ______________________________________________ R-help@r-project.org 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.