save.model {MIfuns} | R Documentation |
save.model
saves several files resulting from a WinBUGS MCMC simulation to a specified directory. The saved items
include the BUGS model file, the R script used to launch WinBUGS via the R2WinBUGS
function bugs
, and
the R object generated by bugs
that contains the MCMC simulations. Some additional intermediate files are also
saved if they have not been deleted by bugs
.
save.model(bugs.output, model.name, parent.dir = ".")
bugs.output |
list object produced by bugs . See documentation of R2WinBUGS for details. |
model.name |
character string for name of the BUGS language model file minus the .txt extension. This will
also be the name of the directory to which the files are saved. |
parent.dir |
charater string for the name of an already existing directory that will be the parent directory for the new "model.name" directory. Default is the current working directory. |
Successfukl use of save.model
requires that the BUGS language model file and the R script in which it is used have
the names paste(model.name,".txt",sep="") and paste(model.name,".R",sep=""), respectively.
Developed by Metrum Institute (Bill Gillespie and others).
MIfuns package available from Metrum Institute website (http://metruminstitute.org/
).