Using R2MLwiN to write BUGS code
Posted: Tue May 06, 2014 9:27 pm
Hi,
I'm trying to use R2MLwiN to write some BUGS code of a bivariate mixed model, but I'm getting the error below:
mod<- runMLwiN(Formula ="c(y1, probit(y2,cons)) ~ (0s|cons+treat) + (1s|cons.y1) + (2s|cons)",
D=c("Mixed", "Normal", "Binomial"), levID = c("cluster", "id"), indata = data,
estoptions=list(x64=TRUE, EstM=1, show.file = T,
mcmcMeth = list(burnin = 1000, iterations = 5000, thinning = 1)),
BUGO = c(version = 4, n.chains = 1, debug = T, seed = 12146, bugs = "C:/Program
Files/WinBUGS14/WinBUGS14.exe", OpenBugs = F), MLwiNPath = 'C:/Program Files (x86)/MLwiN v2.29' )
Warning messages:
1: In runMLwiN(Formula = eq.y, D = c("Mixed", "Normal", "Binomial"), :
The Mixed response model is currently not implemented in WinBUGS/OpenBUGS.
2: In file.remove(modelfile) :
cannot remove file 'C:/Users/mgomes/AppData/Local/Temp/RtmpQvWPs1/modelfile_1f386ddd5173.txt', reason 'No such file or directory'
Error in print(summary(chains.bugs.mcmc)) :
error in evaluating the argument 'x' in selecting a method for function 'print': Error in summary(chains.bugs.mcmc) :
error in evaluating the argument 'object' in selecting a method for function 'summary': Error: object 'chains.bugs.mcmc' not found
I was trying to double check whether the mixed model I manually wrote in Winbugs (attached) was matching that produced by R2MLwiN?
Any help would be great.
Thanks,
Manny
I'm trying to use R2MLwiN to write some BUGS code of a bivariate mixed model, but I'm getting the error below:
mod<- runMLwiN(Formula ="c(y1, probit(y2,cons)) ~ (0s|cons+treat) + (1s|cons.y1) + (2s|cons)",
D=c("Mixed", "Normal", "Binomial"), levID = c("cluster", "id"), indata = data,
estoptions=list(x64=TRUE, EstM=1, show.file = T,
mcmcMeth = list(burnin = 1000, iterations = 5000, thinning = 1)),
BUGO = c(version = 4, n.chains = 1, debug = T, seed = 12146, bugs = "C:/Program
Files/WinBUGS14/WinBUGS14.exe", OpenBugs = F), MLwiNPath = 'C:/Program Files (x86)/MLwiN v2.29' )
Warning messages:
1: In runMLwiN(Formula = eq.y, D = c("Mixed", "Normal", "Binomial"), :
The Mixed response model is currently not implemented in WinBUGS/OpenBUGS.
2: In file.remove(modelfile) :
cannot remove file 'C:/Users/mgomes/AppData/Local/Temp/RtmpQvWPs1/modelfile_1f386ddd5173.txt', reason 'No such file or directory'
Error in print(summary(chains.bugs.mcmc)) :
error in evaluating the argument 'x' in selecting a method for function 'print': Error in summary(chains.bugs.mcmc) :
error in evaluating the argument 'object' in selecting a method for function 'summary': Error: object 'chains.bugs.mcmc' not found
I was trying to double check whether the mixed model I manually wrote in Winbugs (attached) was matching that produced by R2MLwiN?
Any help would be great.
Thanks,
Manny