问题
I am conducting a Bayesian analysis in R thorough "R2Winbugs" package. In the R output, teh estimated parameters are rounded. My question is how can I control this?
Here is my command:
bugs(data, inits=inits, model.file = "C:/Users/Gunal/Desktop/dummy/dummyw.txt",
parameters, digits=5,
n.chains = 3, n.iter = 1000, codaPkg = FALSE,
bugs.directory = "D:/PROGRAMLAR/WinBUGS14/")
and here is some part of my output
mean sd 2.5% 25% 50% 75% 97.5% Rhat n.eff
beta1 0.3 0.1 0.0 0.2 0.3 0.4 0.5 1.7 5
What I want is to see beta1 as 0.30000. I tried digits=5, but it did not work. Any one know what to do?
Any help would be greatly appreciated
Cheers
Günal
回答1:
Yeah, it's simple - use print(out, dig = 6)
(or 7, 8, ...) to print the result:
out <- bugs(....)
print(out, dig = 6)
来源:https://stackoverflow.com/questions/13764258/avoiding-rounding-in-r